|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.control.LyController
leon.control.LyAreaController
leon.control.LyMultiAreaController
leon.control.LyFormController
leon.control.LyConsultController
leon.control.LySetController
leon.control.LyEditTableSetController
public class LyEditTableSetController
This class implements a set controller used by the LyEditTableController This class is for internal use only.
LyEditTableController
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File Version |
Fields inherited from class leon.control.LySetController |
---|
_valueChange |
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 |
Fields inherited from interface leon.control.LyFormInterface |
---|
STATUS_CANCEL, STATUS_IGNORE, STATUS_KO, STATUS_OK |
Constructor Summary | |
---|---|
LyEditTableSetController(LySession session,
LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList objects)
Constructor. |
Method Summary | |
---|---|
void |
actionDemand(LyActionDemand demand)
Invoked when an action occurs. |
void |
cancel(boolean update)
Cancel changes. |
boolean |
checkIfModified()
Check if the form content has been modified and if the object need to be created. |
void |
clearViewCache()
Clears all cached data for this controller (especially the view and the component). |
LyObject |
createObject()
|
short |
endValidate()
Validate changes. |
LyFieldController |
fieldControllerFactory(LyFieldInfo fieldInfo,
boolean forceConsult)
Factory for constructing the field controller of a field info. |
void |
free()
Free this controller. |
void |
free(LyController controller)
Free this controller on request of the specified controller. |
LyInfoList<LyFieldInfo> |
getChangedFields()
Indicates which fields have been changed in this controller. |
LyContext |
getControllerContext()
Gets the controller context. |
LyValue |
getFieldValue(LyFieldInfo fieldInfo)
Overridden to retrieve values for fields that are not displayed in the edit table. |
LyFormField |
getFormField(LyFieldInfo fieldInfo)
Accessor to the formField corresponding to the given fieldInfo. |
LyValueSet |
getHiddenValues()
Returns the list of values used for fields that are not displayed in the table. |
LyObject |
getModel()
Get the model object |
short |
getState()
Get state of this controller. |
LyViewController |
getViewController()
Overriden to always return parent view controller. |
boolean |
isConsult()
Is this table in a form consult or not. |
boolean |
isCreation()
Returns a boolean indicating if the action is or not a creation. |
boolean |
isDisplayed(LyFieldInfo fieldInfo)
Checks if the specified fieldInfo is currently being shown in the form. |
boolean |
isEnabled()
Get boolean indicating if the controlled form is enabled or not. |
boolean |
isUpdating()
Returns a boolean indicating if update is being performed. |
boolean |
isValid()
Checks if this controller is valid : all changes are correct. |
boolean |
objectRemoved(LyWorkSpaceEvent event)
Called when an object is removed from the dynamic object list. |
boolean |
setContext(LyWorkSpace context)
Set current controller context. |
void |
setEditable(LyFieldInfo fieldInfo,
boolean editable)
Changes current field status to (non-)editable. |
void |
setEnabled(boolean enabled)
Set boolean indicating if the controlled form is enabled or not. |
void |
setFieldValue(LyFieldInfo fieldInfo,
LyValue newValue,
boolean propagate)
Overridden to register values for fields that are not displayed in the edit table. |
void |
setUpdating(boolean updating)
Sets the _updating attribute. |
void |
showError(LyObject object,
LyError error)
Show an error for the specified object. |
void |
showError(java.lang.String message)
Show a popup message error box with the specified message. |
void |
showWarning(java.lang.String message)
Show a popup message warning box with the specified message. |
short |
startValidate()
Start validating changes. |
void |
updateObject(LyValueSet oldValues)
Called when current object has changed . |
short |
validate(boolean free)
Overloaded to redirect the validation demand to the edit table controller. |
void |
valueChanged(LyFieldInfo fieldInfo)
Internal method for control and propagate a value change. |
boolean |
wasChanged()
Checks if something was changed. |
Methods inherited from class leon.control.LyConsultController |
---|
getConsultBehavior, menuDemand, setIdle, updateObjectFromCompositionRelation |
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.control.LyContextInterface |
---|
getContext |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LyEditTableSetController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
session
- current session associated to the controller. The controller automatically
registers on the specified session.parent
- parent controller (or null for 'root' controller).action
- related action. If an action is specified, the controller uses action
parameters (action name, action specific XML view description ...)classInfo
- this parameter is kept for introspection and compatibility. not used.objects
- list of objects currently being modified.Method Detail |
---|
public void clearViewCache()
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.
clearViewCache
in class LySetController
public LyObject createObject()
public LyViewController getViewController()
getViewController
in class LyAreaController
public LyFieldController fieldControllerFactory(LyFieldInfo fieldInfo, boolean forceConsult)
fieldControllerFactory
in class LySetController
fieldInfo
- Field info for which a controller is built.forceConsult
- indicates if the consult mode is forced for the field
public void actionDemand(LyActionDemand demand)
actionDemand
in class LySetController
demand
- the action demandLyController.demandPerformed(leon.view.event.LyDemand)
public LyFormField getFormField(LyFieldInfo fieldInfo)
getFormField
in class LyFormController
fieldInfo
- the fieldInfo which is associated to the view component.
public void showWarning(java.lang.String message)
showWarning
in class LyController
message
- the message to showLyViewManager
,
LyStrings
public void showError(java.lang.String message)
showError
in class LySetController
message
- the message to showLyViewManager
,
LyStrings
public void free()
free
in class LyAreaController
LyAreaController.free(LyController)
public void free(LyController controller)
free
in class LySetController
controller
- controller instance which requested the freeing of this controller. If the
controller is the parent, this controller is freed otherwise the method
does nothing.free()
public short startValidate()
startValidate
in interface LyFormInterface
startValidate
in class LySetController
LyClassBehavior.addExtraValues(leon.control.LySetController, leon.data.LyValueSet)
,
LyClassBehavior.controlNewValues(leon.control.LySetController, leon.data.LyValueSet)
,
LyFormInterface
public short validate(boolean free)
validate
in class LySetController
free
- indicates if this controller must be freed at the end
LyClassBehavior.addExtraValues(leon.control.LySetController, leon.data.LyValueSet)
,
LyClassBehavior.controlNewValues(leon.control.LySetController, leon.data.LyValueSet)
,
LyClassBehavior.endSet(leon.control.LySetController, leon.data.LyValueSet)
,
LyFormInterface
public short endValidate()
endValidate
in interface LyFormInterface
endValidate
in class LySetController
LyFormInterface
public void cancel(boolean update)
update
- indicates if an update must be performedpublic void valueChanged(LyFieldInfo fieldInfo)
valueChanged
in class LySetController
fieldInfo
- the fieldinfoLyClassBehavior.controlNewValue(leon.control.LySetController, leon.data.LyFieldInfoValue)
,
LySetController.setValid(leon.info.LyFieldInfo, boolean)
public boolean wasChanged()
public LyInfoList<LyFieldInfo> getChangedFields()
public short getState()
getState
in class LySetController
LyClassBehavior
public boolean isValid()
public boolean isCreation()
isCreation
in class LySetController
public boolean isConsult()
public void setEnabled(boolean enabled)
setEnabled
in interface LyFormInterface
setEnabled
in class LySetController
enabled
- the enabled statuspublic void setEditable(LyFieldInfo fieldInfo, boolean editable)
setEditable
in class LySetController
fieldInfo
- the field which should be marked editableeditable
- new fieldInfo status. (default is true or obtained from the view
description)public boolean isEnabled()
public boolean isDisplayed(LyFieldInfo fieldInfo)
isDisplayed
in class LySetController
fieldInfo
- the fieldInfo we want to find
public void setFieldValue(LyFieldInfo fieldInfo, LyValue newValue, boolean propagate)
setFieldValue
in class LySetController
fieldInfo
- the fieldinfonewValue
- the new valuepropagate
- indicates if we must propagate the changesLySetController.getFieldValue(leon.info.LyFieldInfo)
public LyValue getFieldValue(LyFieldInfo fieldInfo)
getFieldValue
in interface LyFormInterface
getFieldValue
in class LySetController
fieldInfo
- the fieldInfo
public LyValueSet getHiddenValues()
public boolean setContext(LyWorkSpace context)
setContext
in interface LyContextInterface
setContext
in class LyFormController
context
- current context or null if none is specified
LyContextInterface.getContext()
public LyObject getModel()
getModel
in class LySetController
public LyContext getControllerContext()
getControllerContext
in interface LyControllerContextInterface
getControllerContext
in class LySetController
LyControllerContextInterface.getControllerContext()
public void updateObject(LyValueSet oldValues)
updateObject
in class LySetController
oldValues
- set of former values, or null if not specified.public void showError(LyObject object, LyError error)
showError
in class LySetController
object
- The object in errorerror
- The error o showshowError(String)
public boolean checkIfModified()
checkIfModified
in interface LyFormInterface
checkIfModified
in class LySetController
public boolean isUpdating()
public void setUpdating(boolean updating)
_updating
attribute.
updating
- the updating valuepublic boolean objectRemoved(LyWorkSpaceEvent event)
LyFormController
objectRemoved
in interface LyWorkSpaceListener
objectRemoved
in class LyFormController
event
- event of removing object
LyFormController.objectRemoved(leon.data.LyWorkSpaceEvent)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |