Consultor Eletrônico



Kbase P96160: How to enable/disable fields in one SmartDataViewer based on the values of fields in another ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/31/2010
Status: Verified

GOAL:

How to enable/disable fields in one SmartDataViewer based on the values of fields in another ?

GOAL:

How to ensure one SDV responds to changes in another ?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
Dynamics
All Supported Operating Systems

FIX:

Because there is no way to predict the order in which the SDV and other SmartObjects will be initialized accurately, the best way to handle this is as follows:


- The container should manage a 'state' property.
- The SDVs should contain logic to enable/disable fields depending on this state.
- The 'primary' SDV (which holds the fields that determine the UI state) should publish new states when it is initialized, and when new values in the fields demand the state to be changed.
- When a new state is published, the container should publish this to the other SDVs so they can enable/disable the fields as appropriate.
- To handle the publish/subscribes the appropriate custom SmartLinks should be defined.