Hi,
I created search forms for an application which contains multiple SelectItems. When this form gets drawn I do not attach or load any OptionDataSource/DataSource because some of them can contain thousands of records. To have a fast loading UI... I attach and load the dataSource only, when the user needs the data... means he has to click on the SelectItem.
This is working really well on Dekstop Systems. When I use an android tablet... the dataSource won't be loaded. Nothing happens.
Attach and load DataSource in ClickHandler:
The same happens when I attach a ValueMap in ClickHandler:
When I switch the mobile browser to the "Desktop version"... the above mentioned examples are working. But then I can not user touch guestures to scroll.
Thanks
Andy
I created search forms for an application which contains multiple SelectItems. When this form gets drawn I do not attach or load any OptionDataSource/DataSource because some of them can contain thousands of records. To have a fast loading UI... I attach and load the dataSource only, when the user needs the data... means he has to click on the SelectItem.
This is working really well on Dekstop Systems. When I use an android tablet... the dataSource won't be loaded. Nothing happens.
Attach and load DataSource in ClickHandler:
Code:
SelectItem comboTest2 = new SelectItem( "Test2" );
comboTest2.setEmptyDisplayValue( "All" );
comboTest2.setRequired( true );
comboTest2.setAllowEmptyValue( true );
comboTest2.setTitleOrientation( TitleOrientation.TOP );
comboTest2.setTitle( "Test" );
comboTest2.setWidth( "*" );
comboTest2.addClickHandler( new com.smartgwt.client.widgets.form.fields.events.ClickHandler()
{
@Override
public void onClick( com.smartgwt.client.widgets.form.fields.events.ClickEvent event )
{
DataSource ds = CItemSupplyDataSource.getInstance( ) ;
comboTest2.setOptionDataSource( ds );
comboTest2.fetchData();
}
} );
The same happens when I attach a ValueMap in ClickHandler:
Code:
SelectItem comboTest = new SelectItem( "Test" );
comboTest.setEmptyDisplayValue( "All" );
comboTest.setRequired( true );
comboTest.setAllowEmptyValue( true );
comboTest.setTitleOrientation( TitleOrientation.TOP );
comboTest.setTitle( "Test" );
comboTest.setWidth( "*" );
comboTest.addClickHandler( new com.smartgwt.client.widgets.form.fields.events.ClickHandler()
{
@Override
public void onClick( com.smartgwt.client.widgets.form.fields.events.ClickEvent event )
{
LinkedHashMap<String, String> items = new LinkedHashMap<String, String>();
items.put( "1", GWebAdmin.lang.local() );
items.put( "2", GWebAdmin.lang.ldap() );
items.put( "3", GWebAdmin.lang.localAndLdap() );
comboTest.setValueMap( items );
}
} );
Thanks
Andy
Comment