LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control.form
Class LyRelationFieldSetController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.form.LyFieldController
          extended by leon.control.form.LyFieldConsultController
              extended by leon.control.form.LyFieldSetController
                  extended by leon.control.form.LyRelationFieldSetController
All Implemented Interfaces:
LyGetSessionInterface, LyControllerContextInterface, LyFormResultInterface, LyGuiListener, LyEvaluator, LyDemandListener
Direct Known Subclasses:
LyRelationAsLinkFieldSetController

public class LyRelationFieldSetController
extends LyFieldSetController
implements LyFormResultInterface

Field controller for modification of a simple relation.

See Also:
LySetController

Field Summary
static java.lang.String __VERSION
          File version
 
Fields inherited from class leon.control.form.LyFieldSetController
STANDARD_ARRAY_TOOL, STANDARD_CLASSINFO, TRANSVERSE_ACTION_SEP
 
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
LyRelationFieldSetController(LySetController parent, LyRelationFieldInfo fieldInfo)
          Constructor.
 
Method Summary
 void actionDemand(LyActionDemand demand)
          Invoked when an action occurs.
 void clearViewCache()
          Clears all cached data for this controller (especially the view and the component).
 void free()
          Free this controller.
 java.lang.String getStringValue()
          Extract current value for the specified fieldInfo in the form.
 void invokeTransverseAction(LyAction action, LyClassInfo classInfo)
          Internal method to invoke on a relation a transverse action for a given classInfo.
 void notifyFormResult(LyObject object, LyRelationFieldInfo relationField)
          Internal use.
 void setEditable(boolean editable)
          Overridden to update transverse toolbar.
 
Methods inherited from class leon.control.form.LyFieldSetController
addTempFilePath, cancel, checkIfModified, clear, commit, completeValue, control, endValidate, getControllerContext, getDefaultBuilder, getFieldValue, getFieldValue, getFinalValue, getLastValue, getModel, getParentFieldController, getSetController, getTransverseActions, getUnit, getValue, isCreation, isEditable, isEnabled, isOptional, reset, resetFromValue, restore, save, setEnabled, setFieldValue, setHidden, setInternal, setOptional, startValidate, unitChanged, update, updateFieldItem, updateViewContent, updateViewFromValues
 
Methods inherited from class leon.control.form.LyFieldConsultController
isHidden, propagate, setLabel
 
Methods inherited from class leon.control.form.LyFieldController
getAction, getAreaController, getBehavior, getClassInfo, getComponent, getDefaultFieldUnit, getDefaultFieldUnit, getEnvironment, getFieldController, getFieldInfo, getFormController, getFormField, getFormField, getImage, getInfoLabel, getInfoLabel, getLabel, getObject, getState, getViewController, hasMark, isIdle, menuDemand, setAreaNoScroll, 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
 
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

LyRelationFieldSetController

public LyRelationFieldSetController(LySetController parent,
                                    LyRelationFieldInfo fieldInfo)
Constructor.

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

actionDemand

public void actionDemand(LyActionDemand demand)
Invoked when an action occurs. At this level, the implementation manages
DEMAND_VALIDATE demands. (demand.getType = LyActionDemand.TYPE_ACTION AND demand.getSource() = LyController.DEMAND_VALIDATE)
DEMAND_APPLY demands. (demand.getType = LyActionDemand.TYPE_ACTION AND demand.getSource() = LyController.DEMAND_APPLY)
Default action (double click)
Default action (double click)
VALUE_CHANGED demands. (demand.getType = LyActionDemand.TYPE_VALUE_CHANGED

Overrides:
actionDemand in class LyFieldSetController
Parameters:
demand - the action demand
See Also:
LyController.demandPerformed(leon.view.event.LyDemand)

getStringValue

public java.lang.String getStringValue()
Extract current value for the specified fieldInfo in the form.

Returns:
current value, or null if not found or field is disabled.

setEditable

public void setEditable(boolean editable)
Overridden to update transverse toolbar.

Overrides:
setEditable in class LyFieldSetController
Parameters:
editable - the editable status

clearViewCache

public void clearViewCache()
Clears all cached data for this controller (especially the view and the component).

This method may be invoked for memory optimization, but the controller is still valid and may be used. (Unlike free) Further usage, needs to rebuild internal component & view which may be time consuming.

Overrides:
clearViewCache in class LyFieldController

free

public void free()
Free this controller.

Overrides:
free in class LyFieldController

notifyFormResult

public void notifyFormResult(LyObject object,
                             LyRelationFieldInfo relationField)
Internal use. When an object is created in a popup creation form for a relation, the child controller invokes this method to set the newly created object as the current value of the relation (if a new object is created we automatically select this value). This method is never used by the application : use setFieldValue instead

Specified by:
notifyFormResult in interface LyFormResultInterface
Parameters:
object - newly created object. The new value of the relation fieldInfo.
relationField - the relation

invokeTransverseAction

public void invokeTransverseAction(LyAction action,
                                   LyClassInfo classInfo)
Internal method to invoke on a relation a transverse action for a given classInfo.

Overrides:
invokeTransverseAction in class LyFieldController
Parameters:
action - Transverse action.
classInfo - Class info on which the action is applied.

(c) January 2013 - W4 S.A.

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