LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyConsultController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LyMultiAreaController
              extended by leon.control.LyFormController
                  extended by leon.control.LyConsultController
All Implemented Interfaces:
LyGetSessionInterface, LyContextInterface, LyControllerContextInterface, LyGetActionInterface, LySelectFileListenerInterface, LyAdvancedWorkSpaceListener, LyGuiListener, LyWorkSpaceListener, LyGetClassInfoInterface, LyInfoListener, LyEvaluator, LyDemandListener
Direct Known Subclasses:
LySetController

public class LyConsultController
extends LyFormController
implements LyContextInterface, LyControllerContextInterface

This class describes the controller associated to a consultation form. This class implements a 'read-only' LyFormController and specializes method from its parent.

This form controller is always associated to an object or a list of objects.

This class uses a LyFormBehavior (LyClassBehavior) instance which may implement specific application logic, automatic field calculation... or dynamic impact on value changes...

See Also:
LySetController, LyCreateController, LyFormBehaviorInterface, LyClassBehavior

Field Summary
static java.lang.String __VERSION
          File version
 
Fields inherited from class leon.control.LyFormController
DEMAND_APPLY, DEMAND_NEXT_OBJECT, DEMAND_NEXT_STEP, DEMAND_PREVIOUS_OBJECT, DEMAND_PREVIOUS_STEP, DEMAND_SAVE, DEMAND_SELECTION, DEMAND_VALIDATE, FORM_FIELD_SEP
 
Fields inherited from class leon.control.LyAreaController
DEFAULT_MENU_ITEM_IMAGE_SIZE, DEMAND_CANCEL, DEMAND_CLOSE, DEMAND_CREATE_CHART, DEMAND_DELETE_CHART, DEMAND_DELETE_OBJECTINFOS, DEMAND_DELETE_PREFERENCE, DEMAND_UPDATE_VIEW
 
Fields inherited from class leon.control.LyController
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP
 
Constructor Summary
LyConsultController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
          Constructor.
 
Method Summary
 void execRule(LyRule rule, boolean checked)
          Exec given rule inside this controller.
 LyFieldController fieldControllerFactory(LyFieldInfo fieldInfo, boolean forceConsult)
          Factory for constructing the field controller of a field info.
 LyConsultBehaviorInterface getConsultBehavior()
          Accessor to controler behavior : shortcut to (LyConsultBehaviorInterface)getBehavior().
 LyContext getControllerContext()
          Gets the controller context.
 boolean isHidden(LyFieldInfo fieldInfo)
          Accessor to the hidden status of a field in the form.
 void menuDemand(LyMenuDemand demand)
          Invoked when an menu item notification is sent to this listener.
 void setHidden(LyFieldInfo fieldInfo, boolean hidden)
          Changes current field status to (non-)hidden.
 void setIdle(boolean idle)
          Sets idle mode on this controller.
 void setLabel(LyFieldInfo fieldInfo, LyInfoLabel label, boolean labelSet)
          Changes the label for the specified fieldinfo.
 void updateObjectFromCompositionRelation(LyRelationFieldInfo relationField)
          Update object values.
 
Methods inherited from class leon.control.LyFormController
actionDemand, clearViewCache, contains, findFormField, free, getAreaController, getBehaviorInterface, getClassInfo, getCompositionRelation, getContent, getDefaultFieldUnit, getEnvironment, getFieldController, getFieldMarks, getFields, getFieldValue, getFieldValue, getFormField, getImage, getImage, getKeyValue, getObject, getObjectList, getSelection, getState, getTabs, isChangingObject, isComposition, isDisplayed, isViewResizable, objectAdded, objectChanged, objectRemoved, objectStateChanged, objectUserEvent, reset, resetFormContent, resetFromObject, setActiveField, setCompositionRelation, setContext, setFieldMarks, setObjects, setState, showError, workSpaceEventsGrouped
 
Methods inherited from class leon.control.LyMultiAreaController
addAreaController, addAreaControllerStack, canClose, getAreaController, getAreaController, getAreaControllersCount, getAreaControllerStack, getAreaControllerStackCount, getFinalAreaControllers, getLastModified, openSubAreaController, removeAreaController, removeAreaControllerStack, setAction, setContextClient, setViewController, update
 
Methods inherited from class leon.control.LyAreaController
canFree, completeMenuBar, completeMessages, free, getAction, getAreaStackController, getBehavior, getBuilder, getContext, getContextClient, getContextTitle, getDefaultAction, getFastEditionAction, getHelpFile, getImageTooltip, getInfoLabel, getInfoLabel, getLabel, getMenuItemImage, getName, getParameter, getParameter, getParameterMarks, getParent, getParent, getParentAreaController, getRefreshTime, getShortLabel, getTarget, getTitle, getViewController, getViewController, hasMark, hasNotMark, hasViewController, hideView, infoEvent, initialize, isInitialized, isOutlined, reset, selectFileDemand, setContext, setPreference, showView, showView, testParameter, toString, updateTitleBar
 
Methods inherited from class leon.control.LyController
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getClassInfo, getComponent, getId, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, selectionDemand, setBuilder, setBuilderClass, setLastModified, setName, setUserData, showError, showWarning, updateViewFromValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface leon.control.LyContextInterface
getContext, setContext
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyConsultController

public LyConsultController(LySession session,
                           LyController parent,
                           LyAction action,
                           LyClassInfo classInfo,
                           LyObjectList objects)
Constructor.

Parameters:
session - current session associated to the controller. The controller automatically registers on the specified session.
parent - parent controller (or null for 'root' controller). Controller hierarchy indicates a child controller (for example a dialog created from a main view)
action - related action. If an action is specified, the controller uses action parameters (action name, action specific XML view description ...)
classInfo - This parameter is not used. Kept from introspection compatibility. The classInfo is always the classInfo of the specified objects.
objects - current list of objects being shown in the consultation form. One Object is shown, but the user may navigate between the object list through the GUI.
Method Detail

fieldControllerFactory

public LyFieldController fieldControllerFactory(LyFieldInfo fieldInfo,
                                                boolean forceConsult)
Factory for constructing the field controller of a field info.

Overrides:
fieldControllerFactory in class LyFormController
Parameters:
fieldInfo - Field info fo which a controller is built.
forceConsult - true to force consult
Returns:
The field controller of the given field.

getConsultBehavior

public LyConsultBehaviorInterface getConsultBehavior()
Accessor to controler behavior : shortcut to (LyConsultBehaviorInterface)getBehavior().

Returns:
associated behavior
See Also:
LyAreaController.getBehavior()

updateObjectFromCompositionRelation

public void updateObjectFromCompositionRelation(LyRelationFieldInfo relationField)
Update object values. Demand by its composition relation.

Parameters:
relationField - The composition relation field.

menuDemand

public void menuDemand(LyMenuDemand demand)
Invoked when an menu item notification is sent to this listener. Manages menu demands on captions displayed in consult form.

Overrides:
menuDemand in class LyFormController
Parameters:
demand - demand parameters sent by the view component.
See Also:
LyController.demandPerformed(leon.view.event.LyDemand)

getControllerContext

public LyContext getControllerContext()
Gets the controller context. This implementation will return the parent controller context if any.

Specified by:
getControllerContext in interface LyControllerContextInterface
Returns:
The controller context.
See Also:
LyControllerContextInterface.getControllerContext()

execRule

public void execRule(LyRule rule,
                     boolean checked)
Exec given rule inside this controller.

Parameters:
rule - Rule to apply.
checked - True if the rule is checked, false if unchecked.

setHidden

public void setHidden(LyFieldInfo fieldInfo,
                      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:
fieldInfo - the field which should be set hidden
hidden - new fieldInfo visibility. (default is true)

isHidden

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

Parameters:
fieldInfo - the specified field
Returns:
current field visibility

setIdle

public void setIdle(boolean idle)
Description copied from class: LyMultiAreaController
Sets idle mode on this controller. Default implementation calls setIdle on each sub-controller.

Overrides:
setIdle in class LyMultiAreaController
Parameters:
idle - the idle status

setLabel

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

Parameters:
fieldInfo - the fieldInfo
label - the new label
labelSet - indicates if the label apply to set form

(c) January 2013 - W4 S.A.

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