|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.PainterHelp
Utility class for painters
Constructor Summary | |
private |
PainterHelp()
Constructor |
Method Summary | |
static org.apache.ecs.ConcreteElement |
appendConverter(RequestContext ctx,
org.apache.ecs.ConcreteElement element,
java.lang.String controlName,
Converter converter)
Adds a hidden field for the converter that was used to render the HTML element |
static org.apache.ecs.ConcreteElement |
applyDesignRules(org.apache.ecs.ConcreteElement element,
DesignRule[] rules,
DeferredEnvironment env)
This method searches for all matching rules and applies the design to the given HTML element |
static org.apache.ecs.ConcreteElement |
applyDesignRules(javax.servlet.jsp.PageContext ctx,
org.apache.ecs.ConcreteElement element,
DesignRule[] rules,
java.lang.Object bean)
This method searches for all matching rules and applies the design to the given HTML element |
static java.lang.Object |
callPropertyGet(java.lang.Object bean,
java.lang.String property)
Processes the Getter-Method for the specified Property on the Bean |
static java.lang.String |
callPropertyGetStr(java.lang.Object bean,
java.lang.String property)
Method callPropertyGetStr |
static boolean |
checkRunAtClient(RunAt runat,
javax.servlet.jsp.PageContext pageContext)
This Method checks if a component should run on the client |
static org.apache.ecs.html.IMG |
createImage(javax.servlet.jsp.PageContext pageContext,
ImageModel image)
Creates an IMG Tag for the specified Image. |
static org.apache.ecs.html.IMG |
createImage(javax.servlet.jsp.PageContext pageContext,
ImageModel image,
java.util.Locale locale)
Creates an IMG Tag for the specified Image. |
static java.lang.String |
createImageStr(javax.servlet.jsp.PageContext pageContext,
ImageModel image)
Creates an IMG Tag for the specified Image |
static java.lang.String |
createImageStr(javax.servlet.jsp.PageContext pageContext,
ImageModel image,
java.util.Locale locale)
Creates an IMG Tag for the specified Image |
static org.apache.ecs.html.Input |
createInput(javax.servlet.jsp.PageContext pageContext,
ImageModel image)
Creates an Input Tag for the specified Image. |
static org.apache.ecs.html.Input |
createInput(javax.servlet.jsp.PageContext pageContext,
ImageModel image,
java.util.Locale locale)
Creates an Input Tag for the specified Image. |
static java.lang.String |
createScriptHandler(ClientHandler handler)
Adds the client handler to the button |
static java.lang.String |
decorateLink(javax.servlet.jsp.PageContext ctx,
Hyperlink link)
Decorates the URL with RequestDecorator settings and appends the JSESSIONID when URL-rewriting is enabled to track sessions Every URL has to be decorated this way! |
static java.lang.String |
decorateURL(javax.servlet.jsp.PageContext ctx,
java.lang.String url)
Decorates the URL with RequestDecorator settings and appends the JSESSIONID when URL-rewriting is enabled to track sessions Every URL has to be decorated this way! |
static java.lang.String |
encodeURL(javax.servlet.jsp.PageContext pageContext,
java.lang.String src)
Method encodeURL |
static org.apache.ecs.ElementContainer |
formatElements(java.lang.String pattern,
org.apache.ecs.ConcreteElement[] elements)
This method works similar to java.text.MessageFormat with the only difference that it concatenates ConcreteElement's into an ElementContainer |
static java.lang.String |
getFrameworkString(javax.servlet.jsp.PageContext pageContext,
java.lang.String resourceId,
java.lang.Object[] arguments,
java.util.Locale locale,
boolean returnNull)
Returns a framework string resource |
static java.lang.String |
getSmartCaption(java.lang.String caption,
java.lang.String detail)
Method getSmartCaption |
static java.lang.String |
getSmartDetail(java.lang.String caption,
java.lang.String detail)
Method getSmartDetail |
static java.lang.String |
getSource(javax.servlet.jsp.PageContext pageContext,
ImageModel image,
java.util.Locale locale)
Returns the localized Image resource name |
static java.lang.String |
getSource(javax.servlet.jsp.PageContext pageContext,
java.lang.String base,
java.lang.String src,
java.util.Locale locale)
Returns the localized Image resource name |
static java.util.Locale |
localeFromName(javax.servlet.jsp.PageContext pageContext,
java.lang.String localeName)
Gets the Locale Object from a Locale Name |
static java.util.Locale |
localeFromSession(javax.servlet.jsp.PageContext pageContext)
Gets the Locale Object for the running session |
static java.lang.String |
localize(javax.servlet.jsp.PageContext pageContext,
java.lang.String keyOrString)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(javax.servlet.jsp.PageContext pageContext,
java.lang.String keyOrString,
java.util.Locale locale)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(javax.servlet.jsp.PageContext pageContext,
java.lang.String keyOrString,
java.lang.Object[] arguments)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(javax.servlet.jsp.PageContext pageContext,
java.lang.String keyOrString,
java.lang.Object[] arguments,
java.util.Locale locale)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localize(javax.servlet.jsp.PageContext pageContext,
java.lang.String keyOrString,
java.lang.Object[] arguments,
java.util.Locale locale,
boolean returnNull)
Localizes a string depending on the localization settings of the Painter context. |
static java.lang.String |
localizeKey(javax.servlet.jsp.PageContext pageContext,
java.lang.String resourceKey,
java.lang.Object[] arguments,
java.util.Locale locale,
boolean returnNull)
Localizes a string depending on the localization settings of the Painter context. |
static void |
setScriptHandler(org.apache.ecs.ConcreteElement element,
ClientEvent event,
java.lang.String handler)
Sets a Script-Handler for the specified control. |
static void |
setScriptHandler(org.apache.ecs.ConcreteElement element,
ClientHandler handler)
Sets a Script-Handler for the specified control. |
static boolean |
showComments(javax.servlet.jsp.PageContext pageContext)
Checks if painters should write additional comments into the output |
static boolean |
toBoolean(java.lang.Object value,
boolean defValue)
Determines the boolean Value of the specified Object |
static void |
writeCssInclude(javax.servlet.jsp.JspWriter writer,
java.lang.String href)
Helper method to write a Cascading Stylesheet include to the given JSP writer |
static void |
writeCssInclude(javax.servlet.jsp.JspWriter writer,
java.lang.String href,
java.nio.charset.Charset charset)
Helper method to write a Cascading Stylesheet include to the given JSP writer |
static void |
writeJsInclude(javax.servlet.jsp.JspWriter writer,
java.lang.String src)
Helper method to write a JavaScript include to the given JSP writer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
private PainterHelp()
Method Detail |
public static void writeCssInclude(javax.servlet.jsp.JspWriter writer, java.lang.String href) throws java.io.IOException
writer
- the JSP writerhref
- the CSS resource reference or null
java.io.IOException
public static void writeCssInclude(javax.servlet.jsp.JspWriter writer, java.lang.String href, java.nio.charset.Charset charset) throws java.io.IOException
writer
- the JSP writerhref
- the CSS resource reference or null
charset
- the character encoding of the cascading Stylesheet file
java.io.IOException
public static void writeJsInclude(javax.servlet.jsp.JspWriter writer, java.lang.String src) throws java.io.IOException
writer
- the JSP writersrc
- the script URL or null
java.io.IOException
public static boolean showComments(javax.servlet.jsp.PageContext pageContext)
pageContext
- JspPage Context
public static boolean checkRunAtClient(RunAt runat, javax.servlet.jsp.PageContext pageContext)
runat
- RunAt setting of the componentpageContext
- JSP Page Context
true
when the component should run on the
clientpublic static org.apache.ecs.ConcreteElement appendConverter(RequestContext ctx, org.apache.ecs.ConcreteElement element, java.lang.String controlName, Converter converter)
ctx
- RequestContextelement
- The HTML elementcontrolName
- The controls Name - The name used as the request parameterconverter
- The converter that was used to render the Control
public static org.apache.ecs.ConcreteElement applyDesignRules(javax.servlet.jsp.PageContext ctx, org.apache.ecs.ConcreteElement element, DesignRule[] rules, java.lang.Object bean)
ctx
- JSP Page contextelement
- the HTML element to modifyrules
- list of rulesbean
- the bean that holds the values to check
public static org.apache.ecs.ConcreteElement applyDesignRules(org.apache.ecs.ConcreteElement element, DesignRule[] rules, DeferredEnvironment env)
element
- the HTML element to modifyrules
- list of rulesenv
- the environment in which the expression can be evaluated
public static java.lang.String decorateURL(javax.servlet.jsp.PageContext ctx, java.lang.String url)
ctx
- JspPageContexturl
- the URL to encode
public static java.lang.String decorateLink(javax.servlet.jsp.PageContext ctx, Hyperlink link)
ctx
- JspPageContextlink
- the Hyperlink
public static java.lang.String createScriptHandler(ClientHandler handler)
handler
- Collection with ClientHandler
public static void setScriptHandler(org.apache.ecs.ConcreteElement element, ClientHandler handler)
element
- The controlhandler
- The client handlerpublic static void setScriptHandler(org.apache.ecs.ConcreteElement element, ClientEvent event, java.lang.String handler)
element
- The controlevent
- The event to set a handler forhandler
- The Script textpublic static java.lang.String encodeURL(javax.servlet.jsp.PageContext pageContext, java.lang.String src)
pageContext
- PageContextsrc
- URL to encode
public static java.lang.Object callPropertyGet(java.lang.Object bean, java.lang.String property)
bean
- Bean with the specified Propertyproperty
- Name of the Property
public static java.lang.String callPropertyGetStr(java.lang.Object bean, java.lang.String property)
bean
- Objectproperty
- Property
public static boolean toBoolean(java.lang.Object value, boolean defValue)
value
- ObjectdefValue
- Default Value
public static org.apache.ecs.ElementContainer formatElements(java.lang.String pattern, org.apache.ecs.ConcreteElement[] elements)
pattern
- Formatting pattern with "{0}" markupselements
- The elements that should be placed in the markups
public static org.apache.ecs.html.Input createInput(javax.servlet.jsp.PageContext pageContext, ImageModel image)
pageContext
- JSP Page Contextimage
- ImageModel
public static org.apache.ecs.html.Input createInput(javax.servlet.jsp.PageContext pageContext, ImageModel image, java.util.Locale locale)
pageContext
- JSP Page Contextimage
- ImageModellocale
- the Locale
public static org.apache.ecs.html.IMG createImage(javax.servlet.jsp.PageContext pageContext, ImageModel image)
pageContext
- JSP Page Contextimage
- ImageModel
public static org.apache.ecs.html.IMG createImage(javax.servlet.jsp.PageContext pageContext, ImageModel image, java.util.Locale locale)
pageContext
- JSP Page Contextimage
- ImageModellocale
- the Locale
public static java.lang.String createImageStr(javax.servlet.jsp.PageContext pageContext, ImageModel image)
pageContext
- JSP Page Contextimage
- ImageModel
public static java.lang.String createImageStr(javax.servlet.jsp.PageContext pageContext, ImageModel image, java.util.Locale locale)
pageContext
- JSP Page Contextimage
- ImageModellocale
- Locale
public static java.lang.String getSmartCaption(java.lang.String caption, java.lang.String detail)
caption
- Captiondetail
- Detail
public static java.lang.String getSmartDetail(java.lang.String caption, java.lang.String detail)
caption
- Captiondetail
- Detail
public static java.lang.String localize(javax.servlet.jsp.PageContext pageContext, java.lang.String keyOrString)
pageContext
- JSP Page ContextkeyOrString
- String Literal or Resource Key
public static java.lang.String localize(javax.servlet.jsp.PageContext pageContext, java.lang.String keyOrString, java.util.Locale locale)
pageContext
- JSP Page ContextkeyOrString
- String Literal or Resource Keylocale
- Locale or null
public static java.lang.String localize(javax.servlet.jsp.PageContext pageContext, java.lang.String keyOrString, java.lang.Object[] arguments)
pageContext
- JSP Page ContextkeyOrString
- String Literal or Resource Keyarguments
- MessageFormat arguments or null
public static java.lang.String localize(javax.servlet.jsp.PageContext pageContext, java.lang.String keyOrString, java.lang.Object[] arguments, java.util.Locale locale)
pageContext
- JSP Page ContextkeyOrString
- String Literal or Resource Keyarguments
- MessageFormat arguments or null
locale
- Locale or null
public static java.lang.String localize(javax.servlet.jsp.PageContext pageContext, java.lang.String keyOrString, java.lang.Object[] arguments, java.util.Locale locale, boolean returnNull)
pageContext
- JSP Page ContextkeyOrString
- The String literal or resource key.arguments
- MessageFormat arguments or null
locale
- Locale or null
returnNull
- controls whether to return null or a not present indicator
public static java.lang.String localizeKey(javax.servlet.jsp.PageContext pageContext, java.lang.String resourceKey, java.lang.Object[] arguments, java.util.Locale locale, boolean returnNull)
pageContext
- JSP Page ContextresourceKey
- The resource key.arguments
- MessageFormat arguments or null
locale
- Locale or null
returnNull
- controls whether to return null or a not present indicator
public static java.lang.String getFrameworkString(javax.servlet.jsp.PageContext pageContext, java.lang.String resourceId, java.lang.Object[] arguments, java.util.Locale locale, boolean returnNull)
pageContext
- JSP Page ContextresourceId
- Id of the resource/keyarguments
- MessageFormat arguments or null
locale
- Locale or null
returnNull
- controls whether to return null or a not present indicator
public static java.util.Locale localeFromName(javax.servlet.jsp.PageContext pageContext, java.lang.String localeName)
pageContext
- JSP Page ContextlocaleName
- The Name
null
public static java.util.Locale localeFromSession(javax.servlet.jsp.PageContext pageContext)
pageContext
- JSP Page Context
null
public static java.lang.String getSource(javax.servlet.jsp.PageContext pageContext, ImageModel image, java.util.Locale locale)
pageContext
- JSP Page Contextimage
- The imagelocale
- Locale or null
public static java.lang.String getSource(javax.servlet.jsp.PageContext pageContext, java.lang.String base, java.lang.String src, java.util.Locale locale)
pageContext
- JSP Page Contextbase
- Base Directory or resource keysrc
- resource namelocale
- Locale or null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |