private static TextArea buildTextArea(String name, String value) { TextArea textArea = new TextArea(); textArea.setName(name); textArea.setValue(value); return textArea; }
public void setInputId(String id) { input.getElement().setId(id); input.setName(id); label.setFor(id); }
/** Protected constructor for this class. To instantiate call makeDatatypeTextArea or makeNonOntologyTextArea. * * @param eiInstance The instance with the property being displayed via this widget. * @param propertyEntity The entity for the property that is being shown in the TextAreaWidget. * @param propertyDefinition The definition of the property (from the ontology). * @param isRequired Flag for whether this property is mandatory for the instance class. * @param propertyValue The value of the property. * @param handler The handler for old values. */ protected TextAreaWidget(final EIInstance eiInstance, final EIEntity propertyEntity, final String propertyDefinition, final boolean isRequired, final String propertyValue, final OldValueHandler handler) { super( eiInstance, propertyEntity, propertyDefinition, isRequired ); valueField.setName( propertyEntity.getURI().toString() ); oldValue = propertyValue; oldValueHandler = handler; setup(); }
private void setup(int numLines) { textArea = new TextArea(); textArea.setName(name); textArea.setTitle(title); textArea.setTabIndex(0); valueChangeHandler = new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { setModified(true); setUndefined(event.getValue().equals("")); } }; textArea.addValueChangeHandler(valueChangeHandler); textArea.setVisibleLines(numLines); wrapper = new InputElementWrapper(textArea, this); }
/** * Create a new {@link JQMTextArea} with the given label text and with the * default size * * @param text the display text for the label */ public JQMTextArea(String text) { String id = Document.get().createUniqueId(); setText(text); label.setFor(id); input.getElement().setId(id); input.setName(id); add(label); add(input); }
/** * Create a new {@link JQMTextArea} with the given label text and with the * default size * * @param text the display text for the label */ public JQMTextArea(String text) { String id = Document.get().createUniqueId(); setText(text); label.setFor(id); input.getElement().setId(id); input.setName(id); add(label); add(input); }
/** * Create a new {@link JQMTextArea} with the given label text and with the * default size * * @param text the display text for the label */ public JQMTextArea(String text) { String id = Document.get().createUniqueId(); setText(text); label.setFor(id); input.getElement().setId(id); input.setName(id); add(label); add(input); }