本文整理汇总了Java中com.smartgwt.client.widgets.form.fields.FormItem.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java FormItem.setValue方法的具体用法?Java FormItem.setValue怎么用?Java FormItem.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.smartgwt.client.widgets.form.fields.FormItem
的用法示例。
在下文中一共展示了FormItem.setValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachVyrizeniPrijemceSubjektGroup
import com.smartgwt.client.widgets.form.fields.FormItem; //导入方法依赖的package包/类
private FormWidget attachVyrizeniPrijemceSubjektGroup(FormWidget fw, final FormItem itemSubject, final Field group) {
class Handler implements FormWidgetListener, ChangeHandler {
@Override
public void onDataLoad() {
if (itemSubject.getValue() == null) {
// init of empty form
itemSubject.setValue("PravnickaOsoba");
}
resetDokumentPrijemceForm(itemSubject.getForm(), group, null, false);
}
@Override
public void onChange(ChangeEvent event) {
String name = event.getItem().getName();
Object oldValue = event.getOldValue();
Object value = event.getValue();
if (oldValue == null || !oldValue.equals(value)) {
resetDokumentPrijemceForm(itemSubject.getForm(), group, String.valueOf(value), true);
}
}
}
Handler handler = new Handler();
fw.addFormWidgetListener(handler);
itemSubject.addChangeHandler(handler);
return fw;
}
示例2: attachPuvodDorucenyDokumentOdesilatelSubjectGroup
import com.smartgwt.client.widgets.form.fields.FormItem; //导入方法依赖的package包/类
/** XXX ugly; requires refactoring! */
private FormWidget attachPuvodDorucenyDokumentOdesilatelSubjectGroup(FormWidget fw, final FormItem itemSubject, final Field group) {
class Handler implements FormWidgetListener, ChangeHandler {
@Override
public void onDataLoad() {
if (itemSubject.getValue() == null) {
// init of empty form
itemSubject.setValue("PravnickaOsoba");
}
resetDorucenyDokumentOdesilatelForm(itemSubject.getForm(), group, null, false);
}
@Override
public void onChange(ChangeEvent event) {
String name = event.getItem().getName();
Object oldValue = event.getOldValue();
Object value = event.getValue();
if (oldValue == null || !oldValue.equals(value)) {
resetDorucenyDokumentOdesilatelForm(itemSubject.getForm(), group, String.valueOf(value), true);
}
}
}
Handler handler = new Handler();
fw.addFormWidgetListener(handler);
itemSubject.addChangeHandler(handler);
return fw;
}
示例3: setValue
import com.smartgwt.client.widgets.form.fields.FormItem; //导入方法依赖的package包/类
/**
* Apply a short attribute value on the form, with the given name.
*
* @param name attribute name
* @param attribute attribute value
* @since 1.11.1
*/
@Api
public void setValue(String name, ShortAttribute attribute) {
FormItem item = formWidget.getField(name);
if (item != null) {
item.setValue(attribute.getValue());
}
}
示例4: setFilterModel
import com.smartgwt.client.widgets.form.fields.FormItem; //导入方法依赖的package包/类
public void setFilterModel(Object modelId) {
FormItem filterModel = filters.getField(DigitalObjectResourceApi.SEARCH_QUERY_MODEL_PARAM);
filterModel.setValue(modelId);
}
示例5: setData
import com.smartgwt.client.widgets.form.fields.FormItem; //导入方法依赖的package包/类
public void setData(Map<String, String> values) {
this.values = values;
for (FormItem fi : fields) {
fi.setValue(values.get(fi.getName()));
}
}