|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.xsp.renderkit.dojo.DojoUtil
public class DojoUtil
Useful utilities for writing out the associated html for building DOJO controls
| Field Summary | |
|---|---|
static boolean |
DOJO_INLINEGENERATION
Not part of the API. |
| Constructor Summary | |
|---|---|
DojoUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
addComponentDojoAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String dojoType,
java.util.Map<java.lang.String,java.lang.String> attrs)
Generate the HTML for dojo type and dojo attributes, used when the component does not implement FacesDojoComponent, so the methods
"getDojoType" and "getDojoAttributes" from that interface are not called. |
static java.lang.String |
addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component)
Generate the dojo type and dojo attributes with no dojo type specified |
static java.lang.String |
addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component,
java.lang.String defaultDojoType)
Generate the dojo type and related attributes where you specify default dojo type |
static java.lang.String |
addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component,
java.lang.String defaultDojoType,
boolean preventGetDojoType,
java.util.Map<java.lang.String,java.lang.String> extraAttributes,
boolean loadXspClientDojoUI)
Generate the dojo type and related attributes, used when the component implements FacesDojoComponent, so the methods "getDojoType" and
"getDojoAttributes" from that interface are called. |
static java.lang.String |
addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component,
java.lang.String defaultDojoType,
java.util.Map<java.lang.String,java.lang.String> extraAttributes)
Generate the dojo type and related attributes |
static void |
addDojoHtmlAttributes(javax.faces.context.FacesContext context,
java.lang.String dojoType,
java.util.List<DojoAttribute> attributes,
java.util.Map<java.lang.String,java.lang.String> extraAttributes)
Writes out html for dojotype, dojo attributes and html attributes |
static void |
instanciateDojoComponent(javax.faces.context.FacesContext context,
java.lang.String dojoId,
java.lang.String dojoType,
java.util.List<DojoAttribute> attributes,
java.util.Map<java.lang.String,java.lang.String> extraAttributes)
Writes out script onload to instantiate a DojoComponent. |
static boolean |
isDojoEnabled(javax.faces.context.FacesContext context)
Is dojo JS library being used |
static boolean |
useDojoParser(javax.faces.context.FacesContext context)
Generate JavaScript statements for initializing Dojo dijits instead of relying on the Dojo parser |
static void |
writeDojoHtmlAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String dojoType)
|
static void |
writeDojoHtmlAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String dojoType,
java.util.Map<java.lang.String,java.lang.String> attributes)
|
static void |
writeDojoHtmlAttributesMap(javax.faces.context.FacesContext context,
java.util.Map<java.lang.String,java.lang.String> attrs)
Writes out html for map of attributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean DOJO_INLINEGENERATION
| Constructor Detail |
|---|
public DojoUtil()
| Method Detail |
|---|
public static boolean useDojoParser(javax.faces.context.FacesContext context)
javax.faces.context.FacesContext - public static boolean isDojoEnabled(javax.faces.context.FacesContext context)
context -
public static java.lang.String addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component)
throws java.io.IOException
javax.faces.context.FacesContext - com.ibm.xsp.dojo.FacesDojoComponent - return dojo type
java.io.IOException
public static java.lang.String addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component,
java.lang.String defaultDojoType)
throws java.io.IOException
javax.faces.context.FacesContext - com.ibm.xsp.dojo.FacesDojoComponent - default - dojo type
return dojo type
java.io.IOException
public static java.lang.String addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component,
java.lang.String defaultDojoType,
java.util.Map<java.lang.String,java.lang.String> extraAttributes)
throws java.io.IOException
javax.faces.context.FacesContext - com.ibm.xsp.dojo.FacesDojoComponent - default - dojo typejava.util.Map - attributes
return dojo type
java.io.IOException
public static java.lang.String addDojoAttributes(javax.faces.context.FacesContext context,
FacesDojoComponent component,
java.lang.String defaultDojoType,
boolean preventGetDojoType,
java.util.Map<java.lang.String,java.lang.String> extraAttributes,
boolean loadXspClientDojoUI)
throws java.io.IOException
FacesDojoComponent, so the methods "getDojoType" and
"getDojoAttributes" from that interface are called. Note, anywhere this
is called, it is usually appropriate to check whether the result dojoType
is non-empty, and if present, force an id attribute on the containing
HTML element, even where the "id" was absent in the XPage source (false
returned by HtmlUtil.isUserId(String))
context - component - com.ibm.xsp.dojo.FacesDojoComponentdefaultDojoType - default dojo type, to use if the dojoType hasn't been
explicitly set on the componentpreventGetDojoType - used when the defaultDojoType is the value previously
returned from FacesDojoComponent.getDojoType(),
prevents re-invoking that method. Defaults to false
in the other methods of this util.extraAttributes - null or some extra attributes to render as if
they were in the
FacesDojoComponent.getDojoAttributes() list.loadXspClientDojoUI - defaults to true in the other methods of this util.
FacesDojoComponent.getDojoType(), or the value of
the defaultDojoType parameter.
java.io.IOExceptionaddDojoAttributes(FacesContext, FacesDojoComponent, String, Map)
method was present in 8.5.2.
public static java.lang.String addComponentDojoAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String dojoType,
java.util.Map<java.lang.String,java.lang.String> attrs)
throws java.io.IOException
FacesDojoComponent, so the methods
"getDojoType" and "getDojoAttributes" from that interface are not called.
context - javax.faces.context.FacesContextcomponent - dojoType - the dojoType to output.attributes - java.util.Map
java.io.IOException
public static void addDojoHtmlAttributes(javax.faces.context.FacesContext context,
java.lang.String dojoType,
java.util.List<DojoAttribute> attributes,
java.util.Map<java.lang.String,java.lang.String> extraAttributes)
throws java.io.IOException
javax.faces.context.FacesContext - dojo - typejava.util.List - Dojo Attributesjava.util.Map - HTML Attributes
java.io.IOException
public static void writeDojoHtmlAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String dojoType)
throws java.io.IOException
java.io.IOException
public static void writeDojoHtmlAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String dojoType,
java.util.Map<java.lang.String,java.lang.String> attributes)
throws java.io.IOException
java.io.IOException
public static void writeDojoHtmlAttributesMap(javax.faces.context.FacesContext context,
java.util.Map<java.lang.String,java.lang.String> attrs)
throws java.io.IOException
javax.faces.context.FacesContext - java.util.Map -
java.io.IOException
public static void instanciateDojoComponent(javax.faces.context.FacesContext context,
java.lang.String dojoId,
java.lang.String dojoType,
java.util.List<DojoAttribute> attributes,
java.util.Map<java.lang.String,java.lang.String> extraAttributes)
throws java.io.IOException
javax.faces.context.FacesContext - dojo - IddojoType - dojoAttribute - attributes
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||