org.apache.myfaces.custom.dynaForm.guiBuilder.impl.jsf
Class JsfGuiBuilderDecorator

java.lang.Object
  extended by org.apache.myfaces.custom.dynaForm.guiBuilder.GuiBuilder
      extended by org.apache.myfaces.custom.dynaForm.guiBuilder.impl.jsf.JsfGuiBuilder
          extended by org.apache.myfaces.custom.dynaForm.guiBuilder.impl.jsf.JsfGuiBuilderDecorator

public class JsfGuiBuilderDecorator
extends JsfGuiBuilder

a helper to be able to decorate the builder


Field Summary
 
Fields inherited from class org.apache.myfaces.custom.dynaForm.guiBuilder.impl.jsf.JsfGuiBuilder
SEARCH_ENTITY_BINDING, SEARCH_ENTITY_TYPE
 
Constructor Summary
JsfGuiBuilderDecorator(JsfGuiBuilder original)
           
 
Method Summary
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(FieldInterface field)
          actuallly build the fields gui component
 void createInputBoolean(FieldInterface field)
          select a boolean
 void createInputDate(FieldInterface field)
          input date
 void createInputNumber(FieldInterface field)
          enter a number
 void createInputText(FieldInterface field)
          input field
 javax.faces.component.UIOutput createLabelFor(java.lang.String labelText, javax.faces.component.UIComponent cmp)
          create label for the given labelText and if possible attach it to the cmp.
 void createNative(FieldInterface field)
          this is when the user passed in a component to use for the this field
 void createOutputText(FieldInterface field)
          output text using the field as value provider
 javax.faces.component.UIParameter createParameter(java.lang.String name, java.lang.String value)
           
 void createSearchFor(FieldInterface field)
          search for component
 void createSelectOneMenu(FieldInterface field)
          select one menu
 javax.faces.component.html.HtmlCommandLink doCreateCommandLink(FieldInterface field)
           
 javax.faces.component.html.HtmlCommandLink doCreateCommandLinkComponent()
           
 javax.faces.convert.DateTimeConverter doCreateDateConverter(FieldInterface field)
           
 javax.faces.component.UISelectBoolean doCreateInputBoolean(FieldInterface field)
           
 javax.faces.component.html.HtmlSelectBooleanCheckbox doCreateInputBooleanComponent()
           
 javax.faces.component.html.HtmlInputText doCreateInputDate(FieldInterface field)
           
 javax.faces.component.html.HtmlInputText doCreateInputDateComponent(FieldInterface field)
           
 javax.faces.component.html.HtmlInputText doCreateInputNumber(FieldInterface field)
           
 javax.faces.component.html.HtmlInputText doCreateInputText(FieldInterface field)
           
 javax.faces.component.html.HtmlInputText doCreateInputTextComponent()
           
 void doCreateNative(FieldInterface field, javax.faces.component.UIComponent uicomponent)
           
 javax.faces.component.html.HtmlOutputLabel doCreateOutputLabel(java.lang.String text)
           
 javax.faces.component.html.HtmlOutputLabel doCreateOutputLabelComponent()
           
 javax.faces.component.html.HtmlOutputText doCreateOutputText(FieldInterface field)
           
 javax.faces.component.html.HtmlOutputText doCreateOutputText(java.lang.String text)
           
 javax.faces.component.html.HtmlOutputText doCreateOutputTextComponent()
           
 javax.faces.component.html.HtmlPanelGroup doCreatePanelGroupComponent()
           
 javax.faces.component.UIComponent doCreateSearchFor(FieldInterface field)
           
 javax.faces.component.html.HtmlSelectOneMenu doCreateSelectOneMenu(FieldInterface field)
           
 javax.faces.component.html.HtmlSelectOneMenu doCreateSelectOneMenuComponent()
           
 javax.faces.component.UIInput findInputComponent(javax.faces.component.UIComponent cmp)
          searches the first input component.
 void fireNewComponent(FieldInterface field, javax.faces.component.UIComponent cmp)
          jo, we made a component, create a possible label and fire its creation.
 java.lang.String getBackingBeanPrefix()
           
 java.lang.String getBackingEntityPrefix()
           
 javax.faces.context.FacesContext getContext()
           
 java.util.Map getLabelBundle()
           
 NewComponentListener getNewComponentListener()
           
 JsfGuiBuilder getOriginal()
           
 void iniCommandDefaults(javax.faces.component.UICommand cmp, FieldInterface field, java.lang.String action, java.lang.String actionListener)
          init defaults specifically for commands
 void initDefaults(javax.faces.component.UIComponent cmp, FieldInterface field)
          init global defaults like id
 void initInputDefaults(javax.faces.component.html.HtmlInputText cmp, FieldInterface field)
          setup all the validators, maxlength, size, ...
 void initInputDefaults(javax.faces.component.UIInput cmp, FieldInterface field)
          setup defaults for input fields like required
 void initOutputDefaults(javax.faces.component.UIOutput cmp, FieldInterface field)
          init global defaults for output fields
 void initSelections(FieldInterface field, javax.faces.component.UIComponent cmp)
          insert possible selection items
 void initValueBinding(javax.faces.component.UIComponent cmp, FieldInterface field)
          init the default value binding
 boolean isDisplayOnly()
           
 void setBackingBeanPrefix(java.lang.String backingBeanPrefix)
           
 void setBackingEntityPrefix(java.lang.String backingEntityPrefix)
           
 void setContext(javax.faces.context.FacesContext context)
           
 void setDisplayOnly(boolean displayOnly)
          set if the guiBuilder should build a read only form only
 void setLabelBundle(java.util.Map labelBundle)
          the bundle to use with labels
 void setNewComponentListener(NewComponentListener newComponentListener)
           
 
Methods inherited from class org.apache.myfaces.custom.dynaForm.guiBuilder.impl.jsf.JsfGuiBuilder
addElementBuilder, attachRangeValidator, cloneComponent, createSearchForSelectMenu, createValueBindingString, doCreateConverter, doCreateSearchForSelectMenu, doCreateSelectManyListbox, doCreateSelectManyListboxComponent, getCleanedNameForId, initConverter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfGuiBuilderDecorator

public JsfGuiBuilderDecorator(JsfGuiBuilder original)
Method Detail

getOriginal

public JsfGuiBuilder getOriginal()

createInputBoolean

public void createInputBoolean(FieldInterface field)
Description copied from class: GuiBuilder
select a boolean

Overrides:
createInputBoolean in class JsfGuiBuilder

createInputDate

public void createInputDate(FieldInterface field)
Description copied from class: GuiBuilder
input date

Overrides:
createInputDate in class JsfGuiBuilder

createInputNumber

public void createInputNumber(FieldInterface field)
Description copied from class: GuiBuilder
enter a number

Overrides:
createInputNumber in class JsfGuiBuilder

createInputText

public void createInputText(FieldInterface field)
Description copied from class: GuiBuilder
input field

Overrides:
createInputText in class JsfGuiBuilder

createLabelFor

public javax.faces.component.UIOutput createLabelFor(java.lang.String labelText,
                                                     javax.faces.component.UIComponent cmp)
Description copied from class: JsfGuiBuilder
create label for the given labelText and if possible attach it to the cmp.
If the component and none of its child is a UIInput then a simply outputText is generated.

Overrides:
createLabelFor in class JsfGuiBuilder

createNative

public void createNative(FieldInterface field)
Description copied from class: GuiBuilder
this is when the user passed in a component to use for the this field

Overrides:
createNative in class JsfGuiBuilder

createOutputText

public void createOutputText(FieldInterface field)
Description copied from class: GuiBuilder
output text using the field as value provider

Overrides:
createOutputText in class JsfGuiBuilder

createParameter

public javax.faces.component.UIParameter createParameter(java.lang.String name,
                                                         java.lang.String value)
Overrides:
createParameter in class JsfGuiBuilder

createSearchFor

public void createSearchFor(FieldInterface field)
Description copied from class: GuiBuilder
search for component

Overrides:
createSearchFor in class JsfGuiBuilder

createSelectOneMenu

public void createSelectOneMenu(FieldInterface field)
Description copied from class: GuiBuilder
select one menu

Overrides:
createSelectOneMenu in class JsfGuiBuilder

doCreateCommandLink

public javax.faces.component.html.HtmlCommandLink doCreateCommandLink(FieldInterface field)
Overrides:
doCreateCommandLink in class JsfGuiBuilder

doCreateCommandLinkComponent

public javax.faces.component.html.HtmlCommandLink doCreateCommandLinkComponent()
Overrides:
doCreateCommandLinkComponent in class JsfGuiBuilder

doCreateDateConverter

public javax.faces.convert.DateTimeConverter doCreateDateConverter(FieldInterface field)
Overrides:
doCreateDateConverter in class JsfGuiBuilder

doCreateInputBoolean

public javax.faces.component.UISelectBoolean doCreateInputBoolean(FieldInterface field)
Overrides:
doCreateInputBoolean in class JsfGuiBuilder

doCreateInputBooleanComponent

public javax.faces.component.html.HtmlSelectBooleanCheckbox doCreateInputBooleanComponent()
Overrides:
doCreateInputBooleanComponent in class JsfGuiBuilder

doCreateInputDate

public javax.faces.component.html.HtmlInputText doCreateInputDate(FieldInterface field)
Overrides:
doCreateInputDate in class JsfGuiBuilder

doCreateInputDateComponent

public javax.faces.component.html.HtmlInputText doCreateInputDateComponent(FieldInterface field)
Overrides:
doCreateInputDateComponent in class JsfGuiBuilder

doCreateInputNumber

public javax.faces.component.html.HtmlInputText doCreateInputNumber(FieldInterface field)
Overrides:
doCreateInputNumber in class JsfGuiBuilder

doCreateInputText

public javax.faces.component.html.HtmlInputText doCreateInputText(FieldInterface field)
Overrides:
doCreateInputText in class JsfGuiBuilder

doCreateInputTextComponent

public javax.faces.component.html.HtmlInputText doCreateInputTextComponent()
Overrides:
doCreateInputTextComponent in class JsfGuiBuilder

doCreateNative

public void doCreateNative(FieldInterface field,
                           javax.faces.component.UIComponent uicomponent)
Overrides:
doCreateNative in class JsfGuiBuilder

doCreateOutputLabel

public javax.faces.component.html.HtmlOutputLabel doCreateOutputLabel(java.lang.String text)
Overrides:
doCreateOutputLabel in class JsfGuiBuilder

doCreateOutputLabelComponent

public javax.faces.component.html.HtmlOutputLabel doCreateOutputLabelComponent()
Overrides:
doCreateOutputLabelComponent in class JsfGuiBuilder

doCreateOutputText

public javax.faces.component.html.HtmlOutputText doCreateOutputText(FieldInterface field)
Overrides:
doCreateOutputText in class JsfGuiBuilder

doCreateOutputText

public javax.faces.component.html.HtmlOutputText doCreateOutputText(java.lang.String text)
Overrides:
doCreateOutputText in class JsfGuiBuilder

doCreateOutputTextComponent

public javax.faces.component.html.HtmlOutputText doCreateOutputTextComponent()
Overrides:
doCreateOutputTextComponent in class JsfGuiBuilder

doCreatePanelGroupComponent

public javax.faces.component.html.HtmlPanelGroup doCreatePanelGroupComponent()
Overrides:
doCreatePanelGroupComponent in class JsfGuiBuilder

doCreateSearchFor

public javax.faces.component.UIComponent doCreateSearchFor(FieldInterface field)
Overrides:
doCreateSearchFor in class JsfGuiBuilder

doCreateSelectOneMenu

public javax.faces.component.html.HtmlSelectOneMenu doCreateSelectOneMenu(FieldInterface field)
Overrides:
doCreateSelectOneMenu in class JsfGuiBuilder

doCreateSelectOneMenuComponent

public javax.faces.component.html.HtmlSelectOneMenu doCreateSelectOneMenuComponent()
Overrides:
doCreateSelectOneMenuComponent in class JsfGuiBuilder

findInputComponent

public javax.faces.component.UIInput findInputComponent(javax.faces.component.UIComponent cmp)
Description copied from class: JsfGuiBuilder
searches the first input component. e.g the one we can the label attach to.

Overrides:
findInputComponent in class JsfGuiBuilder

fireNewComponent

public void fireNewComponent(FieldInterface field,
                             javax.faces.component.UIComponent cmp)
Description copied from class: JsfGuiBuilder
jo, we made a component, create a possible label and fire its creation.

Overrides:
fireNewComponent in class JsfGuiBuilder

getBackingBeanPrefix

public java.lang.String getBackingBeanPrefix()
Overrides:
getBackingBeanPrefix in class JsfGuiBuilder

getBackingEntityPrefix

public java.lang.String getBackingEntityPrefix()
Overrides:
getBackingEntityPrefix in class JsfGuiBuilder

getContext

public javax.faces.context.FacesContext getContext()
Overrides:
getContext in class JsfGuiBuilder

getNewComponentListener

public NewComponentListener getNewComponentListener()
Overrides:
getNewComponentListener in class JsfGuiBuilder

iniCommandDefaults

public void iniCommandDefaults(javax.faces.component.UICommand cmp,
                               FieldInterface field,
                               java.lang.String action,
                               java.lang.String actionListener)
Description copied from class: JsfGuiBuilder
init defaults specifically for commands

Overrides:
iniCommandDefaults in class JsfGuiBuilder

initDefaults

public void initDefaults(javax.faces.component.UIComponent cmp,
                         FieldInterface field)
Description copied from class: JsfGuiBuilder
init global defaults like id

Overrides:
initDefaults in class JsfGuiBuilder

initInputDefaults

public void initInputDefaults(javax.faces.component.html.HtmlInputText cmp,
                              FieldInterface field)
Description copied from class: JsfGuiBuilder
setup all the validators, maxlength, size, ... for HtmlInputText fields

Overrides:
initInputDefaults in class JsfGuiBuilder

initInputDefaults

public void initInputDefaults(javax.faces.component.UIInput cmp,
                              FieldInterface field)
Description copied from class: JsfGuiBuilder
setup defaults for input fields like required

Overrides:
initInputDefaults in class JsfGuiBuilder

initOutputDefaults

public void initOutputDefaults(javax.faces.component.UIOutput cmp,
                               FieldInterface field)
Description copied from class: JsfGuiBuilder
init global defaults for output fields

Overrides:
initOutputDefaults in class JsfGuiBuilder

initSelections

public void initSelections(FieldInterface field,
                           javax.faces.component.UIComponent cmp)
Description copied from class: JsfGuiBuilder
insert possible selection items

Overrides:
initSelections in class JsfGuiBuilder

initValueBinding

public void initValueBinding(javax.faces.component.UIComponent cmp,
                             FieldInterface field)
Description copied from class: JsfGuiBuilder
init the default value binding

Overrides:
initValueBinding in class JsfGuiBuilder

isDisplayOnly

public boolean isDisplayOnly()
Overrides:
isDisplayOnly in class GuiBuilder
See Also:
GuiBuilder.setDisplayOnly(boolean)

setBackingBeanPrefix

public void setBackingBeanPrefix(java.lang.String backingBeanPrefix)
Overrides:
setBackingBeanPrefix in class JsfGuiBuilder

setBackingEntityPrefix

public void setBackingEntityPrefix(java.lang.String backingEntityPrefix)
Overrides:
setBackingEntityPrefix in class JsfGuiBuilder

setContext

public void setContext(javax.faces.context.FacesContext context)
Overrides:
setContext in class JsfGuiBuilder

setDisplayOnly

public void setDisplayOnly(boolean displayOnly)
Description copied from class: GuiBuilder
set if the guiBuilder should build a read only form only

Overrides:
setDisplayOnly in class GuiBuilder

setNewComponentListener

public void setNewComponentListener(NewComponentListener newComponentListener)
Overrides:
setNewComponentListener in class JsfGuiBuilder

getLabelBundle

public java.util.Map getLabelBundle()
Overrides:
getLabelBundle in class GuiBuilder
See Also:
GuiBuilder.setLabelBundle(Map)

setLabelBundle

public void setLabelBundle(java.util.Map labelBundle)
Description copied from class: GuiBuilder
the bundle to use with labels

Overrides:
setLabelBundle in class GuiBuilder

attachLengthValidator

protected void attachLengthValidator(javax.faces.component.html.HtmlInputText cmp,
                                     int minSize,
                                     int maxSize)
Overrides:
attachLengthValidator in class JsfGuiBuilder

attachRangeValidator

protected void attachRangeValidator(javax.faces.component.html.HtmlInputText cmp,
                                    double minValue,
                                    double maxValue)

buildField

protected boolean buildField(FieldInterface field)
Description copied from class: GuiBuilder
actuallly build the fields gui component

Overrides:
buildField in class JsfGuiBuilder


Copyright © 2011. All Rights Reserved.