| org.zkoss.jsf.zul.impl.AbstractComponent org.zkoss.jsf.zul.impl.LeafComponent org.zkoss.jsf.zul.impl.BranchComponent org.zkoss.jsf.zul.impl.BranchOutput org.zkoss.jsf.zul.impl.BranchInput
All known Subclasses: org.zkoss.jsf.zul.Bandbox, org.zkoss.jsf.zul.impl.BaseCheckbox, org.zkoss.jsf.zul.impl.BaseListbox, org.zkoss.jsf.zul.impl.BaseDatebox, org.zkoss.jsf.zul.impl.BaseRadiogroup, org.zkoss.jsf.zul.impl.BaseSlider, org.zkoss.jsf.zul.impl.BaseTimebox, org.zkoss.jsf.zul.impl.BaseTree, org.zkoss.jsf.zul.Combobox, org.zkoss.jsf.zul.impl.BaseCalendar, org.zkoss.jsf.zul.Textbox, org.zkoss.jsf.zul.impl.BaseDecimalbox, org.zkoss.jsf.zul.impl.BaseDoublebox, org.zkoss.jsf.zul.impl.BaseIntbox,
Method Summary | |
protected void | addErrorMessage(FacesContext context, UIComponent component, String messageId, Object[] parms) | public void | addValidator(Validator validator) | public void | addValueChangeListener(ValueChangeListener listener) | protected void | afterZULComponentComposed(Component zulcomp) Override Method, if instance implements
ClientInputSupport (for now, it is always ), then i will try to set the name/value which get from
ClientInputSupport into zulcomp. | public void | broadcast(FacesEvent event) | protected void | clientInputDecode(FacesContext context) Decode value in request's parameter. | protected boolean | compareValues(Object previous, Object value) | public void | decode(FacesContext context) | protected Object | getConvertedValue(FacesContext context, Object submittedValue) Convert the provided object to the desired value.
If there is a renderer for this component, then call the renderer's
getConvertedValue method. | public String | getInputAttributeName() Return ZUL Component attribute name which can handler the submition of
input. | public String | getInputAttributeValue() Return ZUL Component attribute value which can handler the submition of
input. | public Object | getSubmittedValue() | public MethodBinding | getValidator() | public Validator[] | getValidators() | public MethodBinding | getValueChangeListener() | public ValueChangeListener[] | getValueChangeListeners() | public boolean | isImmediate() | public boolean | isRequired() | public boolean | isValid() | public void | processDecodes(FacesContext context) Set the "submitted value" of this component from the relevant data in the
current servlet request object.
If this component is not rendered, then do nothing; no output would have
been sent to the client so no input is expected.
Invoke the inherited functionality, which typically invokes the renderer
associated with this component to extract and set this component's
"submitted value".
If this component is marked "immediate", then immediately apply
validation to the submitted value found. | public void | processUpdates(FacesContext context) | public void | processValidators(FacesContext context)
In addition to the standard processValidators behavior
inherited from
javax.faces.component.UIComponentBase , calls
validate() if the immediate property is
false (which is the default); if the component is invalid afterwards,
calls
javax.faces.context.FacesContext.renderResponse . | public void | removeValidator(Validator validator) | public void | removeValueChangeListener(ValueChangeListener listener) | public void | restoreState(FacesContext context, Object state) Override Method, restore the state of this component. | public Object | saveState(FacesContext context) Override Method, save the state of this component. | public void | setImmediate(boolean immediate) | public void | setRequired(boolean required) | public void | setSubmittedValue(Object submittedValue) | public void | setValid(boolean valid) | public void | setValidator(MethodBinding validatorBinding) | public void | setValueChangeListener(MethodBinding valueChangeMethod) | public void | updateModel(FacesContext context) | public void | validate(FacesContext context) Determine whether the new value is valid, and queue a ValueChangeEvent if
necessary.
The "submitted value" is converted to the necessary type; conversion
failure is reported as an error and validation processing terminates for
this component. | protected void | validateValue(FacesContext context, Object convertedValue) |
addErrorMessage | protected void addErrorMessage(FacesContext context, UIComponent component, String messageId, Object[] parms)(Code) | | |
addValidator | public void addValidator(Validator validator)(Code) | | |
addValueChangeListener | public void addValueChangeListener(ValueChangeListener listener)(Code) | | |
afterZULComponentComposed | protected void afterZULComponentComposed(Component zulcomp)(Code) | | Override Method, if instance implements
ClientInputSupport (for now, it is always ), then i will try to set the name/value which get from
ClientInputSupport into zulcomp. For Example of TextboxComponent, a
name=form:compid will set to zulcomp and the result in HTML will likes
(<input id="z_fm_2c" type="text"
name="helloForm:txt1" value="0"
z.type="zul.widget.Txbox"/> ). And then , after form submit,
I can decode the submitted value from request by name "helloForm:txt1".
|
broadcast | public void broadcast(FacesEvent event) throws AbortProcessingException(Code) | | |
clientInputDecode | protected void clientInputDecode(FacesContext context)(Code) | | Decode value in request's parameter. call by
BranchInput.decode |
getConvertedValue | protected Object getConvertedValue(FacesContext context, Object submittedValue)(Code) | | Convert the provided object to the desired value.
If there is a renderer for this component, then call the renderer's
getConvertedValue method. While this can of course be implemented in any
way the renderer desires, it typically performs exactly the same
processing that this method would have done anyway (ie that described
below for the no-renderer case).
Otherwise:
- If the submittedValue is not a String then just return the
submittedValue unconverted.
- If there is no "value" value-binding then just return the
submittedValue unconverted.
- Use introspection to determine the type of the target property
specified by the value-binding, and then use Application.createConverter
to find a converter that can map from String to the required type. Apply
the converter to the submittedValue and return the result.
|
getInputAttributeName | public String getInputAttributeName()(Code) | | Return ZUL Component attribute name which can handler the submition of
input.
Note : Default is "name"
See Also: ClientInputSupport |
getInputAttributeValue | public String getInputAttributeValue()(Code) | | Return ZUL Component attribute value which can handler the submition of
input.
See Also: ClientInputSupport See Also: javax.faces.component.UIComponent.getClientId(FacesContext) |
getValidator | public MethodBinding getValidator()(Code) | | |
getValidators | public Validator[] getValidators()(Code) | | |
getValueChangeListener | public MethodBinding getValueChangeListener()(Code) | | |
getValueChangeListeners | public ValueChangeListener[] getValueChangeListeners()(Code) | | |
isImmediate | public boolean isImmediate()(Code) | | |
isRequired | public boolean isRequired()(Code) | | |
isValid | public boolean isValid()(Code) | | |
processDecodes | public void processDecodes(FacesContext context)(Code) | | Set the "submitted value" of this component from the relevant data in the
current servlet request object.
If this component is not rendered, then do nothing; no output would have
been sent to the client so no input is expected.
Invoke the inherited functionality, which typically invokes the renderer
associated with this component to extract and set this component's
"submitted value".
If this component is marked "immediate", then immediately apply
validation to the submitted value found. On error, call context method
"renderResponse" which will force processing to leap to the "render
response" phase as soon as the "decode" step has completed for all other
components.
|
processUpdates | public void processUpdates(FacesContext context)(Code) | | |
processValidators | public void processValidators(FacesContext context)(Code) | |
In addition to the standard processValidators behavior
inherited from
javax.faces.component.UIComponentBase , calls
validate() if the immediate property is
false (which is the default); if the component is invalid afterwards,
calls
javax.faces.context.FacesContext.renderResponse . If a
RuntimeException is thrown during validation processing,
calls
javax.faces.context.FacesContext.renderResponse and
re-throw the exception.
exception: NullPointerException - |
removeValidator | public void removeValidator(Validator validator)(Code) | | |
removeValueChangeListener | public void removeValueChangeListener(ValueChangeListener listener)(Code) | | |
restoreState | public void restoreState(FacesContext context, Object state)(Code) | | Override Method, restore the state of this component.
|
saveState | public Object saveState(FacesContext context)(Code) | | Override Method, save the state of this component.
|
setImmediate | public void setImmediate(boolean immediate)(Code) | | |
setRequired | public void setRequired(boolean required)(Code) | | |
setSubmittedValue | public void setSubmittedValue(Object submittedValue)(Code) | | |
setValid | public void setValid(boolean valid)(Code) | | |
setValidator | public void setValidator(MethodBinding validatorBinding)(Code) | | |
setValueChangeListener | public void setValueChangeListener(MethodBinding valueChangeMethod)(Code) | | |
updateModel | public void updateModel(FacesContext context)(Code) | | |
validate | public void validate(FacesContext context)(Code) | | Determine whether the new value is valid, and queue a ValueChangeEvent if
necessary.
The "submitted value" is converted to the necessary type; conversion
failure is reported as an error and validation processing terminates for
this component. See documentation for method getConvertedValue for
details on the conversion process.
Any validators attached to this component are then run, passing the
converted value.
The old value of this component is then fetched (possibly involving the
evaluation of a value-binding expression, ie invoking a method on a user
object). The old value is compared to the new validated value, and if
they are different then a ValueChangeEvent is queued for later
processing.
On successful completion of this method:
- isValid() is true
- isLocalValueSet() is true
- submittedValue is reset to null
- a ValueChangeEvent is queued if the new value != old value
|
validateValue | protected void validateValue(FacesContext context, Object convertedValue)(Code) | | |
|
|