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


java.lang.Object
   com.sun.rave.web.ui.util.RenderingUtilities

RenderingUtilities
public class RenderingUtilities (Code)

author:
   avk

Inner Class :protected static class Param

Field Summary
final public static  StringCOLON
    
final public static  charCOLON_CHAR
    
final public static  StringMEDIA
    
final public static  StringNL
    
final public static  StringSCRIPT
    
final public static  StringSJWUIC_JSFILE
    
final public static  StringSRC
    
final public static  StringTYPE
    
final public static  StringUSCORE
    
final public static  charUSCORE_CHAR
    

Constructor Summary
public  RenderingUtilities()
     Creates a new instance of RenderingUtilities.

Method Summary
public static  StringgetJavascriptId(FacesContext context, UIComponent component)
    
public static  StringgetJsObjectName(FacesContext context, UIComponent component, String objectPrefix)
    
public static  StringgetJsObjectName(String clientId, String objectPrefix)
    
public static  StringgetLastClientID(FacesContext context)
     Get the client ID of the last component to have focus.
protected static  Param[]getParamList(FacesContext context, UIComponent command)
    
public static  StringgetStyleClasses(FacesContext context, UIComponent component, String styles)
    
public static  voidincludeJsp(FacesContext context, ResponseWriter writer, String jspURI)
     Perform a RequestDispatcher.include of the specified URI jspURI.

The path identifed by jspURI must begin with a <f:subview> tag.

public static  booleanisPortlet(FacesContext context)
    
public static  booleanisVisible(UIComponent component)
    

Return whether the given UIComponent is "visible". If the property is null, it will return true.

public static  voidrenderAnchor(String anchorName, UIComponent component, FacesContext context)
    
public static  voidrenderComponent(UIComponent component, FacesContext context)
     Render a component.
public static  voidrenderExtraHtmlAttributes(ResponseWriter writer, String extraHtml)
     Helper method to render extra attributes.
public static  voidrenderHiddenField(UIComponent component, ResponseWriter writer, String id, String value)
     This method will output a hidden field for use with Params and components that need to submit a value through a hidden field. Note: The name of the hidden field will be written as is.
public static  voidrenderJavaScript(UIComponent component, Theme theme, FacesContext context, ResponseWriter writer)
    
public static  booleanrenderJsInclude(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer, String includeFile)
     Return true if the javascript file identified by includeFile is included.
public static  booleanrenderJsObject(FacesContext context, UIComponent component, ResponseWriter writer, String objectName, String jsObjectClass, String arguments)
    
public static  voidrenderSkipLink(String anchorName, String styleClass, String style, String toolTip, Integer tabIndex, UIComponent component, FacesContext context)
    
public static  voidrenderSpacer(ResponseWriter writer, UIComponent component, String dotSrc, int height, int width)
     Helper function to render a transparent spacer image.
public static  voidrenderSpacer(FacesContext context, ResponseWriter writer, UIComponent component, int height, int width)
     Helper function to render a transparent spacer image.
public static  voidrenderStyleClass(FacesContext context, ResponseWriter writer, UIComponent component, String extraStyles)
    
public static  StringrenderStyleClass(FacesContext context, ResponseWriter writer, UIComponent component, String styleClass, String extraHtml)
     Helper method to render style classes when name/value pairs are given via an extraHtml String.
public static  voidrenderStyleSheetInline(UIComponent component, Theme theme, FacesContext context, ResponseWriter writer)
    
public static  voidrenderStyleSheetLink(UIComponent component, Theme theme, FacesContext context, ResponseWriter writer)
    
public static  voidrenderURLAttribute(FacesContext context, ResponseWriter writer, UIComponent component, String name, String url, String compPropName)
     Helper function to render a typical URL
Parameters:
  writer - The current ResponseWriter
Parameters:
  component - The uicomponent
Parameters:
  name - The attribute name of the url to write out
Parameters:
  url - The value passed in by the developer for the url
Parameters:
  compPropName - The property name of the component's property that specifies this property.
public static  voidsetLastClientID(FacesContext context, String clientId)
     Set the client ID of the last component to have focus.
public static  voidwriteStringAttributes(UIComponent component, ResponseWriter writer, String[] possibleAttributes)
     This method goes through an array of possible attribute names, evaluates if they have been set on the component, and writes them out using the specified writer.
public static  voidwriteStringAttributes(UIComponent component, ResponseWriter writer, String names, String extraHtml)
     Add any attributes on the specified list directly to the specified ResponseWriter for which the specified UIComponent has a non-null String value.

Field Detail
COLON
final public static String COLON(Code)



COLON_CHAR
final public static char COLON_CHAR(Code)



MEDIA
final public static String MEDIA(Code)



NL
final public static String NL(Code)



SCRIPT
final public static String SCRIPT(Code)



SJWUIC_JSFILE
final public static String SJWUIC_JSFILE(Code)



SRC
final public static String SRC(Code)



TYPE
final public static String TYPE(Code)



USCORE
final public static String USCORE(Code)



USCORE_CHAR
final public static char USCORE_CHAR(Code)




Constructor Detail
RenderingUtilities
public RenderingUtilities()(Code)
Creates a new instance of RenderingUtilities.




Method Detail
getJavascriptId
public static String getJavascriptId(FacesContext context, UIComponent component)(Code)



getJsObjectName
public static String getJsObjectName(FacesContext context, UIComponent component, String objectPrefix)(Code)



getJsObjectName
public static String getJsObjectName(String clientId, String objectPrefix)(Code)



getLastClientID
public static String getLastClientID(FacesContext context)(Code)
Get the client ID of the last component to have focus.



getParamList
protected static Param[] getParamList(FacesContext context, UIComponent command)(Code)



getStyleClasses
public static String getStyleClasses(FacesContext context, UIComponent component, String styles)(Code)

Return a space-separated list of CSS style classes to render for this component, or null for none.


Parameters:
  component - UIComponent for which to calculate classes
Parameters:
  styles - Additional styles specified by the renderer



includeJsp
public static void includeJsp(FacesContext context, ResponseWriter writer, String jspURI) throws IOException(Code)
Perform a RequestDispatcher.include of the specified URI jspURI.

The path identifed by jspURI must begin with a <f:subview> tag. The URI must not have as part of its path the FacesServlet mapping. For example if the FacesServlet mapping maps to /faces/* then jspURI must not have /faces/ as part of its path.

If jspUIR is a relative path then the request context path is prepended to it.


Parameters:
  context - the FacesContext for this request
Parameters:
  writer - the ResponseWrite destination for therendered output
Parameters:
  jspURI - the URI identifying a JSP page to be included.
throws:
  IOException - if response can't be written or jspURIcannot be included. Real cause is chained.



isPortlet
public static boolean isPortlet(FacesContext context)(Code)



isVisible
public static boolean isVisible(UIComponent component)(Code)

Return whether the given UIComponent is "visible". If the property is null, it will return true. Otherwise the value of the property is returned.


Parameters:
  component - The UIComponent to check True if the property is null or true, false otherwise.



renderAnchor
public static void renderAnchor(String anchorName, UIComponent component, FacesContext context) throws IOException(Code)



renderComponent
public static void renderComponent(UIComponent component, FacesContext context) throws IOException(Code)
Render a component.
Parameters:
  component - The component to render
Parameters:
  context - The FacesContext of the request



renderExtraHtmlAttributes
public static void renderExtraHtmlAttributes(ResponseWriter writer, String extraHtml) throws IOException(Code)
Helper method to render extra attributes.
Parameters:
  writer - ResponseWriter to which the elementend should be rendered
Parameters:
  extraHtml - Extra HTML appended to the tag enclosing the header
exception:
  IOException - if an input/output error occurs



renderHiddenField
public static void renderHiddenField(UIComponent component, ResponseWriter writer, String id, String value) throws IOException(Code)
This method will output a hidden field for use with Params and components that need to submit a value through a hidden field. Note: The name of the hidden field will be written as is. For Params no encoding inside the form is done. This is intentional.
Parameters:
  writer - The writer to use to write the attributes
Parameters:
  id - The identifier of the hidden field.passthrough for this component



renderJavaScript
public static void renderJavaScript(UIComponent component, Theme theme, FacesContext context, ResponseWriter writer) throws IOException(Code)
Helper function to render theme scripts
Parameters:
  context - containing theme
Parameters:
  writer - The current ResponseWriter
Parameters:
  component - The uicomponent



renderJsInclude
public static boolean renderJsInclude(FacesContext context, UIComponent component, Theme theme, ResponseWriter writer, String includeFile) throws IOException(Code)
Return true if the javascript file identified by includeFile is included. Return false if includeFile is null or there is no javascript file identified by includeFile.

renderJsInclude maintains a RequestMap attribute "sjwuic_jsfile" that resolves to a Map containing files that have previously been included.


Parameters:
  context - The current FacesContext
Parameters:
  component - The current component being rendered
Parameters:
  theme - The Theme to use to locate the Js file
Parameters:
  writer - The current ResponseWriter
Parameters:
  includeFile - The Js file to include



renderJsObject
public static boolean renderJsObject(FacesContext context, UIComponent component, ResponseWriter writer, String objectName, String jsObjectClass, String arguments) throws IOException(Code)



renderSkipLink
public static void renderSkipLink(String anchorName, String styleClass, String style, String toolTip, Integer tabIndex, UIComponent component, FacesContext context) throws IOException(Code)



renderSpacer
public static void renderSpacer(ResponseWriter writer, UIComponent component, String dotSrc, int height, int width) throws IOException(Code)
Helper function to render a transparent spacer image.
Parameters:
  writer - The current ResponseWriter
Parameters:
  component - The uicomponent
Parameters:
  height - The value to use for the image height attribute
Parameters:
  width - The value to use for the image width attribute



renderSpacer
public static void renderSpacer(FacesContext context, ResponseWriter writer, UIComponent component, int height, int width) throws IOException(Code)
Helper function to render a transparent spacer image.
Parameters:
  writer - The current ResponseWriter
Parameters:
  component - The uicomponent
Parameters:
  height - The value to use for the image height attribute
Parameters:
  width - The value to use for the image width attribute



renderStyleClass
public static void renderStyleClass(FacesContext context, ResponseWriter writer, UIComponent component, String extraStyles) throws IOException(Code)



renderStyleClass
public static String renderStyleClass(FacesContext context, ResponseWriter writer, UIComponent component, String styleClass, String extraHtml) throws IOException(Code)
Helper method to render style classes when name/value pairs are given via an extraHtml String. This method will append the given style to the class name/value pair found in the extraHtml String. The class name/value is removed from the returned extraHtml String so that developers may invoke the writeStringAttributes method without rendering the style class, again.
Parameters:
  context - FacesContext for the current request.
Parameters:
  component - The UIComponent component to be rendered.
Parameters:
  writer - ResponseWriter to which the element start should be rendered.
Parameters:
  style - The style to append to the component's styleClass property.
Parameters:
  extraHtml - Extra name/value pairs to be rendered.



renderStyleSheetInline
public static void renderStyleSheetInline(UIComponent component, Theme theme, FacesContext context, ResponseWriter writer) throws IOException(Code)
Helper function to render theme stylesheet definitions inline
Parameters:
  context - containing theme
Parameters:
  writer - The current ResponseWriter
Parameters:
  component - The uicomponent



renderStyleSheetLink
public static void renderStyleSheetLink(UIComponent component, Theme theme, FacesContext context, ResponseWriter writer) throws IOException(Code)
Helper function to render theme stylesheet link(s)
Parameters:
  context - containing theme
Parameters:
  writer - The current ResponseWriter
Parameters:
  component - The uicomponent



renderURLAttribute
public static void renderURLAttribute(FacesContext context, ResponseWriter writer, UIComponent component, String name, String url, String compPropName) throws IOException(Code)
Helper function to render a typical URL
Parameters:
  writer - The current ResponseWriter
Parameters:
  component - The uicomponent
Parameters:
  name - The attribute name of the url to write out
Parameters:
  url - The value passed in by the developer for the url
Parameters:
  compPropName - The property name of the component's property that specifies this property. Should be null if same as name.



setLastClientID
public static void setLastClientID(FacesContext context, String clientId)(Code)
Set the client ID of the last component to have focus.



writeStringAttributes
public static void writeStringAttributes(UIComponent component, ResponseWriter writer, String[] possibleAttributes) throws IOException(Code)
This method goes through an array of possible attribute names, evaluates if they have been set on the component, and writes them out using the specified writer.
Parameters:
  component - The component being rendered
Parameters:
  writer - The writer to use to write the attributes
Parameters:
  possibleAttributes - String attributes that are treated aspassthrough for this component



writeStringAttributes
public static void writeStringAttributes(UIComponent component, ResponseWriter writer, String names, String extraHtml) throws IOException(Code)
Add any attributes on the specified list directly to the specified ResponseWriter for which the specified UIComponent has a non-null String value. This method may be used to "pass through" commonly used attribute name/value pairs with a minimum of code. Attribute names are converted to lower case in the rendered output. Any name/value pairs in the extraHtml String shall take precedence over attribute values.
Parameters:
  context - FacesContext for the current request.
Parameters:
  component - EditableValueHolder component whose submitted value is to be stored.
Parameters:
  writer - ResponseWriter to which the element start should be rendered.
Parameters:
  names - List of attribute names to be passed through.
Parameters:
  extraHtml - Extra name/value pairs to be rendered.
exception:
  IOException - if an input/output error occurs



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.