jet.html.core
Class JetInputComponent

java.lang.Object
  extended by jet.html.core.JetComponent
      extended by jet.html.core.JetChildComponent
          extended by jet.html.core.JetInputComponent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Decodeable, JetChildComponent, JetComponent, JetInputComponent, Identifiable, Resetable, ValidationComponent
Direct Known Subclasses:
JetButton, JetCheckbox, JetInput, JetRandomizer, JetTextArea

public abstract class JetInputComponent
extends JetChildComponent
implements JetInputComponent

This abstract class defines how input components have to be design and implements generic field methods

Author:
Markus.Meisters@web.de
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface jet.html.JetChildComponent
JetChildComponent.HasNoParent
 
Field Summary
private  java.lang.String value
          The value to hold
 
Fields inherited from class jet.html.core.JetComponent
eventSupport
 
Constructor Summary
JetInputComponent(java.lang.String identifier)
          Constructor(identifier)
JetInputComponent(java.lang.String identifier, java.lang.String styleclass)
          Constructor(identifier)
JetInputComponent(java.lang.String identifier, java.lang.String name, java.lang.String styleclass)
          Constructor(identifier)
 
Method Summary
 java.lang.String decodeGetString(JetContext jetContext)
          Method to render GET string
 void encode(java.util.Map requestParamters)
          Method de encode the component value from request parameters
 java.lang.String getDisplayValue(java.lang.String encoding)
          Returns the displayed value for GET string
 java.lang.String getFormDisplayValue()
          Returns the form displayed value - html escaped
 java.lang.String getValue()
          Returns teh value as is
 boolean hasValue()
           
 void setHidden(boolean hidden)
          Set the hidden lag
 void setValue(java.lang.String value)
          Set the value
 
Methods inherited from class jet.html.core.JetChildComponent
getForm, getParent, isHidden, setParent, toggleHidden
 
Methods inherited from class jet.html.core.JetComponent
addListener, addListener, clone, componentChanged, decodeForm, findComponent, findComponents, getGeneratedComponentIdentifier, getIdentifier, getName, getNewIdentifier, getStyleclass, incrementIdentifier, removeListener, removeListener, setComponentChanged, setContinueIdentifier, setIdentifier, setName, setStyleclass
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jet.html.JetInputComponent
addEvent, getEvents, hasEvent, hasEvents, reset
 
Methods inherited from interface jet.html.JetChildComponent
getForm, getParent, isHidden, setParent, toggleHidden
 
Methods inherited from interface jet.html.JetComponent
addListener, addListener, clone, componentChanged, decodeForm, findComponent, findComponents, getIdentifier, getName, getStyleclass, incrementIdentifier, removeListener, removeListener, setComponentChanged, setContinueIdentifier, setIdentifier, setName, setStyleclass
 
Methods inherited from interface jet.validation.ValidationComponent
addValidationRule, getValidationRules, hasValidationRules
 
Methods inherited from interface jet.pool.Identifiable
getIdentifier
 

Field Detail

value

private java.lang.String value
The value to hold

Constructor Detail

JetInputComponent

public JetInputComponent(java.lang.String identifier)
Constructor(identifier)

Parameters:
identifier -

JetInputComponent

public JetInputComponent(java.lang.String identifier,
                         java.lang.String styleclass)
Constructor(identifier)

Parameters:
identifier -
styleclass - the style class name

JetInputComponent

public JetInputComponent(java.lang.String identifier,
                         java.lang.String name,
                         java.lang.String styleclass)
Constructor(identifier)

Parameters:
identifier -
name - the name
styleclass - the style class name
Method Detail

encode

public void encode(java.util.Map requestParamters)
Method de encode the component value from request parameters

Specified by:
encode in interface JetInputComponent

decodeGetString

public java.lang.String decodeGetString(JetContext jetContext)
                                 throws java.io.UnsupportedEncodingException
Method to render GET string

Specified by:
decodeGetString in interface JetInputComponent
Returns:
the rednered GET string
Throws:
java.io.UnsupportedEncodingException

getFormDisplayValue

public java.lang.String getFormDisplayValue()
Returns the form displayed value - html escaped

Specified by:
getFormDisplayValue in interface JetInputComponent
Returns:
String the escaped string

getDisplayValue

public java.lang.String getDisplayValue(java.lang.String encoding)
                                 throws java.io.UnsupportedEncodingException
Returns the displayed value for GET string

Specified by:
getDisplayValue in interface JetInputComponent
Returns:
String the url decoded string
Throws:
java.io.UnsupportedEncodingException

getValue

public java.lang.String getValue()
Returns teh value as is

Specified by:
getValue in interface JetInputComponent
Returns:
String the value

setValue

public void setValue(java.lang.String value)
Set the value

Specified by:
setValue in interface JetInputComponent
Parameters:
value - teh value

hasValue

public boolean hasValue()
Specified by:
hasValue in interface JetInputComponent
See Also:
hasValue()

setHidden

public void setHidden(boolean hidden)
Set the hidden lag

Specified by:
setHidden in interface JetInputComponent
Parameters:
hidden - the boolean if hidden or not