|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.html.OptionsPainter
Painter for an option list The framework supports different data types which can be used to create an option list.
Field Summary | |
private OptionsComparator |
comparator
The selected value (the data model) |
private java.lang.Object |
dataModel
The data model |
private OptionListDesignModel |
designModel
The design model |
Constructor Summary | |
OptionsPainter(OptionListDesignModel designModel,
java.lang.Object dataModel,
OptionsComparator comparator)
Constructor for OptionsPainter |
Method Summary | |
protected void |
addOption(java.lang.StringBuffer buf,
java.lang.Object value,
java.lang.Object label,
java.lang.Object tooltip,
int indent)
Add an option element to the specified StringBuffer based on the specified parameters. |
protected void |
addOptionScript(java.lang.StringBuffer buf,
java.lang.String obj,
java.lang.Object value,
java.lang.Object label,
int indent)
Add an option element to the specified StringBuffer based on the specified parameters. |
static org.apache.ecs.html.Option |
createOption(PainterContext ctx,
OptionsIterator iterator,
OptionsComparator comparator)
Creates an HTML option element from the current iterator position |
protected java.lang.StringBuffer |
createOptions(javax.servlet.jsp.PageContext ctx,
OptionsIterator iter)
Method createOptions |
protected java.lang.StringBuffer |
createOptionsScript(javax.servlet.jsp.PageContext ctx,
java.lang.String obj,
OptionsIterator iter)
Method createOptionsScript |
protected boolean |
isSelected(java.lang.Object value)
Detects if the option is selected |
java.lang.String |
paint(javax.servlet.jsp.PageContext ctx)
Paints the options. |
java.lang.String |
paint(PainterContext ctx)
Paints the options. |
java.lang.String |
script(javax.servlet.jsp.PageContext ctx,
java.lang.String obj)
Creates a JavaScript fragment for option list initialization. |
java.lang.String |
script(PainterContext ctx,
java.lang.String obj)
Creates a JavaScript fragment for option list initialization. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private OptionListDesignModel designModel
private java.lang.Object dataModel
private OptionsComparator comparator
Constructor Detail |
public OptionsPainter(OptionListDesignModel designModel, java.lang.Object dataModel, OptionsComparator comparator)
designModel
- OptionListDesignModeldataModel
- The Options (data model)comparator
- OptionsComparatorMethod Detail |
public java.lang.String paint(PainterContext ctx)
ctx
- The Painter Context
public java.lang.String paint(javax.servlet.jsp.PageContext ctx)
ctx
- The JSP Page Context
public java.lang.String script(PainterContext ctx, java.lang.String obj)
ctx
- The Painter Contextobj
- The name of the JavaScript variable that needs to be
initialized
public java.lang.String script(javax.servlet.jsp.PageContext ctx, java.lang.String obj)
ctx
- The JSP Page Contextobj
- The name of the JavaScript variable that needs to be
initialized
protected boolean isSelected(java.lang.Object value)
value
- The value which should be check if it's selected
true
if the option i selected;
false
otherwise.protected java.lang.StringBuffer createOptions(javax.servlet.jsp.PageContext ctx, OptionsIterator iter)
ctx
- the JSP page contextiter
- Options iterator
protected void addOption(java.lang.StringBuffer buf, java.lang.Object value, java.lang.Object label, java.lang.Object tooltip, int indent)
buf
- StringBuffer accumulating our resultsvalue
- Value to be returned to the server for this optionlabel
- Value to be shown to the user for this optiontooltip
- Tooltip to be shown to the user for this optionindent
- Indentprotected java.lang.StringBuffer createOptionsScript(javax.servlet.jsp.PageContext ctx, java.lang.String obj, OptionsIterator iter)
ctx
- the JSP page contextobj
- The name of the JavaScript variable that needs to be
initializediter
- Options iterator
protected void addOptionScript(java.lang.StringBuffer buf, java.lang.String obj, java.lang.Object value, java.lang.Object label, int indent)
buf
- StringBuffer accumulating our resultsobj
- The name of the JavaScript variable that needs to be
initializedvalue
- Value to be returned to the server for this optionlabel
- Value to be shown to the user for this optionindent
- Indentpublic static org.apache.ecs.html.Option createOption(PainterContext ctx, OptionsIterator iterator, OptionsComparator comparator)
ctx
- the painter contextiterator
- the option iterator positioned on the option to paintcomparator
- the comparator (or null
) to determine the
selection state of the current option element
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |