jet.html.impl
Class JetInput

java.lang.Object
  extended by jet.html.core.JetComponent
      extended by jet.html.core.JetChildComponent
          extended by jet.html.core.JetInputComponent
              extended by jet.html.impl.JetInput
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Decodeable, JetChildComponent, JetComponent, JetInput, JetInputComponent, Identifiable, Resetable, ValidationComponent

public class JetInput
extends JetInputComponent
implements JetInput

This class redners input fields

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.util.List<HTMLElementEvent> events
          events
static java.lang.String HIDDEN
           
private  java.lang.String inputtype
          holds the html input type to use
static java.lang.String PASSWORD
           
private  java.lang.String sevents
          Holds the events already in rendered state
static java.lang.String TEXTAREA
           
static java.lang.String TEXTINPUT
           
private  java.util.List<ValidationRule> validations
          validation rules
 
Fields inherited from class jet.html.core.JetComponent
eventSupport
 
Constructor Summary
JetInput(java.lang.String identifier)
          Creates new Component - name and styleclass would be the same as identifier
JetInput(java.lang.String identifier, java.lang.String styleclass)
          Creates new Component
JetInput(java.lang.String identifier, java.lang.String name, java.lang.String styleclass)
          Creates new Component
 
Method Summary
 void addEvent(HTMLElementEvent event)
          Method to add event
 void addValidationRule(ValidationRule rule)
          Method to add validation rules
 java.lang.Object clone()
          This method generates a clone of the curent one
 void decodeForm(java.lang.StringBuilder builder, JetContext jetContext)
          This method decodes the form to the given buffer
 java.util.List getEvents()
          Method to get events
 java.lang.String getInputtype()
          Returns the input type
 java.util.List getValidationRules()
          Returns only a cloned list of validations
 boolean hasEvent(HTMLElementEvent event)
          Method to indicate if aspecial event exist
 boolean hasEvents()
          Method to indicate if events exists
 boolean hasValidationRules()
          Method to indicate if validation exists
 void reset()
          jet.html.core.JetInputComponent#reset()
 void setInputType(java.lang.String inputtype)
          Set the input type
 
Methods inherited from class jet.html.core.JetInputComponent
decodeGetString, encode, getDisplayValue, getFormDisplayValue, getValue, hasValue, setHidden, setValue
 
Methods inherited from class jet.html.core.JetChildComponent
getForm, getParent, isHidden, setParent, toggleHidden
 
Methods inherited from class jet.html.core.JetComponent
addListener, addListener, componentChanged, 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
decodeGetString, encode, getDisplayValue, getFormDisplayValue, getValue, hasValue, setHidden, setValue
 
Methods inherited from interface jet.html.JetChildComponent
getForm, getParent, isHidden, setParent, toggleHidden
 
Methods inherited from interface jet.html.JetComponent
addListener, addListener, componentChanged, findComponent, findComponents, getIdentifier, getName, getStyleclass, incrementIdentifier, removeListener, removeListener, setComponentChanged, setContinueIdentifier, setIdentifier, setName, setStyleclass
 
Methods inherited from interface jet.pool.Identifiable
getIdentifier
 

Field Detail

validations

private java.util.List<ValidationRule> validations
validation rules


events

private java.util.List<HTMLElementEvent> events
events


sevents

private java.lang.String sevents
Holds the events already in rendered state


HIDDEN

public static final java.lang.String HIDDEN
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
See Also:
Constant Field Values

TEXTINPUT

public static final java.lang.String TEXTINPUT
See Also:
Constant Field Values

TEXTAREA

public static final java.lang.String TEXTAREA
See Also:
Constant Field Values

inputtype

private java.lang.String inputtype
holds the html input type to use

Constructor Detail

JetInput

public JetInput(java.lang.String identifier)
Creates new Component - name and styleclass would be the same as identifier

Parameters:
identifier - the identifier

JetInput

public JetInput(java.lang.String identifier,
                java.lang.String styleclass)
Creates new Component

Parameters:
identifier - the identifier
styleclass - the css style class

JetInput

public JetInput(java.lang.String identifier,
                java.lang.String name,
                java.lang.String styleclass)
Creates new Component

Parameters:
identifier - the identifier
name - the name of the component if different to identifier
styleclass - the css style class
Method Detail

decodeForm

public void decodeForm(java.lang.StringBuilder builder,
                       JetContext jetContext)
This method decodes the form to the given buffer

Specified by:
decodeForm in interface Decodeable
Specified by:
decodeForm in interface JetComponent
Specified by:
decodeForm in interface JetInput
Specified by:
decodeForm in class JetComponent
Parameters:
builder - builder to use

getInputtype

public java.lang.String getInputtype()
Returns the input type

Specified by:
getInputtype in interface JetInput
Returns:
the input type

setInputType

public void setInputType(java.lang.String inputtype)
Set the input type

Specified by:
setInputType in interface JetInput
Parameters:
inputtype - the input type to use

clone

public java.lang.Object clone()
This method generates a clone of the curent one

Specified by:
clone in interface JetComponent
Specified by:
clone in interface JetInput
Specified by:
clone in class JetComponent
Returns:
Object the clone

addValidationRule

public void addValidationRule(ValidationRule rule)
Description copied from interface: ValidationComponent
Method to add validation rules

Specified by:
addValidationRule in interface JetInput
Specified by:
addValidationRule in interface ValidationComponent
Parameters:
rule - ValidationRule
See Also:
ValidationComponent.addValidationRule( jet.validation.ValidationRule )

hasValidationRules

public boolean hasValidationRules()
Description copied from interface: ValidationComponent
Method to indicate if validation exists

Specified by:
hasValidationRules in interface JetInput
Specified by:
hasValidationRules in interface ValidationComponent
See Also:
ValidationComponent.hasValidationRules( )

getValidationRules

public java.util.List getValidationRules()
Returns only a cloned list of validations

Specified by:
getValidationRules in interface JetInput
Specified by:
getValidationRules in interface ValidationComponent
Returns:
List ValidationRules
See Also:
ValidationComponent.getValidationRules( )

addEvent

public void addEvent(HTMLElementEvent event)
Description copied from interface: JetInputComponent
Method to add event

Specified by:
addEvent in interface JetInput
Specified by:
addEvent in interface JetInputComponent
Parameters:
event - event
See Also:
JetInputComponent.addEvent( jet.html.core.HTMLElementEvent )

hasEvents

public boolean hasEvents()
Description copied from interface: JetInputComponent
Method to indicate if events exists

Specified by:
hasEvents in interface JetInput
Specified by:
hasEvents in interface JetInputComponent
See Also:
JetInputComponent.hasEvents()

hasEvent

public boolean hasEvent(HTMLElementEvent event)
Description copied from interface: JetInputComponent
Method to indicate if aspecial event exist

Specified by:
hasEvent in interface JetInput
Specified by:
hasEvent in interface JetInputComponent
See Also:
JetInputComponent.hasEvent( jet.html.core.HTMLElementEvent )

getEvents

public java.util.List getEvents()
Description copied from interface: JetInputComponent
Method to get events

Specified by:
getEvents in interface JetInput
Specified by:
getEvents in interface JetInputComponent
Returns:
List HTMLElementEvent
See Also:
JetInputComponent.getEvents()

reset

public void reset()
jet.html.core.JetInputComponent#reset()

Specified by:
reset in interface JetInput
Specified by:
reset in interface JetInputComponent
Specified by:
reset in interface Resetable