I am using GwtChosen 1.1.0 and GwtQuery 1.3.3. It seems to play nice only with RootPanel widgets and not RootLayoutPanel widgets.
Is being not usable with RootLayoutPanel a known limitation with GwtChosen?
Sample Code and screenshots below. Notice RootLayoutPanel sample hides the drop down for the GWTChosen widget within stack and thus leaves it unusable.
public void onModuleLoad() {
if ( !ChosenListBox.isSupported() )
{
$( "#browserWarning" ).show();
}
ChosenListBox chosen = new ChosenListBox( true );
// init default place holder text
chosen.setPlaceholderText( "Choose your favourite chart..." );
chosen.setWidth( "300px" );
chosen.setMaxSelectedOptions( 4 );
chosen.addChosenChangeHandler( new ChosenChangeHandler()
{
public void onChange( ChosenChangeEvent event )
{
}
} );
chosen.addGroup( "Simple" );
chosen.addItemToGroup( "line" );
chosen.addItemToGroup( "bar" );
chosen.addItemToGroup( "pie" );
chosen.addItemToGroup( "area" );
//StackPanel stackpanel = new StackPanel();
//stackpanel.add(chosen, "Choose");
//stackpanel.add(wrapper, "Charts");
//stackpanel.setHeight("150px");
//RootPanel.get().add(stackpanel);
StackLayoutPanel stackLayoutPanel = new StackLayoutPanel( Unit.EM );
stackLayoutPanel.add( chosen, "Choose", 2 );
stackLayoutPanel.setHeight( "150px" );
RootLayoutPanel.get().add( stackLayoutPanel );
}
Never used GwtChosen but it definitely looks like a know issue, although relative to DockLayoutPanel
and not RootLayoutPanel
. There is also an attached workaround, that maybe useful.