Java Doc for Tree.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » rave » web » ui » component » 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 » IDE Netbeans » visualweb.api.designer » com.sun.rave.web.ui.component 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.rave.web.ui.component.TemplateComponentBase
   com.sun.rave.web.ui.component.TreeNodeBase
      com.sun.rave.web.ui.component.TreeNode
         com.sun.rave.web.ui.component.TreeBase
            com.sun.rave.web.ui.component.Tree

Tree
public class Tree extends TreeBase implements EditableValueHolder(Code)

author:
   Ken Paulsen (ken.paulsen@sun.com)


Field Summary
final public static  StringCOOKIE_SUFFIX
    
final public static  StringCOOKIE_SUFFIX_EXPAND
    
final public static  StringJAVA_SCRIPT_THEME_KEY
    
final public static  StringLAYOUT_KEY
    

This is the location of the XML file that declares the layout for the PanelGroup.

final public static  StringSELECTED_SUFFIX
    

This is the suffix appended to the client id when forming a request attribute key.


Constructor Summary
public  Tree()
     Constructor.

Method Summary
public  voidaddValidator(Validator validator)
    
public  voidaddValueChangeListener(ValueChangeListener listener)
    
public  voidbroadcast(FacesEvent event)
    
public  voiddecode(FacesContext context)
    
public  ConvertergetConverter()
    
public  StringgetCookieExpandNode()
    

This method will return the TreeNode client ID that is selected according the browser cookie.

public  StringgetCookieSelectedTreeNode()
    

This method returns the TreeNode client ID that is selected according the browser cookie.

public  ObjectgetLocalValue()
    
public  StringgetSelected()
    
public  ObjectgetSubmittedValue()
    

Return the submittedValue value of this component.

public  MethodBindinggetValidator()
    

Return a MethodBinding pointing at a method that will be used to validate the current value of this component.

public  Validator[]getValidators()
    

Return the set of registered Validators for this component instance.

public  ObjectgetValue()
    

Gets the value of this UIComponent .

public  MethodBindinggetValueChangeListener()
    

Return a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change.

public  ValueChangeListener[]getValueChangeListeners()
    

Return the set of registered ValueChangeListeners for this component instance.

protected  booleanisDifferent(Object val1, Object val2)
    
public  booleanisLocalValueSet()
    

Return the "local value set" state for this component.

public  booleanisValid()
    
public  voidprocessDecodes(FacesContext context)
    
public  voidprocessUpdates(FacesContext context)
    
public  voidprocessValidators(FacesContext context)
    

In addition to the standard processValidators behavior inherited from UIComponentBases, calls validate() if the immediate property is false (which is the default); if the component is invalid afterwards, calls FacesContext.renderResponse.

public  voidremoveValidator(Validator validator)
    

Remove a Validator instance from the set associated with this component, if it was previously associated.

public  voidremoveValueChangeListener(ValueChangeListener listener)
    
public  voidrestoreState(FacesContext context, Object state)
    
public  ObjectsaveState(FacesContext context)
    
public  voidselectTreeNode(TreeNode treeNode)
    

This method accepts the TreeNode which is to be selected.

public  voidselectTreeNode(String clientId)
    

This method accepts the clientId of a TreeNode which is to be selected.

public  voidsetConverter(Converter conv)
    
public  voidsetLocalValueSet(boolean value)
    
public  voidsetSelected(String s)
    
public  voidsetSubmittedValue(Object value)
    

Set the submittedValue value of this component.

public  voidsetValid(boolean value)
    
public  voidsetValidator(MethodBinding valBinding)
    

Set a MethodBinding pointing at a method that will be used to validate the current value of this component.

public  voidsetValue(Object val)
    
public  voidsetValueChangeListener(MethodBinding method)
    

Set a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change.

public  voidupdateModel(FacesContext context)
    
public  voidvalidate(FacesContext context)
    

Perform the following algorithm to validate the local value of this UIInput.

  • Retrieve the submitted value with getSubmittedValue().
protected  voidvalidateValue(FacesContext context, Object newValue)
    

Field Detail
COOKIE_SUFFIX
final public static String COOKIE_SUFFIX(Code)

This is the suffix appended to the client id to form the key to the cookie Map needed to retrieve the tree selection.




COOKIE_SUFFIX_EXPAND
final public static String COOKIE_SUFFIX_EXPAND(Code)

This is the suffix appended to the client id to form the key to the cookie Map needed to retrieve the node that may need to be expanded (because it was just selected).




JAVA_SCRIPT_THEME_KEY
final public static String JAVA_SCRIPT_THEME_KEY(Code)

This is the com.sun.rave.web.ui.theme.Theme key used to retrieve the JavaScript needed for this component.


See Also:   com.sun.rave.web.ui.theme.Theme.getPathToJSFile(String)



LAYOUT_KEY
final public static String LAYOUT_KEY(Code)

This is the location of the XML file that declares the layout for the PanelGroup. (layout/tree.xml)




SELECTED_SUFFIX
final public static String SELECTED_SUFFIX(Code)

This is the suffix appended to the client id when forming a request attribute key. The value associated with the generated key indicates which node should be selected. The renderer uses this information to generate JavaScript to select this node, overriding the previous selection.





Constructor Detail
Tree
public Tree()(Code)
Constructor.




Method Detail
addValidator
public void addValidator(Validator validator)(Code)

Add a Validator instance to the set associated with this component.

Not implemented for this component.


Parameters:
  validator - The Validator to add.



addValueChangeListener
public void addValueChangeListener(ValueChangeListener listener)(Code)

Add a new ValueChangeListener to the set of listeners interested in being notified when ValueChangeEvents occur.


Parameters:
  listener - The ValueChangeListener to be added.



broadcast
public void broadcast(FacesEvent event) throws AbortProcessingException(Code)

In addition to to the default UIComponent#broadcast processing, pass the ValueChangeEvent being broadcast to the method referenced by valueChangeListener.


Parameters:
  event - FacesEvent to be broadcast
exception:
  AbortProcessingException - Signal the JSF implementationthat no further processing on the current event should be performed



decode
public void decode(FacesContext context)(Code)

Decode any new state of this UIComponent from the request contained in the specified FacesContext, and store this state as needed.

During decoding, events may be enqueued for later processing (by event listeners who have registered an interest), by calling queueEvent().


Parameters:
  context - FacesContext for the request we are processing.



getConverter
public Converter getConverter()(Code)

Return the Converter (if any) that is registered for this UIComponent.

Not implemented for this component.




getCookieExpandNode
public String getCookieExpandNode()(Code)

This method will return the TreeNode client ID that is selected according the browser cookie. This method is only useful during the decode process as the cookie will typically be reset to null immediately after the request is processed.

The selected tree node (according to the cookie).



getCookieSelectedTreeNode
public String getCookieSelectedTreeNode()(Code)

This method returns the TreeNode client ID that is selected according the browser cookie. This method is generally only useful during the decode process.

The selected tree node (according to the cookie).



getLocalValue
public Object getLocalValue()(Code)

Return the local value of this UIComponent (if any), without evaluating any associated ValueBinding.




getSelected
public String getSelected()(Code)



getSubmittedValue
public Object getSubmittedValue()(Code)

Return the submittedValue value of this component. This method should only be used by the encodeBegin() and/or encodeEnd() methods of this component, or its corresponding Renderer.




getValidator
public MethodBinding getValidator()(Code)

Return a MethodBinding pointing at a method that will be used to validate the current value of this component. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).

Not implemented for this component.




getValidators
public Validator[] getValidators()(Code)

Return the set of registered Validators for this component instance. If there are no registered validators, a zero-length array is returned.

Not implemented for this component.




getValue
public Object getValue()(Code)

Gets the value of this UIComponent . First, consult the local value property of this component. If non-null return it. If non-null, see if we have a ValueBinding for the value property. If so, return the result of evaluating the property, otherwise return null.




getValueChangeListener
public MethodBinding getValueChangeListener()(Code)

Return a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).




getValueChangeListeners
public ValueChangeListener[] getValueChangeListeners()(Code)

Return the set of registered ValueChangeListeners for this component instance. If there are no registered listeners, a zero-length array is returned.




isDifferent
protected boolean isDifferent(Object val1, Object val2)(Code)

Return true if the objects are not equal.


Parameters:
  val1 - Value 1
Parameters:
  val1 - Value 2 true if the 2 values are not equal



isLocalValueSet
public boolean isLocalValueSet()(Code)

Return the "local value set" state for this component. Calls to setValue() automatically reset this property to true.




isValid
public boolean isValid()(Code)

Return a flag indicating whether the local value of this component is valid (no conversion error has occurred).




processDecodes
public void processDecodes(FacesContext context)(Code)

Perform the component tree processing required by the Apply Request Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.

  • If the rendered property of this UIComponent is false, skip further processing.
  • Call the processDecodes() method of all facets and children of this UIComponent, in the order determined by a call to getFacetsAndChildren().
  • Call the decode() method of this component.
  • If a RuntimeException is thrown during decode processing, call FacesContext.renderResponse and re-throw the exception.

Parameters:
  context - FacesContext for the request.



processUpdates
public void processUpdates(FacesContext context)(Code)

Perform the component tree processing required by the Update Model Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.

  • If the rendered property of this UIComponent is false, skip further processing.
  • Call the processUpdates() method of all facets and children of this UIComponent , in the order determined by a call to getFacetsAndChildren().

Parameters:
  context - FacesContext for this request



processValidators
public void processValidators(FacesContext context)(Code)

In addition to the standard processValidators behavior inherited from UIComponentBases, calls validate() if the immediate property is false (which is the default); if the component is invalid afterwards, calls FacesContext.renderResponse. If a RuntimeException is thrown during validation processing, calls FacesContext.renderResponse and re-throws the exception.




removeValidator
public void removeValidator(Validator validator)(Code)

Remove a Validator instance from the set associated with this component, if it was previously associated. Otherwise, do nothing.

Not implemented for this component.


Parameters:
  validator - The Validator to remove.



removeValueChangeListener
public void removeValueChangeListener(ValueChangeListener listener)(Code)

Remove an existing ValueChangeListener (if any) from the set of listeners interested in being notified when ValueChangeEvents occur.


Parameters:
  listener - The ValueChangeListener to be removed.



restoreState
public void restoreState(FacesContext context, Object state)(Code)



saveState
public Object saveState(FacesContext context)(Code)



selectTreeNode
public void selectTreeNode(TreeNode treeNode)(Code)

This method accepts the TreeNode which is to be selected. The previous TreeNode that was selected will unselected. No state is saved with this operation, the state is maintained on the client.


Parameters:
  treeNode - The TreeNode to be selected.



selectTreeNode
public void selectTreeNode(String clientId)(Code)

This method accepts the clientId of a TreeNode which is to be selected. The previous TreeNode that was selected will unselected. No state is saved with this operation, the state is maintained on the client-side.


Parameters:
  clientId - Client id of the TreeNode to be selected.



setConverter
public void setConverter(Converter conv)(Code)

Set the Converter (if any) that is registered for this UIComponent.

Not implemented for this component.


Parameters:
  conv - New Converter (or null)



setLocalValueSet
public void setLocalValueSet(boolean value)(Code)

Sets the "local value set" state for this component.




setSelected
public void setSelected(String s)(Code)



setSubmittedValue
public void setSubmittedValue(Object value)(Code)

Set the submittedValue value of this component. This method should only be used by the decode() and validate() method of this component, or its corresponding Renderer.


Parameters:
  value - The new submitted value.



setValid
public void setValid(boolean value)(Code)

Set a flag indicating whether the local value of this component is valid (no conversion error has occurred).


Parameters:
  value - The new valid flag.



setValidator
public void setValidator(MethodBinding valBinding)(Code)

Set a MethodBinding pointing at a method that will be used to validate the current value of this component. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).

Any method referenced by such an expression must be public, with a return type of void, and accept parameters of type FacesContext, UIComponent, and Object.

Not implemented for this component.


Parameters:
  valBinding - The new MethodBinding instance.



setValue
public void setValue(Object val)(Code)

Set the value of this UIComponent (if any).


Parameters:
  val - The new local value



setValueChangeListener
public void setValueChangeListener(MethodBinding method)(Code)

Set a MethodBinding instance method that will be called after any registered ValueChangeListeners have been notified of a value change. This method will be called during the Process Validations or Apply Request Values phases (depending on the value of the immediate property).


Parameters:
  method - The new MethodBinding instance.



updateModel
public void updateModel(FacesContext context)(Code)

Perform the following algorithm to update the model data associated with this component, if any, as appropriate.

  • If the valid property of this component is false, take no further action.
  • If the localValueSet property of this component is false, take no further action.
  • If no ValueBinding for value exists, take no further action.
  • Call setValue() method of the ValueBinding to update the value that the ValueBinding points at.
  • If the setValue() method returns successfully:
    • Clear the local value of this component.
    • Set the localValueSet property of this component to false.
  • If the setValue() method call fails:
    • Queue an error message by calling addMessage() on the specified FacesContext instance.
    • Set the valid property of this component to false.

Parameters:
  context - FacesContext for the request we areprocessing.



validate
public void validate(FacesContext context)(Code)

Perform the following algorithm to validate the local value of this UIInput.

  • Retrieve the submitted value with getSubmittedValue(). If this returns null, exit without further processing. (This indicates that no value was submitted for this component.)
  • Convert the submitted value into a "local value" of the appropriate data type by calling getConvertedValue.
  • Validate the property by calling validateValue.
  • If the valid property of this component is still true, retrieve the previous value of the component (with getValue()), store the new local value using setValue(), and reset the submitted value to null. If the local value is different from the previous value of this component, fire a ValueChangeEvent to be broadcast to all interested listeners.

Parameters:
  context - FacesContext for the current request.



validateValue
protected void validateValue(FacesContext context, Object newValue)(Code)



Methods inherited from com.sun.rave.web.ui.component.TreeBase
public String getFamily()(Code)(Java Doc)
public String getSelected()(Code)(Java Doc)
public String getStyle()(Code)(Java Doc)
public String getStyleClass()(Code)(Java Doc)
public String getText()(Code)(Java Doc)
public boolean isClientSide()(Code)(Java Doc)
public boolean isExpandOnSelect()(Code)(Java Doc)
public boolean isImmediate()(Code)(Java Doc)
public boolean isRequired()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
public void restoreState(FacesContext _context, Object _state)(Code)(Java Doc)
public Object saveState(FacesContext _context)(Code)(Java Doc)
public void setClientSide(boolean clientSide)(Code)(Java Doc)
public void setExpandOnSelect(boolean expandOnSelect)(Code)(Java Doc)
public void setImmediate(boolean immediate)(Code)(Java Doc)
public void setRequired(boolean required)(Code)(Java Doc)
public void setSelected(String selected)(Code)(Java Doc)
public void setStyle(String style)(Code)(Java Doc)
public void setStyleClass(String styleClass)(Code)(Java Doc)
public void setText(String text)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)

Fields inherited from com.sun.rave.web.ui.component.TreeNode
final public static String CONTENT_FACET_KEY(Code)(Java Doc)
final public static String IMAGE_FACET_KEY(Code)(Java Doc)
final public static String LAYOUT_KEY(Code)(Java Doc)

Methods inherited from com.sun.rave.web.ui.component.TreeNode
public void addActionListener(ActionListener listener)(Code)(Java Doc)
public void fireTurnerEvent(ActionEvent event) throws AbortProcessingException(Code)(Java Doc)
public ActionListener[] getActionListeners()(Code)(Java Doc)
protected String getHandleIcon(String value)(Code)(Java Doc)
public List getImageKeys()(Code)(Java Doc)
public static TreeNode getParentTreeNode(UIComponent node)(Code)(Java Doc)
public void removeActionListener(ActionListener listener)(Code)(Java Doc)
public void toggleNode(ActionEvent event) throws AbortProcessingException(Code)(Java Doc)

Methods inherited from com.sun.rave.web.ui.component.TreeNodeBase
public javax.faces.el.MethodBinding getAction()(Code)(Java Doc)
public javax.faces.el.MethodBinding getActionListener()(Code)(Java Doc)
public String getFamily()(Code)(Java Doc)
public String getImageURL()(Code)(Java Doc)
public String getStyle()(Code)(Java Doc)
public String getStyleClass()(Code)(Java Doc)
public String getTarget()(Code)(Java Doc)
public String getText()(Code)(Java Doc)
public String getToolTip()(Code)(Java Doc)
public String getUrl()(Code)(Java Doc)
public boolean isExpanded()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
public void restoreState(FacesContext _context, Object _state)(Code)(Java Doc)
public Object saveState(FacesContext _context)(Code)(Java Doc)
public void setAction(javax.faces.el.MethodBinding action)(Code)(Java Doc)
public void setActionListener(javax.faces.el.MethodBinding actionListener)(Code)(Java Doc)
public void setExpanded(boolean expanded)(Code)(Java Doc)
public void setImageURL(String imageURL)(Code)(Java Doc)
public void setStyle(String style)(Code)(Java Doc)
public void setStyleClass(String styleClass)(Code)(Java Doc)
public void setTarget(String target)(Code)(Java Doc)
public void setText(String text)(Code)(Java Doc)
public void setToolTip(String toolTip)(Code)(Java Doc)
public void setUrl(String url)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)

Methods inherited from com.sun.rave.web.ui.component.TemplateComponentBase
public UIComponent getChild(FacesContext context, String id)(Code)(Java Doc)
public UIComponent getChild(FacesContext context, LayoutComponent descriptor)(Code)(Java Doc)
public LayoutDefinition getLayoutDefinition(FacesContext context)(Code)(Java Doc)
public String getLayoutDefinitionKey()(Code)(Java Doc)
public void restoreState(FacesContext context, Object state)(Code)(Java Doc)
public Object saveState(FacesContext context)(Code)(Java Doc)
public void setLayoutDefinitionKey(String key)(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.