|
||||||||||
| 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
public abstract class GuiBuilder
A factory for creating gui-framework-specific representations of data to be displayed to a user.
A concrete subclass of this type is needed for each specific UI framework. Component-based frameworks (such as JSF) may create component objects and add them to a "component tree", while other frameworks may simply write data to the current response stream.
This base class defines the abstract factory methods, and also provides a number of utility classes for the concrete subclasses to use.
| Constructor Summary | |
|---|---|
GuiBuilder()
|
|
| Method Summary | |
|---|---|
protected boolean |
buildField(MetaField field)
actuallly build the fields gui component |
abstract void |
createInputBoolean(MetaField field)
select a boolean |
abstract void |
createInputDate(MetaField field)
input date |
abstract void |
createInputNumber(MetaField field)
enter a number |
abstract void |
createInputText(MetaField field)
input field |
abstract void |
createNative(MetaField field)
this is when the user passed in a component to use for the this field |
abstract void |
createOutputText(MetaField field)
Output text using the field as value provider. |
abstract void |
createSearchFor(MetaField field)
search for component |
abstract void |
createSearchForSelectMenu(MetaField field)
search for component |
abstract void |
createSelectOneMenu(MetaField field)
select one menu |
javax.faces.component.UIComponent |
getDestCmp()
|
Map<String,String> |
getLabelBundle()
|
boolean |
isFieldDisplayOnly(MetaField field)
Returns true if this field should be rendered display only. |
boolean |
isIdAsDisplayOnly()
|
void |
setDestCmp(javax.faces.component.UIComponent destCmp)
|
void |
setFormDisplayOnly(boolean displayOnly)
Set to true if the guiBuilder should build a read-only form only. |
void |
setIdAsDisplayOnly(boolean idAsDisplayOnly)
set if the guiBuilder should build all id fields display only |
void |
setLabelBundle(Map<String,String> labelBundle)
The resource bundle to be used when translating field names into text labels. |
protected String |
translateText(String key,
String dflt)
Localise a text string using the resource-bundle specified for the dynaform. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GuiBuilder()
| Method Detail |
|---|
public void setDestCmp(javax.faces.component.UIComponent destCmp)
public javax.faces.component.UIComponent getDestCmp()
public boolean isFieldDisplayOnly(MetaField field)
public void setFormDisplayOnly(boolean displayOnly)
public boolean isIdAsDisplayOnly()
setIdAsDisplayOnly(boolean)public void setIdAsDisplayOnly(boolean idAsDisplayOnly)
public Map<String,String> getLabelBundle()
setLabelBundle(Map)public void setLabelBundle(Map<String,String> labelBundle)
A labelBundle is optional; if not specified then the field name will be used as the label. In addition, if a field-name is not defined in the resource bundle then the raw field-name will also be used.
public abstract void createOutputText(MetaField field)
public abstract void createInputText(MetaField field)
public abstract void createInputDate(MetaField field)
public abstract void createSelectOneMenu(MetaField field)
public abstract void createInputNumber(MetaField field)
public abstract void createInputBoolean(MetaField field)
public abstract void createSearchFor(MetaField field)
public abstract void createSearchForSelectMenu(MetaField field)
public abstract void createNative(MetaField field)
protected boolean buildField(MetaField field)
protected String translateText(String key,
String dflt)
If the key is null, or there is no resource-bundle, or there is no entry in the resource bundle for the specified key, then return the dflt string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||