portal.comp
Class TextInput

java.lang.Object
  extended byportal.core.api.Component
      extended byportal.comp.form.FormElement
          extended byportal.comp.TextInput
All Implemented Interfaces:
IValidatable, Renderable, java.io.Serializable

public class TextInput
extends FormElement

See Also:
Serialized Form

Constructor Summary
TextInput()
           
TextInput(StringModel model)
           
 
Method Summary
 Model createDefaultModel()
          This method is called by the constructor to create a default model for this component.
 void draw(HtmlGraphics graphics)
          With this method the component can render itself using the passed HtmlGraphics object.
 int getMaximumLength()
           
 int getSize()
           
 StringModel getStringModel()
           
 void setId(java.lang.String id)
           
 void setMaximumLength(int maximumLength)
           
 void setSize(int size)
           
 
Methods inherited from class portal.comp.form.FormElement
isValid, setValidationRule, validate
 
Methods inherited from class portal.core.api.Component
afterRender, beforeRender, getLayout, getModel, getParent, isEnabled, isVisible, render, setEnabled, setLayout, setModel, setParent, setVisible, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextInput

public TextInput()

TextInput

public TextInput(StringModel model)
Method Detail

getMaximumLength

public int getMaximumLength()

setMaximumLength

public void setMaximumLength(int maximumLength)

getSize

public int getSize()

setSize

public void setSize(int size)

getStringModel

public StringModel getStringModel()

createDefaultModel

public Model createDefaultModel()
Description copied from class: Component

This method is called by the constructor to create a default model for this component. If this component type does not use a model or does not have a suitable default model, this method can return null.

The default implementation should return null.

Overrides:
createDefaultModel in class Component
Returns:
an instance of a Model or null when there is no default model

setId

public void setId(java.lang.String id)

draw

public void draw(HtmlGraphics graphics)
          throws RenderException
Description copied from class: Component

With this method the component can render itself using the passed HtmlGraphics object. This method is not called when a layout manager is set since the existence of a layout manager takes precedence above the draw() method.

Overrides:
draw in class Component
Parameters:
graphics - the html graphics instance to use for drawing this component
Throws:
RenderException - when the rendering process could not proceed or encountered an error