public TextAreaItem(String name, String title) { setName(name); setTitle(title); setAttribute("editorType", "TextAreaItem"); }
/** * Allows the {@link com.smartgwt.client.widgets.form.DynamicForm#getSelectOnFocus selectOnFocus} behavior to be configured * on a per-FormItem basis. Normally all items in a form default to the value of {@link * com.smartgwt.client.widgets.form.DynamicForm#getSelectOnFocus selectOnFocus}. * * * @return Boolean * @see com.smartgwt.client.docs.Focus Focus overview and related methods */ public Boolean getSelectOnFocus() { return getAttributeAsBoolean("selectOnFocus"); }
public TextAreaItem(String name) { setName(name); setAttribute("editorType", "TextAreaItem"); }
this.descriptionItem = new TextAreaItem(); this.descriptionItem.setName("description"); this.descriptionItem.setTitle(i18n.description()); this.descriptionItem.setRequired(true); this.descriptionItem.setHeight(100); this.descriptionItem.setWidth(250); this.descriptionItem.setHint(i18n.possibleChars() + " [0-9 a-z A-Z _ -]"); this.descriptionItem.setShowHintInField(true); this.descriptionItem.addKeyPressHandler(new KeyPressHandler() { public void onKeyPress(KeyPressEvent event) { String key = event.getKeyName();
searchXpathForm.setID("searchXpathForm"); searchXpathForm.setNumCols(3); searchXpathTxt.setName("searchXpathTxt"); searchXpathTxt.setTitle("Xpath Search"); searchXpathTxt.setWidth(250); searchXpathTxt.setRequired(true); SubmitItem searchXpathSubmitItem = new SubmitItem("searchXpathSubmitItem"); searchXpathSubmitItem.setTitle("Search"); searchXpathForm.addSubmitValuesHandler(new SearchXpathSubmitValuesHandler(jackrabbitExplorer)); searchXpathForm.setSaveOnEnter(true); searchXpathTxt.setStartRow(true); searchXpathTxt.setEndRow(false); searchXpathSubmitItem.setStartRow(false); searchXpathSubmitItem.setEndRow(true);
public static TextAreaItem getOrCreateRef(JavaScriptObject jsObj) { if(jsObj == null) return null; RefDataClass obj = RefDataClass.getRef(jsObj); if(obj != null) { obj.setJsObj(jsObj); return (TextAreaItem) obj; } else { return new TextAreaItem(jsObj); } }
/** * Align icons with the top edge of text area icons by default. * * * @return VerticalAlignment */ public VerticalAlignment getIconVAlign() { return EnumUtil.getEnum(VerticalAlignment.values(), getAttribute("iconVAlign")); }
/** * Clear fields */ public void clearFields() { this.editCR = false; this.cancelButton.setVisible(false); this.oldRuleName = ""; clearBlock(); // change button text this.createButtonItem.setTitle(i18n.create()); // clear title this.nameItem.clearValue(); // clear description this.descriptionItem.clearValue(); // set radio buttons to "yes" this.publishRadioGroup.setValue(i18n.yes()); this.filterRadioGroup.setValue(i18n.filterOwn()); // resetBlock(); }
this.descriptionItem = new TextAreaItem(); this.descriptionItem.setName("description"); this.descriptionItem.setTitle(i18n.description()); this.descriptionItem.setRequired(true); this.descriptionItem.setHeight(100); this.descriptionItem.setWidth(250); this.descriptionItem.setHint(i18n.possibleChars() + " [0-9 a-z A-Z _ -]"); this.descriptionItem.setShowHintInField(true); this.descriptionItem.addKeyPressHandler(new KeyPressHandler() { public void onKeyPress(KeyPressEvent event) { String key = event.getKeyName();
nodeTypeForm.setID("nodeTypeForm"); nodeTypeForm.setNumCols(3); addNodeTypesTxt.setName("addNodeTypesTxt"); addNodeTypesTxt.setTitle("Enter CND"); addNodeTypesTxt.setWidth(250); addNodeTypesTxt.setRequired(true); SubmitItem nodeTypeSubmitItem = new SubmitItem("nodeTypeSubmitItem"); nodeTypeSubmitItem.setTitle("Submit"); nodeTypeForm.addSubmitValuesHandler(new AddNodeTypesSubmitValuesHandler()); nodeTypeForm.setSaveOnEnter(true); addNodeTypesTxt.setStartRow(true); addNodeTypesTxt.setEndRow(false); nodeTypeSubmitItem.setStartRow(false); nodeTypeSubmitItem.setEndRow(true);
/** * Text wrapping style. * * @return TextAreaWrap */ public TextAreaWrap getWrap() { return EnumUtil.getEnum(TextAreaWrap.values(), getAttribute("wrap")); }
this.descriptionItem.clearValue();
searchSqlForm.setID("searchSqlForm"); searchSqlForm.setNumCols(3); searchSqlTxt.setName("searchSqlTxt"); searchSqlTxt.setTitle("SQL Search"); searchSqlTxt.setWidth(250); searchSqlTxt.setRequired(true); SubmitItem searchSqlSubmitItem = new SubmitItem("searchSqlSubmitItem"); searchSqlSubmitItem.setTitle("Search"); searchSqlForm.addSubmitValuesHandler(new SearchSqlSubmitValuesHandler(jackrabbitExplorer)); searchSqlForm.setSaveOnEnter(true); searchSqlTxt.setStartRow(true); searchSqlTxt.setEndRow(false); searchSqlSubmitItem.setStartRow(false); searchSqlSubmitItem.setEndRow(true);
/** * When generating a print-view of the component containing this TextArea, should the form item expand to accomodate its * value? If set to false the text box not expand to fit its content in the print view, instead showing exactly as it does * in the live form, possibly with scrollbars. * * * @return Boolean * @see com.smartgwt.client.docs.Printing Printing overview and related methods */ public Boolean getPrintFullText() { return getAttributeAsBoolean("printFullText"); }
/** * Should this form item fire its {@link com.smartgwt.client.widgets.form.fields.FormItem#addChangeHandler change} handler * (and store its value in the form) on every keypress? Set to <code>false</code> to suppress the 'change' handler firing * (and the value stored) on every keypress. <p> Note: If <code>false</code>, the value returned by {@link * com.smartgwt.client.widgets.form.fields.FormItem#getValue getValue} will not reflect the value displayed in the form * item element as long as focus is in the form item element. * * * @return Boolean */ public Boolean getChangeOnKeypress() { return getAttributeAsBoolean("changeOnKeypress"); }
/** * If showing hint for this form item, should it be shown within the field? <P>CSS style for the hint is {@link * com.smartgwt.client.widgets.form.fields.TextAreaItem#getTextBoxStyle textBoxStyle} with the suffix "Hint" appended to * it. * * * @return Boolean * @see com.smartgwt.client.widgets.form.fields.FormItem#getHint * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public Boolean getShowHintInField() { return getAttributeAsBoolean("showHintInField"); }