Enabling/disabling state of buttons

Topics: Web Client Software Factory, User Forum
Feb 9, 2007 at 12:18 PM

WCSF provides page flow functionality, but in our case we need rather a functionality of
enabling /disabling of controls.
It is simple to implement in Asp.Net for a role based scenario e.g. via btn.enabled= UserisInRole.

Does anyone have any ideas when trying to enable or disable controls on a form based on the state of the data being viewed?
How this functionality could properly encapsulated for use in the mvpc-architecture?

Feb 10, 2007 at 4:56 PM
Do you mean enabling/disabling in response to user actions, or as a result of the roles a user is in, or as a result of data retrieved from a data store?

In some ways I suppose it isn't important - I would always expose either methods or properties on the View that allow the Presenter to configure how it is rendered... so methods such as "DisableAdministratorControl", or properties such as "AdministratorControlEditable".

Does that answer your question?

Feb 11, 2007 at 3:04 PM
Hello Simon,

Thank you for giving me the explicit idea of doing this.
I meant desabling/enabling firstly as result of recieved or changed data(data state).
I asked only because I could see some parallels to workflow foundation and page flows with state transitions.

Best regards,