Java Code Examples for com.smartgwt.client.widgets.form.fields.FormItem#setOptionCriteria()

The following examples show how to use com.smartgwt.client.widgets.form.fields.FormItem#setOptionCriteria() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfigurationProfileDataSource.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
public static void setOptionDataSource(FormItem field, ProfileGroup profileGroup) {
        field.setOptionDataSource(getInstance());
        field.setOptionCriteria(new Criteria(
                ConfigurationProfileResourceApi.PROFILE_GROUP_PARAM, profileGroup.getId()));
        field.setValueField(ConfigurationProfileResourceApi.PROFILE_ID);
        field.setDisplayField(ConfigurationProfileResourceApi.PROFILE_LABEL);
//        if (field instanceof SelectItem) {
//            ((SelectItem) field).setSortField(FIELD_LABEL);
//        }
    }
 
Example 2
Source File: LocalizationDataSource.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
public static void setOptionDataSource(FormItem field, BundleName bundleName) {
    field.setOptionDataSource(getInstance());
    field.setOptionCriteria(asCriteria(bundleName));
    field.setValueField(LocalizationResourceApi.ITEM_KEY);
    field.setDisplayField(LocalizationResourceApi.ITEM_VALUE);
}