|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.faces.dhtml.renderkit.IlvDHTMLUtil
public class IlvDHTMLUtil
The IlvDHTMLUtil class gathers various utility methods used to
render JViews Faces DHTML components.
| Method Summary | |
|---|---|
static void |
debugDecodedParameters(UIComponent component,
HashMap map)
|
static String |
encodeNamespace(FacesContext context,
String name)
Encodes the name parameter by prefixing it by the namespace:
Portlet: Use renderResponse.getNamespace() to prefix the name. |
static void |
endScriptSection(Writer writer)
Renders to the writer the ending of a script section. |
static IlvFacesManager |
findManager(FacesContext facesContext)
Find the manager that will manage the DHTML components (scripts, dependencies). |
static String |
getClientId(String jsRef)
Converts a JViews JavaScript reference to its client ID. |
static String |
getControllerPath(FacesContext facesContext)
Returns the URL mapping of the controller servlet. |
static String |
getControllerURL()
Returns the URL of the controller servlet. |
static String |
getJSRef(String clientId)
Returns the JavaScript variable reference of a component. |
static String |
getJSRef(UIComponent component)
Returns the JavaScript variable reference of a component. |
static Object |
getObjectFromModel(FacesContext facesContext,
UIComponent component,
String property)
Returns the object described by the property from the model if the component has a value binding registered for this property. |
static boolean |
isDependencyRendered(UIComponent component,
IlvDependencyManager dependencyManager)
Returns true if the dependency component has already rendered
itself, false otherwise. |
static void |
setPropertyFromModel(FacesContext context,
UIComponent component,
String property)
Refresh the local value of a property with the referenced value if a value binding is defined on this property. |
static void |
startScriptSection(Writer writer)
Renders to the writer the starting of a script section. |
static void |
writeJSHandler(FacesContext context,
String jsRef,
String jsHandler,
String jsCode)
Writes a JavaScript handler on the event generated by the component jsRef. |
static void |
writeJSHandler(FacesContext context,
String jsRef,
String jsHandler,
String jsCode,
String[] params)
Writes a JavaScript handler on the event generated by the component jsRef. |
static void |
writeJSProperty(FacesContext context,
String jsRef,
String property,
String value)
Writes in the current response writer the JavaScript setting of a property of a component. |
static void |
writeJSStringProperty(FacesContext context,
String jsRef,
String property,
String value)
Writes in the current response writer the JavaScript setting of a property of a component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isDependencyRendered(UIComponent component,
IlvDependencyManager dependencyManager)
true if the dependency component has already rendered
itself, false otherwise.
component - The component that is being rendered.dependencyManager - The dependency manager.
true if the dependency component has already rendered
itself, false.
otherwise.public static String getJSRef(String clientId)
clientId - The clientId of the component.
public static String getJSRef(UIComponent component)
component - The component whose the JavaScript variable reference is returned.
public static String encodeNamespace(FacesContext context,
String name)
name parameter by prefixing it by the namespace:
renderResponse.getNamespace() to prefix the name.
context - The current faces context.name - The name to encode.
public static String getClientId(String jsRef)
jsRef - The JavaScript reference of the component.
public static Object getObjectFromModel(FacesContext facesContext,
UIComponent component,
String property)
facesContext - The current context.component - The component processed.property - The property processed.
public static void setPropertyFromModel(FacesContext context,
UIComponent component,
String property)
context - The current faces context.component - The component processed.property - The property to refresh with the referenced value.public static IlvFacesManager findManager(FacesContext facesContext)
facesContext - The current faces context.
public static String getControllerPath(FacesContext facesContext)
facesContext - The current faces context.
public static void writeJSProperty(FacesContext context,
String jsRef,
String property,
String value)
throws IOException
writeJSStringProperty instead.
context - The current faces context.jsRef - The JavaScript reference of the component.property - The property to set.value - The value to set to the property.
IOException
public static void writeJSStringProperty(FacesContext context,
String jsRef,
String property,
String value)
throws IOException
writeJSProperty instead.
context - The current faces context.jsRef - The JavaScript reference of the component.property - The property to set.value - The value to set to the property.
IOException
public static void writeJSHandler(FacesContext context,
String jsRef,
String jsHandler,
String jsCode,
String[] params)
throws IOException
jsRef.
context - The current faces context.jsRef - The JavaScript reference of the component.jsHandler - The name of the JavaScript handler to add.jsCode - The code that will be executed when the specified event is
sent.params - The names of the parameters of the JavaScript handler.
IOException
public static void writeJSHandler(FacesContext context,
String jsRef,
String jsHandler,
String jsCode)
throws IOException
jsRef.
The implicit parameter of the listener is 'view'.
context - The current faces context.jsRef - The JavaScript reference of the component.jsHandler - The name of the JavaScript handler to add.jsCode - The code that will be executed when the specified event is
sent.
IOException
public static void debugDecodedParameters(UIComponent component,
HashMap map)
public static String getControllerURL()
throws IllegalStateException
IllegalStateException - If the request's type is not handled.
public static void startScriptSection(Writer writer)
throws IOException
writer - The writer
IOException
public static void endScriptSection(Writer writer)
throws IOException
writer - the writer
IOException
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||