|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.orchestra.dynaForm.jsf.guiBuilder.GuiBuilder
org.apache.myfaces.orchestra.dynaForm.jsf.guiBuilder.impl.jsf.JsfGuiBuilder
public class JsfGuiBuilder
A concrete subclass of GuiBuilder which knows how to build JSF components and add them to the current component tree.
| Constructor Summary | |
|---|---|
protected |
JsfGuiBuilder()
|
| Method Summary | |
|---|---|
static void |
addElementBuilder(Class<?> elementType,
JsfGuiElementBuilder builder)
Add a specialized builder. |
protected void |
attachLengthValidator(javax.faces.component.html.HtmlInputText cmp,
int minSize,
int maxSize)
|
protected void |
attachRangeValidator(javax.faces.component.html.HtmlInputText cmp,
Double minValue,
Double maxValue)
|
protected boolean |
buildField(MetaField field)
actuallly build the fields gui component |
static javax.faces.component.UIComponent |
cloneComponent(javax.faces.component.UIComponent uicomponent)
|
void |
createInputBoolean(MetaField field)
select a boolean |
void |
createInputDate(MetaField field)
input date |
void |
createInputNumber(MetaField field)
enter a number |
void |
createInputText(MetaField field)
input field |
javax.faces.component.UIOutput |
createLabelFor(String labelKey,
javax.faces.component.UIComponent cmp)
Create a label for the specified component using the specified text. |
void |
createNative(MetaField field)
this is when the user passed in a component to use for the this field |
void |
createOutputText(MetaField field)
Output text using the field as value provider. |
javax.faces.component.UIParameter |
createParameter(String name,
String value)
|
void |
createSearchFor(MetaField field)
search for component |
void |
createSearchForSelectMenu(MetaField field)
search for component |
void |
createSelectOneMenu(MetaField field)
select one menu |
protected String |
createValueBindingString(MetaField field)
|
javax.faces.convert.Converter |
doCreateConverter(MetaField field)
|
javax.faces.convert.DateTimeConverter |
doCreateDateConverter(MetaField field)
|
javax.faces.component.UISelectBoolean |
doCreateInputBoolean(MetaField field)
|
javax.faces.component.html.HtmlSelectBooleanCheckbox |
doCreateInputBooleanComponent()
|
javax.faces.component.html.HtmlInputText |
doCreateInputDate(MetaField field)
|
javax.faces.component.html.HtmlInputText |
doCreateInputDateComponent(MetaField field)
|
javax.faces.component.html.HtmlInputText |
doCreateInputNumber(MetaField field)
|
javax.faces.component.html.HtmlInputText |
doCreateInputText(MetaField field)
|
javax.faces.component.html.HtmlInputText |
doCreateInputTextComponent()
|
void |
doCreateNative(MetaField field,
javax.faces.component.UIComponent uicomponent)
|
javax.faces.component.html.HtmlOutputLabel |
doCreateOutputLabel(String labelKey)
Create an HtmlOutputLabel component, ie some text that specifically describes another input component. |
javax.faces.component.html.HtmlOutputLabel |
doCreateOutputLabelComponent()
|
javax.faces.component.html.HtmlOutputText |
doCreateOutputText(MetaField field)
|
javax.faces.component.html.HtmlOutputText |
doCreateOutputText(String text)
Create an HtmlOutputText component, ie a component that displays a string. |
javax.faces.component.html.HtmlOutputText |
doCreateOutputTextComponent()
|
javax.faces.component.html.HtmlPanelGroup |
doCreatePanelGroupComponent()
|
javax.faces.component.UIComponent |
doCreateSearchFor(MetaField field)
|
javax.faces.component.UIInput |
doCreateSearchForSelectMenu(MetaField field)
|
javax.faces.component.html.HtmlSelectManyListbox |
doCreateSelectManyListbox(MetaField field)
|
javax.faces.component.html.HtmlSelectManyListbox |
doCreateSelectManyListboxComponent()
|
javax.faces.component.html.HtmlSelectOneMenu |
doCreateSelectOneMenu(MetaField field)
|
javax.faces.component.html.HtmlSelectOneMenu |
doCreateSelectOneMenuComponent()
|
javax.faces.component.UIInput |
findInputComponent(javax.faces.component.UIComponent cmp)
Return the first UIInput component in the tree of components starting at the specified node (including the node itself). |
void |
fireNewComponent(MetaField field,
javax.faces.component.UIComponent cmp)
jo, we made a component, create a possible label and fire its creation. |
String |
getBackingEntityPrefix()
|
protected String |
getCleanedNameForId(String name)
remove all not allowed characters for an jsf ID from the name |
javax.faces.context.FacesContext |
getContext()
|
javax.el.ELContext |
getELContext()
|
protected String |
getFieldId(MetaField field)
|
NewComponentListener |
getNewComponentListener()
|
void |
initConverter(javax.faces.component.UIOutput cmp,
MetaField field)
setup a converter if required |
void |
initDefaults(javax.faces.component.UIComponent cmp,
MetaField field)
init global defaults like id |
void |
initInputDefaults(javax.faces.component.html.HtmlInputText cmp,
MetaField field)
setup all the validators, maxlength, size, ... |
void |
initInputDefaults(javax.faces.component.UIInput cmp,
MetaField field)
setup defaults for input fields like required |
void |
initOutputDefaults(javax.faces.component.UIOutput cmp,
MetaField field)
init global defaults for output fields |
void |
initSelections(MetaField field,
javax.faces.component.UIComponent cmp)
insert possible selection items |
void |
initValueBinding(javax.faces.component.UIComponent cmp,
MetaField field)
init the default value binding |
void |
setBackingEntityPrefix(String backingEntityPrefix)
|
void |
setContext(javax.faces.context.FacesContext context)
|
void |
setELContext(javax.el.ELContext elcontext)
|
void |
setNewComponentListener(NewComponentListener newComponentListener)
|
| Methods inherited from class org.apache.myfaces.orchestra.dynaForm.jsf.guiBuilder.GuiBuilder |
|---|
getDestCmp, getLabelBundle, isFieldDisplayOnly, isIdAsDisplayOnly, setDestCmp, setFormDisplayOnly, setIdAsDisplayOnly, setLabelBundle, translateText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected JsfGuiBuilder()
| Method Detail |
|---|
public static void addElementBuilder(Class<?> elementType,
JsfGuiElementBuilder builder)
public String getBackingEntityPrefix()
public void setBackingEntityPrefix(String backingEntityPrefix)
public NewComponentListener getNewComponentListener()
public void setNewComponentListener(NewComponentListener newComponentListener)
public void setContext(javax.faces.context.FacesContext context)
public javax.faces.context.FacesContext getContext()
public void setELContext(javax.el.ELContext elcontext)
public javax.el.ELContext getELContext()
public void createOutputText(MetaField field)
GuiBuilder
createOutputText in class GuiBuilderpublic void createInputDate(MetaField field)
GuiBuilder
createInputDate in class GuiBuilderpublic void createInputText(MetaField field)
GuiBuilder
createInputText in class GuiBuilderpublic void createInputNumber(MetaField field)
GuiBuilder
createInputNumber in class GuiBuilderpublic void createInputBoolean(MetaField field)
GuiBuilder
createInputBoolean in class GuiBuilderpublic void createSelectOneMenu(MetaField field)
GuiBuilder
createSelectOneMenu in class GuiBuilderpublic void createSearchFor(MetaField field)
GuiBuilder
createSearchFor in class GuiBuilderpublic void createSearchForSelectMenu(MetaField field)
GuiBuilder
createSearchForSelectMenu in class GuiBuilderpublic void createNative(MetaField field)
GuiBuilder
createNative in class GuiBuilderpublic static javax.faces.component.UIComponent cloneComponent(javax.faces.component.UIComponent uicomponent)
public javax.faces.component.html.HtmlOutputText doCreateOutputText(MetaField field)
public javax.faces.component.html.HtmlOutputText doCreateOutputTextComponent()
public javax.faces.component.html.HtmlOutputLabel doCreateOutputLabel(String labelKey)
The labelKey parameter is translated using a resource-bundle if possible. If no translation is available then the labelKey text is used directly.
public javax.faces.component.html.HtmlOutputText doCreateOutputText(String text)
Unlike doCreateOutputLabel, the parameter is the exact string to be displayed, not a key into a resource-bundle. This method is used to create components wrapping all sorts of strings, only some of which may be "translatable" via a resource bundle. If an output text component needs to contain translated text, then pass the translated value in as the parameter.
public javax.faces.component.html.HtmlOutputLabel doCreateOutputLabelComponent()
public javax.faces.component.html.HtmlInputText doCreateInputDate(MetaField field)
public javax.faces.component.html.HtmlInputText doCreateInputDateComponent(MetaField field)
public javax.faces.convert.Converter doCreateConverter(MetaField field)
public javax.faces.convert.DateTimeConverter doCreateDateConverter(MetaField field)
public javax.faces.component.html.HtmlInputText doCreateInputText(MetaField field)
public javax.faces.component.html.HtmlInputText doCreateInputTextComponent()
public javax.faces.component.UISelectBoolean doCreateInputBoolean(MetaField field)
public javax.faces.component.html.HtmlSelectBooleanCheckbox doCreateInputBooleanComponent()
public javax.faces.component.html.HtmlInputText doCreateInputNumber(MetaField field)
public javax.faces.component.html.HtmlSelectOneMenu doCreateSelectOneMenu(MetaField field)
public javax.faces.component.html.HtmlSelectManyListbox doCreateSelectManyListbox(MetaField field)
public javax.faces.component.html.HtmlSelectOneMenu doCreateSelectOneMenuComponent()
public javax.faces.component.html.HtmlSelectManyListbox doCreateSelectManyListboxComponent()
public javax.faces.component.UIComponent doCreateSearchFor(MetaField field)
public javax.faces.component.UIInput doCreateSearchForSelectMenu(MetaField field)
public javax.faces.component.html.HtmlPanelGroup doCreatePanelGroupComponent()
public void doCreateNative(MetaField field,
javax.faces.component.UIComponent uicomponent)
public javax.faces.component.UIParameter createParameter(String name,
String value)
public void fireNewComponent(MetaField field,
javax.faces.component.UIComponent cmp)
public javax.faces.component.UIOutput createLabelFor(String labelKey,
javax.faces.component.UIComponent cmp)
If the component (or one of its children) is an input component, then an HtmlOutputLabel component is created, with the "for" attribute referencing the id of the input component. Otherwise a plain HtmlOutputText component is created.
public javax.faces.component.UIInput findInputComponent(javax.faces.component.UIComponent cmp)
public void initDefaults(javax.faces.component.UIComponent cmp,
MetaField field)
protected String getFieldId(MetaField field)
protected String getCleanedNameForId(String name)
public void initOutputDefaults(javax.faces.component.UIOutput cmp,
MetaField field)
public void initValueBinding(javax.faces.component.UIComponent cmp,
MetaField field)
protected String createValueBindingString(MetaField field)
public void initInputDefaults(javax.faces.component.html.HtmlInputText cmp,
MetaField field)
protected void attachRangeValidator(javax.faces.component.html.HtmlInputText cmp,
Double minValue,
Double maxValue)
protected void attachLengthValidator(javax.faces.component.html.HtmlInputText cmp,
int minSize,
int maxSize)
public void initInputDefaults(javax.faces.component.UIInput cmp,
MetaField field)
public void initConverter(javax.faces.component.UIOutput cmp,
MetaField field)
public void initSelections(MetaField field,
javax.faces.component.UIComponent cmp)
protected boolean buildField(MetaField field)
GuiBuilder
buildField in class GuiBuilder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||