Java Doc for AbstractCallMethod.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » tags » databinding » invoke » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.tags.databinding.invoke 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.beehive.netui.tags.AbstractClassicTag
   org.apache.beehive.netui.tags.databinding.invoke.AbstractCallMethod

All known Subclasses:   org.apache.beehive.netui.tags.databinding.invoke.CallMethod,
AbstractCallMethod
abstract public class AbstractCallMethod extends AbstractClassicTag (Code)

An abstract base class for tags that are capable of reflectively invoking methods. Specializations of this tag provide method implementations that locate the object on which to invoke the method and that handle any return value from the invoked method.

The CallMethod tag can have child tags of type MethodParameter ; these tags must be in the same order as the parameter list in the method signature of the method that will be invoked. To invoke an overloaded method, the MethodParameter.setType(String) property must be set to the String name of the type to pass to the method. If the type attribute values on nested MethodParameter tags do not match any method signature, an error will be reported in the page.


Inner Class :protected class ParamNode



Method Summary
public  voidaddParameter(String type, Object parameter)
     Add a paramter that will be passed as an argument to the method that will be invoked.
protected  booleanallowNullInvocationTarget()
     When implemented to return true, this method allows a tag invoking a method to accept a null invocation target and simply return null.
public  intdoEndTag()
     Reflectively invokes the method specified by the method attribute, AbstractCallMethod.findMethod(Object,String,boolean) .
public  intdoStartTag()
     Causes the body of this tag to be rendered; only MethodParameter tags are allowed to be contained inside of this tag.
abstract protected  MethodfindMethod(Object target, String methodName, boolean verifyTypes)
    
abstract protected  StringgetObjectName()
     Get the name of the object that is the target of the invocation.
protected  ListgetParameterNodes()
     Internal, read-only property used by subclasses to get the list of parameters to be used when reflectively invoking a method.
protected  voidhandleReturnValue(Object result)
    

A method that allows concrete classes to handle the result of the reflective invocation in an implementation specific way.

The default beahavior is to set the return value resulting from invoking the method in the javax.servlet.jsp.PageContext attribute map of the current JSP page. The result is set as an attribute if the result is not null and the CallMethod.setResultId(java.lang.String) String is not null.

protected  voidlocalRelease()
     Reset all of the fields of this tag.
abstract protected  ObjectresolveObject()
    

Resolve the object on which the method should be invoked.

public  voidsetFailOnError(boolean failOnError)
     Sets whether or not to report exceptions to the page when errors occur invoking a method on an object.
public  voidsetMethod(String method)
     Sets the name of a method to invoke on the target object.
public  voidsetResultId(String resultId)
     Sets the identifier at which the result of invoking the method will stored.



Method Detail
addParameter
public void addParameter(String type, Object parameter)(Code)
Add a paramter that will be passed as an argument to the method that will be invoked. This method is implemented to allow the the MethodParameter tags to register their parameters. This object is passed in the position that it appeared in the set of child MethodParameter tags.
Parameters:
  type - a String of the type or class name of this parameter
Parameters:
  parameter - an object that should be passed as an argument to the invoked method
See Also:   MethodParameter



allowNullInvocationTarget
protected boolean allowNullInvocationTarget()(Code)
When implemented to return true, this method allows a tag invoking a method to accept a null invocation target and simply return null. The default implementation returns false. true if the object on which to invoke the method can be null; false otherwise.



doEndTag
public int doEndTag() throws JspException(Code)
Reflectively invokes the method specified by the method attribute, AbstractCallMethod.findMethod(Object,String,boolean) . The arguments passed to the method are taken from any nested MethodParameter tags. When the parameters which are added by the MethodParameter tags are java.lang.String types, an attempt is made to convert each of these parameters into the type expected by the method. This conversion is done using the TypeUtils.convertToObject(java.lang.Stringjava.lang.Class) method. If a String can not be converted do the type expected by the method, an exception is thrown and the error is reported in the tag. Any return value that results from invoking the given method is passed to the subclass implementation of the method AbstractCallMethod.handleReturnValue(java.lang.Object) . AbstractCallMethod.EVAL_PAGE to continue evaluating the page
throws:
  JspException - if there are errors. All exceptions that may be thrownin the process of reflectively invoking the method and performing typeconversion are reported as JspException
See Also:   AbstractCallMethod.findMethod(Object,String,boolean)
See Also:   AbstractCallMethod.handleReturnValue(java.lang.Object)
See Also:   MethodParameter
See Also:   ObjectNotFoundException
See Also:   TypeUtils.convertToObject(java.lang.Stringjava.lang.Class)
See Also:   java.lang.String



doStartTag
public int doStartTag() throws JspException(Code)
Causes the body of this tag to be rendered; only MethodParameter tags are allowed to be contained inside of this tag. The output of rendering the body is never written into the output stream of the servlet. AbstractCallMethod.EVAL_BODY_BUFFERED



findMethod
abstract protected Method findMethod(Object target, String methodName, boolean verifyTypes)(Code)
The default findMethod implementation is an uncached search of all of the methods available on the Class of the target
Parameters:
  target - the object from which to find the method
Parameters:
  methodName - the name of the method to find
Parameters:
  verifyTypes - a boolean that if true will match the type names in addition to the String method name a Method object matching the methodName and types, if verifyTypes is true.null otherwise.



getObjectName
abstract protected String getObjectName()(Code)
Get the name of the object that is the target of the invocation. This is a generic method for this tag that enables more specific error reporting. a name for the object on which the method will be invoked.



getParameterNodes
protected List getParameterNodes()(Code)
Internal, read-only property used by subclasses to get the list of parameters to be used when reflectively invoking a method. If the method takes no parameters, this list will be of size zero. the list of parameters



handleReturnValue
protected void handleReturnValue(Object result)(Code)

A method that allows concrete classes to handle the result of the reflective invocation in an implementation specific way.

The default beahavior is to set the return value resulting from invoking the method in the javax.servlet.jsp.PageContext attribute map of the current JSP page. The result is set as an attribute if the result is not null and the CallMethod.setResultId(java.lang.String) String is not null. If the value returned from calling a method is null and the CallMethod.setResultId(java.lang.String) is non-null, the javax.servlet.jsp.PageContext.removeAttribute(java.lang.String) is called to remove the attribute from the attribute map.


Parameters:
  result - the object that was returned by calling the method on the object



localRelease
protected void localRelease()(Code)
Reset all of the fields of this tag.



resolveObject
abstract protected Object resolveObject() throws ObjectNotFoundException, JspException(Code)

Resolve the object on which the method should be invoked. If there are errors resolving this object, this method will throw an ObjectNotFoundException .

If the object is not found but no exception occurred, this method returns null.

the object on which to reflectively invoke the method or null if theobject was not found and no exception occurred.
throws:
  ObjectNotFoundException - if an exception occurred attempting to resolve an object



setFailOnError
public void setFailOnError(boolean failOnError)(Code)
Sets whether or not to report exceptions to the page when errors occur invoking a method on an object.
Parameters:
  failOnError - a boolean that defines whether or not exceptions should be thrown when invocation fails.



setMethod
public void setMethod(String method)(Code)
Sets the name of a method to invoke on the target object.
Parameters:
  method - the name of the method to invoke



setResultId
public void setResultId(String resultId)(Code)
Sets the identifier at which the result of invoking the method will stored. Once stored, the result of the reflective invocation will be available via the JSP EL implicit object ${pageScope} with the attribute name set via this property.
Parameters:
  resultId - a String that names an attribute in the PageContext'sattribute map where any resulting object will be stored.



Fields inherited from org.apache.beehive.netui.tags.AbstractClassicTag
final public static List DefaultNamingChain(Code)(Java Doc)
final protected static String EMPTY_STRING(Code)(Java Doc)
final public static String NETUI_UNIQUE_CNT(Code)(Java Doc)

Methods inherited from org.apache.beehive.netui.tags.AbstractClassicTag
protected String applyNamingChain(String name) throws JspException(Code)(Java Doc)
protected String getErrorsReport()(Code)(Java Doc)
final protected String getIdForTagId(String tagId)(Code)(Java Doc)
protected List getNamingChain()(Code)(Java Doc)
protected Form getNearestForm()(Code)(Java Doc)
protected int getNextId(ServletRequest req)(Code)(Java Doc)
protected IScriptReporter getScriptReporter()(Code)(Java Doc)
abstract public String getTagName()(Code)(Java Doc)
protected Locale getUserLocale()(Code)(Java Doc)
protected boolean hasErrors()(Code)(Java Doc)
protected void localRelease()(Code)(Java Doc)
protected String qualifyAttribute(String name) throws JspException(Code)(Java Doc)
public void registerTagError(String message, Throwable e) throws JspException(Code)(Java Doc)
public void registerTagError(AbstractPageError error) throws JspException(Code)(Java Doc)
protected int reportAndExit(int returnValue) throws JspException(Code)(Java Doc)
protected void reportErrors() throws JspException(Code)(Java Doc)
final protected String rewriteName(String name)(Code)(Java Doc)
final protected String setNonEmptyValueAttribute(String attrValue)(Code)(Java Doc)
final protected String setRequiredValueAttribute(String attrValue, String attrName) throws JspException(Code)(Java Doc)
final protected void write(String string)(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.