|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEnhancingSelectModel
This interface makes it possible to add additional components before and after the generated input element. Useful with CheckboxGroup and RadioGroup when you want to customize the way the form input elements are created.
Method Summary | |
---|---|
RenderableComponent |
renderAfter(RenderableComponent component,
int index,
boolean selected)
A callback method that is called to enable adding components that will be rendered after the input element. |
RenderableComponent |
renderBefore(RenderableComponent component,
int index,
boolean selected)
A callback method that is called to enable adding components that will be rendered before the input element. |
java.lang.String |
renderHint(RenderableComponent component,
int index,
boolean selected)
Allows you to add render hints to the input element. |
Methods inherited from interface wheel.components.ISelectModel |
---|
getLabel, getObjects, getOptionCount, getValue, translateValue |
Method Detail |
---|
RenderableComponent renderBefore(RenderableComponent component, int index, boolean selected)
public RenderableComponent renderBefore(RenderableComponent component, int index, boolean selected) { return component.createLabel("h4", "Select me"); }
component
- The input element that was genereated based on the ISelectModelindex
- At what index are we atselected
- Is this the selected element
RenderableComponent renderAfter(RenderableComponent component, int index, boolean selected)
component
- The input element that was genereated based on the ISelectModelindex
- At what index are we atselected
- Is this the selected element
java.lang.String renderHint(RenderableComponent component, int index, boolean selected)
public String renderHint(RenderableComponent component, int index, boolean selected) { String result = ""; if (selected) result = "selected"; return result; }
component
- The input element that was genereated based on the ISelectModelindex
- At what index are we atselected
- Is this the selected element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |