Java Doc for AbstractWidget.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » forms » formmodel » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.forms.formmodel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.forms.formmodel.AbstractWidget

All known Subclasses:   org.apache.cocoon.forms.formmodel.tree.Tree,  org.apache.cocoon.forms.formmodel.Repeater,  org.apache.cocoon.forms.formmodel.Upload,  org.apache.cocoon.forms.formmodel.Messages,  org.apache.cocoon.forms.formmodel.AbstractContainerWidget,  org.apache.cocoon.forms.formmodel.Field,  org.apache.cocoon.forms.formmodel.Action,  org.apache.cocoon.forms.formmodel.Output,  org.apache.cocoon.forms.formmodel.MultiValueField,  org.apache.cocoon.forms.formmodel.ImageMap,  org.apache.cocoon.forms.formmodel.GoogleMap,  org.apache.cocoon.forms.formmodel.BooleanField,
AbstractWidget
abstract public class AbstractWidget implements Widget(Code)
Abstract base class for Widget implementations. Provides functionality common to many widgets.
version:
   $Id: AbstractWidget.java 449149 2006-09-23 03:58:05Z crossley $


Field Summary
protected  booleanwasValid
     The result of the last call to AbstractWidget.validate() .

Constructor Summary
protected  AbstractWidget(AbstractWidgetDefinition definition)
    

Method Summary
public  voidaddValidator(WidgetValidator validator)
     Add a validator to this widget instance.
public  voidbroadcastEvent(WidgetEvent event)
     Abstract implementation throws a UnsupportedOperationException .
protected  voidgenerateDisplayData(ContentHandler contentHandler)
     Delegates to the AbstractWidget.getDefinition() of this widget to generate a common set of 'display' data.
protected  voidgenerateItemSaxFragment(ContentHandler contentHandler, Locale locale)
     Generates nested additional content nested inside the main element for this widget which is generated by AbstractWidget.generateSaxFragment(ContentHandler,Locale) The implementation on the AbstractWidget level inserts no additional XML.
public  voidgenerateLabel(ContentHandler contentHandler)
     Delegates to the AbstractWidget.getDefinition() to generate the 'label' part of the display-data of this widget.
public  voidgenerateSaxFragment(ContentHandler contentHandler, Locale locale)
     This will generate some standard XML consisting of a simple wrapper element (name provided by AbstractWidget.getXMLElementName() ) with attributes (provided by AbstractWidget.getXMLElementAttributes() around anything injected in by both AbstractWidget.generateDisplayData(ContentHandler) and AbstractWidget.generateItemSaxFragment(ContentHandler,Locale) .
 <fi:
AbstractWidget.getXMLElementName()  
AbstractWidget.getXMLElementAttributes()  >
AbstractWidget.generateDisplayData(ContentHandler)  (i.e.
public  ObjectgetAttribute(String name)
    
protected  WidgetgetChild(String id)
     Concrete widgets that contain actual child widgets should override to return the actual child-widget.
public  WidgetStategetCombinedState()
    
abstract public  WidgetDefinitiongetDefinition()
     Concrete subclasses should allow access to their underlaying Definition through this method.
public  FormgetForm()
    
public  StringgetFullName()
    
public  StringgetId()
     Gets the id of this widget.
public  LocationgetLocation()
    
public  StringgetName()
    
final public  WidgetgetParent()
    
public  StringgetRequestParameterName()
    
public  WidgetStategetState()
    
public  ObjectgetValue()
    
public  WidgetgetWidget(String id)
    
protected  AttributesImplgetXMLElementAttributes()
     The XML attributes used in AbstractWidget.generateSaxFragment(ContentHandler,Locale) to be placed on the wrapping element for all the XML-instance-content of this Widget. This automatically adds @id= AbstractWidget.getRequestParameterName() to that element. Concrete subclasses should call super.getXMLElementAttributes and possibly add additional attributes. Note: the @id is not added for those widgets who's getId() returns null (e.g.
abstract protected  StringgetXMLElementName()
     The XML element name used in AbstractWidget.generateSaxFragment(ContentHandler,Locale) to produce the wrapping element for all the XML-instance-content of this Widget.
public  voidinitialize()
     Called after widget's environment has been setup, to allow for any contextual initalization, such as looking up case widgets for union widgets.
public  booleanisRequired()
    
public  booleanisValid()
    
public  WidgetlookupWidget(String path)
    
public  voidremoveAttribute(String name)
    
public  booleanremoveValidator(WidgetValidator validator)
    
public  voidsetAttribute(String name, Object value)
    
public  voidsetParent(Widget widget)
     Sets the parent-widget of this widget.
public  voidsetState(WidgetState state)
    
public  voidsetValue(Object object)
    
public  StringtoString()
    
public  booleanvalidate()
    
protected  voidwidgetNameChanged()
     Should be called when a widget's own name has changed, in order to clear internal caches used to compute request parameters.

Field Detail
wasValid
protected boolean wasValid(Code)
The result of the last call to AbstractWidget.validate() .




Constructor Detail
AbstractWidget
protected AbstractWidget(AbstractWidgetDefinition definition)(Code)




Method Detail
addValidator
public void addValidator(WidgetValidator validator)(Code)
Add a validator to this widget instance.
Parameters:
  validator -



broadcastEvent
public void broadcastEvent(WidgetEvent event)(Code)
Abstract implementation throws a UnsupportedOperationException . Concrete subclass widgets need to override when supporting event broadcasting.



generateDisplayData
protected void generateDisplayData(ContentHandler contentHandler) throws SAXException(Code)
Delegates to the AbstractWidget.getDefinition() of this widget to generate a common set of 'display' data. (i.e. help, label, hint,...) Subclasses should override if the getDefinition can return null to avoid NPE's.
Parameters:
  contentHandler - where to send the SAX events to.
throws:
  SAXException -
See Also:   WidgetDefinition.generateDisplayData(ContentHandler)



generateItemSaxFragment
protected void generateItemSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException(Code)
Generates nested additional content nested inside the main element for this widget which is generated by AbstractWidget.generateSaxFragment(ContentHandler,Locale) The implementation on the AbstractWidget level inserts no additional XML. Subclasses need to override to insert widget specific content.
Parameters:
  contentHandler - to send the SAX events to
Parameters:
  locale - in which context potential content needs to be put.
throws:
  SAXException -



generateLabel
public void generateLabel(ContentHandler contentHandler) throws SAXException(Code)
Delegates to the AbstractWidget.getDefinition() to generate the 'label' part of the display-data of this widget. Subclasses should override if the getDefinition can return null to avoid NPE's
Parameters:
  contentHandler -
throws:
  SAXException -



generateSaxFragment
public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException(Code)
This will generate some standard XML consisting of a simple wrapper element (name provided by AbstractWidget.getXMLElementName() ) with attributes (provided by AbstractWidget.getXMLElementAttributes() around anything injected in by both AbstractWidget.generateDisplayData(ContentHandler) and AbstractWidget.generateItemSaxFragment(ContentHandler,Locale) .
 <fi:
AbstractWidget.getXMLElementName()  
AbstractWidget.getXMLElementAttributes()  >
AbstractWidget.generateDisplayData(ContentHandler)  (i.e. help, label, ...)
AbstractWidget.generateItemSaxFragment(ContentHandler,Locale) </fi:
AbstractWidget.getXMLElementName()  >
 

Parameters:
  contentHandler - to send the SAX events to
Parameters:
  locale - in which context potential content needs to be put.
throws:
  SAXException -



getAttribute
public Object getAttribute(String name)(Code)



getChild
protected Widget getChild(String id)(Code)
Concrete widgets that contain actual child widgets should override to return the actual child-widget.
Parameters:
  id - of the child-widget null if not overriden.



getCombinedState
public WidgetState getCombinedState()(Code)



getDefinition
abstract public WidgetDefinition getDefinition()(Code)
Concrete subclasses should allow access to their underlaying Definition through this method. If subclasses decide to return null they should also organize own implementations of AbstractWidget.getId() , AbstractWidget.getLocation() , AbstractWidget.validate() , AbstractWidget.generateLabel(ContentHandler) and AbstractWidget.generateDisplayData(ContentHandler) to avoid NPE's. the widgetDefinition from which this widget was instantiated.(See org.apache.cocoon.forms.formmodel.WidgetDefinition.createInstance)



getForm
public Form getForm()(Code)
the form where this widget belongs to.



getFullName
public String getFullName()(Code)



getId
public String getId()(Code)
Gets the id of this widget.



getLocation
public Location getLocation()(Code)
the location-information (file, line and column) where this widget wasconfigured.



getName
public String getName()(Code)



getParent
final public Widget getParent()(Code)
The parent-widget of this widget.



getRequestParameterName
public String getRequestParameterName()(Code)



getState
public WidgetState getState()(Code)



getValue
public Object getValue()(Code)



getWidget
public Widget getWidget(String id)(Code)



getXMLElementAttributes
protected AttributesImpl getXMLElementAttributes()(Code)
The XML attributes used in AbstractWidget.generateSaxFragment(ContentHandler,Locale) to be placed on the wrapping element for all the XML-instance-content of this Widget. This automatically adds @id= AbstractWidget.getRequestParameterName() to that element. Concrete subclasses should call super.getXMLElementAttributes and possibly add additional attributes. Note: the @id is not added for those widgets who's getId() returns null (e.g. top-level container widgets like 'form'). The contract of returning a non-null AttributesImpl is however maintained. the attributes for the main element for this widget's sax-fragment.



getXMLElementName
abstract protected String getXMLElementName()(Code)
The XML element name used in AbstractWidget.generateSaxFragment(ContentHandler,Locale) to produce the wrapping element for all the XML-instance-content of this Widget. the main elementname for this widget's sax-fragment.



initialize
public void initialize()(Code)
Called after widget's environment has been setup, to allow for any contextual initalization, such as looking up case widgets for union widgets.



isRequired
public boolean isRequired()(Code)



isValid
public boolean isValid()(Code)

See Also:   org.apache.cocoon.forms.formmodel.Widget.isValid



lookupWidget
public Widget lookupWidget(String path)(Code)



removeAttribute
public void removeAttribute(String name)(Code)



removeValidator
public boolean removeValidator(WidgetValidator validator)(Code)
Remove a validator from this widget instance
Parameters:
  validator - true if the validator was found.



setAttribute
public void setAttribute(String name, Object value)(Code)



setParent
public void setParent(Widget widget)(Code)
Sets the parent-widget of this widget. This is a write-once property.
Parameters:
  widget - the parent-widget of this one.
throws:
  IllegalStateException - when the parent had already been set.



setState
public void setState(WidgetState state)(Code)



setValue
public void setValue(Object object)(Code)



toString
public String toString()(Code)



validate
public boolean validate()(Code)

See Also:   org.apache.cocoon.forms.formmodel.Widget.validate



widgetNameChanged
protected void widgetNameChanged()(Code)
Should be called when a widget's own name has changed, in order to clear internal caches used to compute request parameters.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.