private void buildSubordinatePanel ( final WDropdown dropdown , final String value , final WComponentGroup < SubordinateTarget > group , final WSubordinateControl control ) { // create the panel. WPanel panel = new WPanel ( ) ; WStyledText subordinateInfo = new WStyledText ( ) ; subordinateInfo . setWhitespaceMode ( WhitespaceMode . PRESERVE ) ; subordinateInfo . setText ( value + " - Subordinate" ) ; panel . add ( subordinateInfo ) ; // add the panel to the screen and group. infoPanel . add ( panel ) ; group . addToGroup ( panel ) ; // create the rule Rule rule = new Rule ( ) ; control . addRule ( rule ) ; rule . setCondition ( new Equal ( dropdown , value ) ) ; rule . addActionOnTrue ( new ShowInGroup ( panel , group ) ) ; }
Builds a panel for the subordinate control including the rule for that particular option .