| 
||||||||||
| 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 identifier
public JetSelection(java.lang.String identifier,
                    java.lang.String styleclass)
identifier - the identifierstyleclass - the css style class
public 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 class| Method Detail | 
|---|
public void encode(java.util.Map requestParameters)
encode in interface JetInputComponentencode in interface JetSelectionrequestParameters - request parameters
public java.lang.String decodeGetString(JetContext jetContext)
                                 throws java.io.UnsupportedEncodingException
decodeGetString in interface JetInputComponentdecodeGetString in interface JetSelectionjava.io.UnsupportedEncodingException
public void decodeForm(java.lang.StringBuilder builder,
                       JetContext jetContext)
decodeForm in interface DecodeabledecodeForm in interface JetComponentdecodeForm in interface JetSelectiondecodeForm in class JetComponentbuilder - builder to usepublic java.lang.String getValue()
getValue in interface JetInputComponentgetValue in interface JetSelection
protected java.lang.String getGetDisplayValue(JetContext jetContext)
                                       throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic java.lang.String[] getValues()
getValues in interface JetSelectionpublic void setValue(java.lang.String value)
setValue in interface JetInputComponentsetValue in interface JetSelectionvalue - the valuepublic void setValues(java.lang.String[] values)
setValues in interface JetSelectionvalues - the values selectedpublic void reset()
reset in interface JetInputComponentreset in interface JetSelectionreset in interface Resetablepublic java.lang.Object clone()
clone in interface JetComponentclone in interface JetSelectionclone in class JetComponentpublic java.util.List<JetOption> getOptions()
getOptions in interface JetSelectionpublic void setOptions(java.util.List<JetOption> options)
setOptions in interface JetSelectionpublic java.util.List<JetOption> getDefaultOptions()
getDefaultOptions in interface JetSelectionpublic void setDefaultOptions(java.util.List<JetOption> defaultOptions)
setDefaultOptions in interface JetSelectionpublic void addOption(JetOption option)
addOption in interface JetSelectionoption - to addpublic void addDefaultOption(JetOption option)
addDefaultOption in interface JetSelectionoption - to addpublic boolean getMultiple()
getMultiple in interface JetSelectionpublic void setMultiple(java.lang.String multiple)
setMultiple in interface JetSelectionpublic void addValidationRule(ValidationRule rule)
ValidationComponent
addValidationRule in interface JetSelectionaddValidationRule in interface ValidationComponentrule - ValidationRuleValidationComponent.addValidationRule( ValidationRule )public boolean hasValidationRules()
ValidationComponent
hasValidationRules in interface JetSelectionhasValidationRules in interface ValidationComponentValidationComponent.hasValidationRules( )public java.util.List getValidationRules()
getValidationRules in interface JetSelectiongetValidationRules in interface ValidationComponentValidationComponent.getValidationRules( )public void addEvent(HTMLElementEvent event)
JetInputComponent
addEvent in interface JetInputComponentaddEvent in interface JetSelectionevent - eventJetInputComponent.addEvent( jet.html.core.HTMLElementEvent )public boolean hasEvents()
JetInputComponent
hasEvents in interface JetInputComponenthasEvents in interface JetSelectionJetInputComponent.hasEvents()public boolean hasEvent(HTMLElementEvent event)
JetInputComponent
hasEvent in interface JetInputComponenthasEvent in interface JetSelectionJetInputComponent.hasEvent( jet.html.core.HTMLElementEvent )public java.util.List getEvents()
JetInputComponent
getEvents in interface JetInputComponentgetEvents in interface JetSelectionJetInputComponent.getEvents()public boolean hasValue()
hasValue in interface JetInputComponenthasValue in interface JetSelectionJetInputComponent.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 JetInputComponentjava.io.UnsupportedEncodingExceptionpublic void setHidden(boolean hidden)
setHidden in interface JetInputComponent
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||