[Opensource] Réf. : [Opensource] Transition Proposal
Thierry Clement
Thierry.Clement at cetim.fr
Tue Nov 19 02:40:36 PST 2002
>Hey All,
>A lot of people have requested the ability to disable or remove
transitions
>that a user doesn't have permissions to follow.
>I had been struggling on how best to do this, but I think I have a decent
>idea :)
>The transition would have a new attribute called 'disabled'. If a user
>doesn't have permissions to follow a link, [which the transition itself
>would determine], then the disabled attribute would be set to "true".
>[Actually the mere presence of the disabled attribute would cause
disabled
>behavior]
>Now, if Transition.getUrl() is called on a disabled transition, the
>transition will return "#" which effectively blocks its use.
>Secondly, the jsp page designed [at least using struts-based tags] can
>check for the presence of the disabled attribute and either set the
normal
>css style or a disabled css style to gray out any link text. And
>furthermore if icons are used, the jsp designer would be able to swap out
>"grayed out" icons rather than the normal one.
>I like this approach better than just not having the link available since
>it lets the user know that the ability is there, but it is not active.
>[most likely due to permissions, but a controller could also disable
>certain actions as well using this format based upon certain criteria]
>What do you guys think? This would go into Expresso 5.1 or later and
would
>not be in the bugfix release since it would mean changed controller
behavior.
>Thanks for the feedback!
> -Mike
I think it is interesting to let a user know that an information is
present but disabled for writing (or accessing) by the means of a "gray"
cell. I also wondered how to do this, and the way I imagined was to set an
attribute such as "disabled", "readOnly", or smthg more general like
"accessRights" on a Block containing the information (inputs, outputs
and/or transitions) I want to "gray out". But it would be cleaner to have
it as a special attribute of Transition (as you suggest) - I just suggest
it could be extended for Inputs and Outputs, with corresponding
modifications in the expresso:InputTag and expresso:OutputTag so that the
information appears as "grayed".
If choosing a more general "accessRights" attribute, I suggest to use Unix
convention, with values ranging from "" to "RWX" : an input with attribute
"R" would just be displayed ; "RW" would allow modifications, "X" being
used for enabling transitions... but may be I am going too far and such
flexibility is not desired ?
Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20021119/f4670598/attachment-0002.htm
More information about the Opensource
mailing list