|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjet.html.core.JetComponent
jet.html.core.JetChildComponent
jet.html.impl.JetSelection
public class JetSelection
This class renders a selection box
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface jet.html.JetChildComponent |
---|
JetChildComponent.HasNoParent |
Field Summary | |
---|---|
private java.util.List<JetOption> |
defaultOptions
holds the available default not resetable options |
private java.util.List<HTMLElementEvent> |
events
events |
private boolean |
multiple
indicates if the selection is multiple |
private java.util.List<JetOption> |
options
holds the available options |
private java.lang.String |
sevents
Holds the events already in rendered state |
private java.util.List<ValidationRule> |
validations
validation rules |
private java.lang.String[] |
values
holds the values |
Fields inherited from class jet.html.core.JetComponent |
---|
eventSupport |
Constructor Summary | |
---|---|
JetSelection(java.lang.String identifier)
Creates new Component - name and styleclass would be the same as identifier |
|
JetSelection(java.lang.String identifier,
java.lang.String styleclass)
Creates new Component |
|
JetSelection(java.lang.String identifier,
java.lang.String name,
java.lang.String styleclass)
Creates new Component |
Method Summary | |
---|---|
void |
addDefaultOption(JetOption option)
adds a default option |
void |
addEvent(HTMLElementEvent event)
Method to add event |
void |
addOption(JetOption option)
adds a option |
void |
addValidationRule(ValidationRule rule)
Method to add validation rules |
java.lang.Object |
clone()
This method retruns a clone from the component |
void |
decodeForm(java.lang.StringBuilder builder,
JetContext jetContext)
This method decodes the form to the given buffer |
java.lang.String |
decodeGetString(JetContext jetContext)
decodes the component to URL-STRING |
void |
encode(java.util.Map requestParameters)
Encodes the needed parameteters |
java.util.List<JetOption> |
getDefaultOptions()
Returns the default options |
java.lang.String |
getDisplayValue(java.lang.String encoding)
|
java.util.List |
getEvents()
Method to get events |
java.lang.String |
getFormDisplayValue()
|
protected java.lang.String |
getGetDisplayValue(JetContext jetContext)
Returns the value encoded for GET String |
boolean |
getMultiple()
Returns if the selection is multiple selectable |
java.util.List<JetOption> |
getOptions()
Returns a list of available the options |
java.util.List |
getValidationRules()
Returns only a cloned list - not the real one |
java.lang.String |
getValue()
Returns the first value! |
java.lang.String[] |
getValues()
Returns a cloned arraycontaining all values selected |
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 |
boolean |
hasValue()
|
void |
reset()
This method resets the object for reuse |
void |
setDefaultOptions(java.util.List<JetOption> defaultOptions)
Set the default options which can be selected |
void |
setHidden(boolean hidden)
|
void |
setMultiple(java.lang.String multiple)
Set if the option supports multiple selections |
void |
setOptions(java.util.List<JetOption> options)
Set the options which can be selected |
void |
setValue(java.lang.String value)
Set the first value |
void |
setValues(java.lang.String[] values)
Set the values selected |
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.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 |
---|
private java.util.List<ValidationRule> validations
private java.util.List<HTMLElementEvent> events
private java.lang.String sevents
private java.lang.String[] values
private boolean multiple
private java.util.List<JetOption> options
private java.util.List<JetOption> defaultOptions
Constructor Detail |
---|
public JetSelection(java.lang.String identifier)
identifier
- the identifierpublic JetSelection(java.lang.String identifier, java.lang.String styleclass)
identifier
- the identifierstyleclass
- the css style classpublic JetSelection(java.lang.String identifier, java.lang.String name, java.lang.String styleclass)
identifier
- the identifiername
- the name of the component if different to identifierstyleclass
- the css style classMethod Detail |
---|
public void encode(java.util.Map requestParameters)
encode
in interface JetInputComponent
encode
in interface JetSelection
requestParameters
- request parameterspublic java.lang.String decodeGetString(JetContext jetContext) throws java.io.UnsupportedEncodingException
decodeGetString
in interface JetInputComponent
decodeGetString
in interface JetSelection
java.io.UnsupportedEncodingException
public void decodeForm(java.lang.StringBuilder builder, JetContext jetContext)
decodeForm
in interface Decodeable
decodeForm
in interface JetComponent
decodeForm
in interface JetSelection
decodeForm
in class JetComponent
builder
- builder to usepublic java.lang.String getValue()
getValue
in interface JetInputComponent
getValue
in interface JetSelection
protected java.lang.String getGetDisplayValue(JetContext jetContext) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public java.lang.String[] getValues()
getValues
in interface JetSelection
public void setValue(java.lang.String value)
setValue
in interface JetInputComponent
setValue
in interface JetSelection
value
- the valuepublic void setValues(java.lang.String[] values)
setValues
in interface JetSelection
values
- the values selectedpublic void reset()
reset
in interface JetInputComponent
reset
in interface JetSelection
reset
in interface Resetable
public java.lang.Object clone()
clone
in interface JetComponent
clone
in interface JetSelection
clone
in class JetComponent
public java.util.List<JetOption> getOptions()
getOptions
in interface JetSelection
public void setOptions(java.util.List<JetOption> options)
setOptions
in interface JetSelection
public java.util.List<JetOption> getDefaultOptions()
getDefaultOptions
in interface JetSelection
public void setDefaultOptions(java.util.List<JetOption> defaultOptions)
setDefaultOptions
in interface JetSelection
public void addOption(JetOption option)
addOption
in interface JetSelection
option
- to addpublic void addDefaultOption(JetOption option)
addDefaultOption
in interface JetSelection
option
- to addpublic boolean getMultiple()
getMultiple
in interface JetSelection
public void setMultiple(java.lang.String multiple)
setMultiple
in interface JetSelection
public void addValidationRule(ValidationRule rule)
ValidationComponent
addValidationRule
in interface JetSelection
addValidationRule
in interface ValidationComponent
rule
- ValidationRuleValidationComponent.addValidationRule( ValidationRule )
public boolean hasValidationRules()
ValidationComponent
hasValidationRules
in interface JetSelection
hasValidationRules
in interface ValidationComponent
ValidationComponent.hasValidationRules( )
public java.util.List getValidationRules()
getValidationRules
in interface JetSelection
getValidationRules
in interface ValidationComponent
ValidationComponent.getValidationRules( )
public void addEvent(HTMLElementEvent event)
JetInputComponent
addEvent
in interface JetInputComponent
addEvent
in interface JetSelection
event
- eventJetInputComponent.addEvent( jet.html.core.HTMLElementEvent )
public boolean hasEvents()
JetInputComponent
hasEvents
in interface JetInputComponent
hasEvents
in interface JetSelection
JetInputComponent.hasEvents()
public boolean hasEvent(HTMLElementEvent event)
JetInputComponent
hasEvent
in interface JetInputComponent
hasEvent
in interface JetSelection
JetInputComponent.hasEvent( jet.html.core.HTMLElementEvent )
public java.util.List getEvents()
JetInputComponent
getEvents
in interface JetInputComponent
getEvents
in interface JetSelection
JetInputComponent.getEvents()
public boolean hasValue()
hasValue
in interface JetInputComponent
hasValue
in interface JetSelection
JetInputComponent.hasValue()
public java.lang.String getFormDisplayValue()
getFormDisplayValue
in interface JetInputComponent
public java.lang.String getDisplayValue(java.lang.String encoding) throws java.io.UnsupportedEncodingException
getDisplayValue
in interface JetInputComponent
java.io.UnsupportedEncodingException
public void setHidden(boolean hidden)
setHidden
in interface JetInputComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |