|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A design rule is used to modify the properties of a design model at runtime based on a rule
| Method Summary | |
void |
applyDesign(javax.servlet.jsp.PageContext ctx,
org.apache.ecs.ConcreteElement element,
java.lang.Object bean)
This method searches for all matching rules and applies the design to the given HTML element |
DeferredEnvironment |
getEnvironment()
Retrieves the EL Environment to evaluate EL Expressions in the context of the current bean |
java.lang.String |
getRule()
Returns the rule |
java.lang.String |
getStyle()
Returns the Style |
java.lang.String |
getStyleClass()
Returns the StyleClass |
java.lang.String |
getStyleId()
returns the StyleId |
boolean |
match()
Matches the rule against the beans properties. |
void |
setEnvironment(DeferredEnvironment env)
Sets the EL Environment to evaluate EL Expressions in the context of the current bean. |
DesignRule |
setRule(java.lang.String rule)
Sets the rule. |
DesignRule |
setStyle(java.lang.String style)
Sets the Style |
DesignRule |
setStyleClass(java.lang.String styleClass)
Sets the StyleClass |
DesignRule |
setStyleId(java.lang.String styleId)
Sets the StyleId |
| Methods inherited from interface com.cc.framework.ui.model.ClientHandler |
getHandler, getHandlers, setHandler |
| Method Detail |
public void setEnvironment(DeferredEnvironment env)
null
after the last getter has been called.
try {
rule.setEnvironment(env);
String style = rule.getStyle();
// call other members
} catch (Exception e) {
// handle exception
} finally {
rule.setEnvironment(null);
}
env - Environmentpublic DeferredEnvironment getEnvironment()
null
public boolean match()
throws java.lang.Exception
true if the bean matches the rule
java.lang.Exception - is thrown in case of an error
public void applyDesign(javax.servlet.jsp.PageContext ctx,
org.apache.ecs.ConcreteElement element,
java.lang.Object bean)
throws java.lang.Exception
ctx - JSP Page contextelement - the HTML element to modifybean - the bean that holds the values to check
java.lang.Exception - is thrown in case of an errorpublic DesignRule setRule(java.lang.String rule)
rule - The rule to set
public java.lang.String getRule()
public DesignRule setStyle(java.lang.String style)
style - style constant
public java.lang.String getStyle()
public DesignRule setStyleId(java.lang.String styleId)
styleId - HTML-Id of the element
public java.lang.String getStyleId()
public DesignRule setStyleClass(java.lang.String styleClass)
styleClass - StyleClass
public java.lang.String getStyleClass()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||