LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control.form
Class LyFieldConsultController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.form.LyFieldController
          extended by leon.control.form.LyFieldConsultController
All Implemented Interfaces:
LyGetSessionInterface, LyGuiListener, LyEvaluator, LyDemandListener
Direct Known Subclasses:
LyArrayFieldConsultController, LyChoiceFieldConsultController, LyCompositionFieldConsultController, LyCompositionFieldUnitConsultController, LyFieldSetController, LyFileFieldConsultController, LyRelationFieldConsultController, LyTextFieldConsultController

public class LyFieldConsultController
extends LyFieldController

Default field controller for a consultation.

See Also:
LyConsultController

Field Summary
static java.lang.String __VERSION
          File version
 
Fields inherited from class leon.control.form.LyFieldController
FORM_FIELD_SEP, OLD_FORM_FIELD_SEP
 
Fields inherited from class leon.control.LyController
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP
 
Constructor Summary
LyFieldConsultController(LyFormController parent, LyFieldInfo fieldInfo)
          Constructor.
 
Method Summary
 LyBuilder getDefaultBuilder()
          Factory of the default builder for a controller.
 LyValue getFieldValue()
          Extract current value for the specified fieldInfo in the form.
 LyInfoDataList<LyAction,LyClassInfo> getTransverseActions()
          Get the transverse action associated to this field controller
 boolean isHidden()
          Accessor to the hidden status of a field in the form.
 void propagate(java.lang.Object value)
          Impact of a value change of a fieldInfo.
 void setHidden(boolean hidden)
          Changes current field status to (non-)hidden.
 void setLabel(LyInfoLabel label, boolean labelSet)
          Changes the label for the specified fieldinfo.
 void update(LyFieldInfo origin, boolean propagate, boolean valueChange)
          Utility method (internal use for behavior) to calculate formulas of fieldInfos.
 void updateFieldItem(java.lang.Object newValue, java.lang.Object oldValue, boolean propagate)
          Update the value of a fieldInfo shown in the view.
 
Methods inherited from class leon.control.form.LyFieldController
actionDemand, clearViewCache, free, getAction, getAreaController, getBehavior, getClassInfo, getComponent, getDefaultFieldUnit, getDefaultFieldUnit, getEnvironment, getFieldController, getFieldInfo, getFormController, getFormField, getFormField, getImage, getInfoLabel, getInfoLabel, getLabel, getObject, getState, getViewController, hasMark, invokeTransverseAction, isIdle, menuDemand, resetFromValue, restore, save, setAreaNoScroll, setFieldValue, setFieldValue, setFormField, setState, toString
 
Methods inherited from class leon.control.LyController
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getBehaviorInterface, getBuilder, getClassInfo, getId, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getKeyValue, getLastModified, getName, getObjectId, getParent, getSession, getUserData, getView, getViewManager, hasViewController, helpDemand, hideView, hideView, isFreed, selectionDemand, setBuilder, setBuilderClass, setIdle, setLastModified, setName, setUserData, showError, showError, showView, showWarning, updateViewFromValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyFieldConsultController

public LyFieldConsultController(LyFormController parent,
                                LyFieldInfo fieldInfo)
Constructor. The controller automatically registers on the specified session.

Parameters:
parent - parent controller
fieldInfo - the field handled by this controller
Method Detail

getDefaultBuilder

public LyBuilder getDefaultBuilder()
Description copied from class: LyController
Factory of the default builder for a controller. The application should never invoke this method directly (internal use only : use getBuilder instead). This method is specialized in subclasses of LyController to return a valid builder instance.

Returns:
the builder which creates the XML description of the view
See Also:
LyFieldController.getDefaultBuilder()

updateFieldItem

public void updateFieldItem(java.lang.Object newValue,
                            java.lang.Object oldValue,
                            boolean propagate)
Update the value of a fieldInfo shown in the view. The method is overriden for relation fieldInfo (updateRelation) and file fieldInfo (updateFile)

Overrides:
updateFieldItem in class LyFieldController
Parameters:
newValue - the new value of the field.
oldValue - former value of the field,or null if unknown. This parameter is not used within generic code.
propagate - Indicates whether the change is notified (propagated) to other fields or not. Parameter not used at this level
See Also:
LyFieldController.getFieldItem()

update

public void update(LyFieldInfo origin,
                   boolean propagate,
                   boolean valueChange)
Utility method (internal use for behavior) to calculate formulas of fieldInfos. Application should use setFieldValue instead.

Parameters:
origin - the field that propagates the modification
propagate - Indicates whether the change is propagated to other fields.
valueChange - indicates whether the change occus due to a value changed event
See Also:
LyFieldController.setFieldValue(java.lang.Object, boolean)

propagate

public void propagate(java.lang.Object value)
Impact of a value change of a fieldInfo. The method invokes LyClassBehavior.propagate which may be used to implement specific impact on a value changed. This method is for internal use, application should use setFieldValue instead.

Overrides:
propagate in class LyFieldController
Parameters:
value - new Value of the field.
See Also:
LyClassBehavior.propagate(leon.control.LySetController, leon.data.LyFieldInfoValue)

getFieldValue

public LyValue getFieldValue()
Extract current value for the specified fieldInfo in the form.

Overrides:
getFieldValue in class LyFieldController
Returns:
current value, or null if not found or field is disabled.

setHidden

public void setHidden(boolean hidden)
Changes current field status to (non-)hidden. If the field is hidden, it is not submited with all other values. When the field is set hidden, it is also set enabled.

Parameters:
hidden - new fieldInfo visibility. (default is true)

isHidden

public boolean isHidden()
Accessor to the hidden status of a field in the form.

Returns:
current field visibility

setLabel

public void setLabel(LyInfoLabel label,
                     boolean labelSet)
Changes the label for the specified fieldinfo.

Parameters:
label - the new label
labelSet - true to use this label in edition

getTransverseActions

public LyInfoDataList<LyAction,LyClassInfo> getTransverseActions()
Get the transverse action associated to this field controller

Returns:
a list of transverse actions.

(c) January 2013 - W4 S.A.

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