Java Doc for BranchInput.java in  » Ajax » zk » org » zkoss » jsf » zul » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » zk » org.zkoss.jsf.zul.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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,
BranchInput
abstract public class BranchInput extends BranchOutput implements EditableValueHolder,ClientInputSupport(Code)
The skeletal class used to implement the ZULJSF components which needs to support javax.faces.component.EditableValueHolder .
Components should be declared nested under org.zkoss.jsf.zul.Page . see Javadoc of JSF Specification
author:
   Dennis.Chen


Field Summary
 List_validatorList
    


Method Summary
protected  voidaddErrorMessage(FacesContext context, UIComponent component, String messageId, Object[] parms)
    
public  voidaddValidator(Validator validator)
    
public  voidaddValueChangeListener(ValueChangeListener listener)
    
protected  voidafterZULComponentComposed(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  voidbroadcast(FacesEvent event)
    
protected  voidclientInputDecode(FacesContext context)
     Decode value in request's parameter.
protected  booleancompareValues(Object previous, Object value)
    
public  voiddecode(FacesContext context)
    
protected  ObjectgetConvertedValue(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  StringgetInputAttributeName()
     Return ZUL Component attribute name which can handler the submition of input.
public  StringgetInputAttributeValue()
     Return ZUL Component attribute value which can handler the submition of input.
public  ObjectgetSubmittedValue()
    
public  MethodBindinggetValidator()
    
public  Validator[]getValidators()
    
public  MethodBindinggetValueChangeListener()
    
public  ValueChangeListener[]getValueChangeListeners()
    
public  booleanisImmediate()
    
public  booleanisRequired()
    
public  booleanisValid()
    
public  voidprocessDecodes(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  voidprocessUpdates(FacesContext context)
    
public  voidprocessValidators(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  voidremoveValidator(Validator validator)
    
public  voidremoveValueChangeListener(ValueChangeListener listener)
    
public  voidrestoreState(FacesContext context, Object state)
     Override Method, restore the state of this component.
public  ObjectsaveState(FacesContext context)
     Override Method, save the state of this component.
public  voidsetImmediate(boolean immediate)
    
public  voidsetRequired(boolean required)
    
public  voidsetSubmittedValue(Object submittedValue)
    
public  voidsetValid(boolean valid)
    
public  voidsetValidator(MethodBinding validatorBinding)
    
public  voidsetValueChangeListener(MethodBinding valueChangeMethod)
    
public  voidupdateModel(FacesContext context)
    
public  voidvalidate(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  voidvalidateValue(FacesContext context, Object convertedValue)
    

Field Detail
_validatorList
List _validatorList(Code)





Method Detail
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



compareValues
protected boolean compareValues(Object previous, Object value)(Code)



decode
public void decode(FacesContext context)(Code)

exception:
  NullPointerException -



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)



getSubmittedValue
public Object getSubmittedValue()(Code)



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)



Methods inherited from org.zkoss.jsf.zul.impl.BranchOutput
protected void afterZULComponentComposed(Component zulcomp)(Code)(Java Doc)
public Converter getConverter()(Code)(Java Doc)
public Object getLocalValue()(Code)(Java Doc)
public String getMappedAttributeName()(Code)(Java Doc)
public Object getValue()(Code)(Java Doc)
public boolean isLocalValueSet()(Code)(Java Doc)
public void restoreState(FacesContext context, Object state)(Code)(Java Doc)
public Object saveState(FacesContext context)(Code)(Java Doc)
public void setConverter(Converter converter)(Code)(Java Doc)
public void setLocalValueSet(boolean localValueSet)(Code)(Java Doc)
public void setValue(Object value)(Code)(Java Doc)
public Object transferValueForAttribute(String value)(Code)(Java Doc)

Methods inherited from org.zkoss.jsf.zul.impl.BranchComponent
void addChildZULComponent(LeafComponent child)(Code)(Java Doc)
protected void loadZULTree(org.zkoss.zk.ui.Page page, StringWriter writer) throws IOException(Code)(Java Doc)

Fields inherited from org.zkoss.jsf.zul.impl.LeafComponent
protected Map _compAttrMap(Code)(Java Doc)
protected ComposerHandler _composer(Code)(Java Doc)
boolean _idSet(Code)(Java Doc)
BranchComponent _parentcomp(Code)(Java Doc)
RootComponent _rootcomp(Code)(Java Doc)
Component _zulcomp(Code)(Java Doc)
ResponseWriter fakeOw(Code)(Java Doc)
StringWriter fakeSw(Code)(Java Doc)

Methods inherited from org.zkoss.jsf.zul.impl.LeafComponent
protected void addZULDynamicAttribute(String name, Object value)(Code)(Java Doc)
void afterComposeComponent()(Code)(Java Doc)
protected void afterZULComponentComposed(Component zulcomp)(Code)(Java Doc)
public void encodeBegin(FacesContext context) throws IOException(Code)(Java Doc)
public void encodeChildren(FacesContext context) throws IOException(Code)(Java Doc)
public void encodeEnd(FacesContext context) throws IOException(Code)(Java Doc)
protected void evaluateDynaAttributes(Component target, Map zulAttrMap) throws ModificationException, NoSuchMethodException(Code)(Java Doc)
public Object getAttributeValue(String att)(Code)(Java Doc)
protected String getComponentDefName()(Code)(Java Doc)
protected ComponentInfo getComponentInfo()(Code)(Java Doc)
public String getForward()(Code)(Java Doc)
BranchComponent getParentComponent()(Code)(Java Doc)
public boolean getRendersChildren()(Code)(Java Doc)
RootComponent getRootComponent()(Code)(Java Doc)
UIForm getUIForm()(Code)(Java Doc)
public String getUse()(Code)(Java Doc)
protected Component getZULComponent()(Code)(Java Doc)
void initComponent(org.zkoss.zk.ui.Page page)(Code)(Java Doc)
protected void loadZULTree(org.zkoss.zk.ui.Page page, StringWriter writer) throws IOException(Code)(Java Doc)
public void restoreState(FacesContext context, Object state)(Code)(Java Doc)
public Object saveState(FacesContext context)(Code)(Java Doc)
public void setAttributeValue(String att, Object value)(Code)(Java Doc)
public void setForward(String forward)(Code)(Java Doc)
public void setId(String id)(Code)(Java Doc)
public void setUse(String use)(Code)(Java Doc)
void setZULCustomAttribute(Map map)(Code)(Java Doc)
public void setZULDynamicAttribute(Map map)(Code)(Java Doc)
void writeComponentMark(Writer writer) throws IOException(Code)(Java Doc)

Methods inherited from org.zkoss.jsf.zul.impl.AbstractComponent
protected UIComponent findAncestorWithClass(UIComponent component, Class clazz)(Code)(Java Doc)
protected String getBodyContent()(Code)(Java Doc)
protected ComponentInfo getComponentInfo()(Code)(Java Doc)
public FacesContext getFacesContext()(Code)(Java Doc)
public String getFamily()(Code)(Java Doc)
public boolean getIf()(Code)(Java Doc)
public boolean getUnless()(Code)(Java Doc)
public boolean isEffective()(Code)(Java Doc)
protected boolean isSuppressed()(Code)(Java Doc)
protected void loadZULTree(org.zkoss.zk.ui.Page page, StringWriter writer) throws IOException(Code)(Java Doc)
protected static Map restoreAttachedMapState(FacesContext context, Object keys, Object values)(Code)(Java Doc)
public void restoreState(FacesContext context, Object state)(Code)(Java Doc)
protected static Object[] saveAttachedMapState(FacesContext context, Map mapObject)(Code)(Java Doc)
public Object saveState(FacesContext context)(Code)(Java Doc)
public void setBodyContent(String content)(Code)(Java Doc)
public void setIf(boolean ifcond)(Code)(Java Doc)
public void setSuppressed(boolean suppressed)(Code)(Java Doc)
public void setUnless(boolean unless)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.