LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsFormField

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.struts.LyStrutsFormField
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalFormField, LyGraphicalPanel, LyViewComponent, LyFreeInterface, LyResetContentInterface, LySetEditableInterface, LySetEnabledInterface, LySetFocusInterface, LySetHiddenInterface, LySetOptionalInterface, LySetStateInterface, LyWebComponent

public class LyStrutsFormField
extends LyWebObject
implements LyGraphicalFormField, LyResetContentInterface, LySetFocusInterface

This class implements the Field object (as described in the dtd) for Struts viewer.

See Also:
LyFormField

Field Summary
static java.lang.String __VERSION
           
static int CAPTION_LENGTH_WRAP
          Maximum length for not wrapped captions.
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsFormField(LyFormField field)
          Class constructor of a Form Field object for the Struts target.
 
Method Summary
 boolean compareToolbarComponents(LyComponent comp1, LyComponent comp2)
          Checks differences between components found in a toolbar (toolbars or tools).
 void initialize()
          Initialization method.
 void refresh()
          Refresh frame containing this web object.
 void refreshCaption()
          Refreshes the content of the div containing the caption description.
 void refreshDivContent()
          Refreshes the content of the div containing the item description.
 void resetContent()
          Reset the view for a new XML Structure.
 void resetContent(boolean full)
          Reset the view for a new XML Structure.
 void setChecked(boolean checked)
          Updates attribute checked to the given value.
 void setEditable(boolean editable)
          Updates attribute editable to the given value.
 void setEnabled(boolean enabled)
          Updates attribute enabled to the given value.
 void setFocus()
          Method used to set the focus.
 void setHidden(boolean hidden)
          Updates attribute hidden to the given value.
 void setMessage(java.lang.String message)
          Updates attribute message to the given value.
 void setOptional(boolean optional)
          Updates attribute optional to the given value.
 void setParentCaptionTRId(java.lang.String parentCaptionTRId)
          Sets the identifier of the parent TR containing the caption.
 void setParentTRId(java.lang.String parentTRId)
          Sets the identifier of the parent TR containing the field.
 void setState(short state)
          Updates attribute state to the given value.
 void setToolBar(LyToolBar toolBar)
          Sets sub-component toolBar.
 void writeHtml(LyWebPageWriter pw)
          Write HTML description corresponding to this component.
 
Methods inherited from class leon.view.web.LyWebObject
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, free, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getScrollHeightForSplitter, getUrl, getWebViewManager, replaceUrl, replaceUrl, setUpdating, updateRefreshInfo, writeJson
 
Methods inherited from class leon.view.graphic.LyGraphicalObject
expand, getBounds, getChildrenBounds, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.graphic.LyGraphicalComponent
free, getViewComponent
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

CAPTION_LENGTH_WRAP

public static int CAPTION_LENGTH_WRAP
Maximum length for not wrapped captions.

Constructor Detail

LyStrutsFormField

public LyStrutsFormField(LyFormField field)
Class constructor of a Form Field object for the Struts target.

Parameters:
field - the generic Form Field defined for every type of view targets
Method Detail

initialize

public void initialize()
Initialization method.
Sets the toolbar generic component and the form Id to null.
If the generic form field component is not enable, sets the enable attribute of this component to false.


refresh

public void refresh()
Description copied from class: LyWebObject
Refresh frame containing this web object.

Overrides:
refresh in class LyWebObject

writeHtml

public void writeHtml(LyWebPageWriter pw)
Description copied from interface: LyWebComponent
Write HTML description corresponding to this component.

Specified by:
writeHtml in interface LyWebComponent
Parameters:
pw - the page writer

setChecked

public void setChecked(boolean checked)
Description copied from interface: LyGraphicalFormField
Updates attribute checked to the given value.

Specified by:
setChecked in interface LyGraphicalFormField
Parameters:
checked - Boolean indicating if attribute checked is set or unset.

setHidden

public void setHidden(boolean hidden)
Description copied from interface: LyGraphicalFormField
Updates attribute hidden to the given value.

Specified by:
setHidden in interface LyGraphicalFormField
Specified by:
setHidden in interface LySetHiddenInterface
Parameters:
hidden - Boolean indicating if attribute hidden is set or unset.

setParentTRId

public void setParentTRId(java.lang.String parentTRId)
Sets the identifier of the parent TR containing the field.


setParentCaptionTRId

public void setParentCaptionTRId(java.lang.String parentCaptionTRId)
Sets the identifier of the parent TR containing the caption.


setToolBar

public void setToolBar(LyToolBar toolBar)
Description copied from interface: LyGraphicalFormField
Sets sub-component toolBar.

Specified by:
setToolBar in interface LyGraphicalFormField
Parameters:
toolBar - New value of toolBar

setOptional

public void setOptional(boolean optional)
Description copied from interface: LyGraphicalFormField
Updates attribute optional to the given value.

Specified by:
setOptional in interface LyGraphicalFormField
Specified by:
setOptional in interface LySetOptionalInterface
Parameters:
optional - Boolean indicating if attribute optional is set or unset.

resetContent

public void resetContent()
Description copied from interface: LyResetContentInterface
Reset the view for a new XML Structure. Reinitialization.

Specified by:
resetContent in interface LyResetContentInterface

resetContent

public void resetContent(boolean full)
Description copied from interface: LyResetContentInterface
Reset the view for a new XML Structure. Reinitialization.

Specified by:
resetContent in interface LyResetContentInterface
Parameters:
full - indicates whether old components must be removed from graphical view.

setEditable

public void setEditable(boolean editable)
Description copied from interface: LyGraphicalFormField
Updates attribute editable to the given value.

Specified by:
setEditable in interface LyGraphicalFormField
Specified by:
setEditable in interface LySetEditableInterface
Parameters:
editable - Boolean indicating if attribute editable is set or unset.

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: LyGraphicalFormField
Updates attribute enabled to the given value.

Specified by:
setEnabled in interface LyGraphicalFormField
Specified by:
setEnabled in interface LySetEnabledInterface
Parameters:
enabled - Boolean indicating if attribute enabled is set or unset.

setFocus

public void setFocus()
Description copied from interface: LySetFocusInterface
Method used to set the focus.

Specified by:
setFocus in interface LySetFocusInterface

setState

public void setState(short state)
Description copied from interface: LyGraphicalFormField
Updates attribute state to the given value.

Specified by:
setState in interface LyGraphicalFormField
Specified by:
setState in interface LySetStateInterface
Parameters:
state - New value of state.

setMessage

public void setMessage(java.lang.String message)
Updates attribute message to the given value.

Specified by:
setMessage in interface LyGraphicalFormField
Parameters:
message - New value of message.

refreshDivContent

public void refreshDivContent()
Refreshes the content of the div containing the item description.


refreshCaption

public void refreshCaption()
Refreshes the content of the div containing the caption description.


compareToolbarComponents

public boolean compareToolbarComponents(LyComponent comp1,
                                        LyComponent comp2)
Checks differences between components found in a toolbar (toolbars or tools).

Parameters:
comp1 - the first component of comparison
comp2 - the second component of comparison
Returns:
true if the components differ, false otherwise

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com