[ 
http://issues.apache.org/jira/browse/TOMAHAWK-819?page=comments#action_12457638 
] 
            
Mario Ivankovits commented on TOMAHAWK-819:
-------------------------------------------

We wont remove them from tomahawk without a sufficient dependency period, no 
worry :-)

> BUT there is NO method how to issue different modes of authority roles for 
> different components in the same page (let say to display div tag when user 
> has not required role). 

Hmmm ...... I dont understand.

As far as I know you can simply use the "rendered=#{}" way to determine if a 
component should be rendered, based on the security el.


> Re-enabled autogeneration of components code, fixed bug in 
> commandButton/commandLink, adding several valueBindings to components
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-819
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-819
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>    Affects Versions: 1.1.5-SNAPSHOT
>            Reporter: Zdenek Sochor
>            Priority: Critical
>         Attachments: build-tools.patch, tomahawk.patch
>
>
> I wanted to expand functionality of role management in components, 
> (TOMAHAWK-489), but i ended in re-enabling autogeneration of code.
> This should simplify adding of properties and gettter/setter with 
> save/restore state of components INCLUDING fixing several components which
> didn't take EL values for several properties, for which it should have.
> Autogeneration is based on old maven build tools.
> Currently (in patch), autogeneration for TOMAHAWK components is w/o error (at 
> least in components with XML definition), 
> BUT autogenerated Myfaces CORE components breaks several examples 
> (MYFACES-1509) 
>   - this can be fixed by reverting of myfaces-api changes after generation.
> After reverting core, autogenerated Tomahawk classes can be used in final 
> snapshot.
> I added support for role management of enable/disableOnUserRole:
> It supports 3 logical functions:
> - logical AND (user has to be in ALL roles specified)
> - logical OR (user has to be in ONE of roles specified),
>       this is default mode (and only 1 currently supported in Tomahawk)
> - logical NOT (user MUST NOT be in any roles specified)
> If none/attribute not specified or other String used, it defaults to OR 
> function.
> This extension to functionality takes in account 'disabled' and 'rendered' 
> attributes:
> - disabled="true" take precedence in case of 'enabledOnUserRole'
> - 'rendered' value is taken in account AFTER evaluating roles
> Examples:
> <t:commandButton value="value" enabledOnUserRole="role1,role2" 
> roleSelectionMode="not" disabled="false" />
> [to be enabled, user MUST NOT be in both role1 AND role2]
> <t:commandButton value="value" enabledOnUserRole="role1,role2" 
> roleSelectionMode="not" disabled="true" />
> [always disabled]
> <t:commandButton value="value" visibleOnUserRole="role1,role2,role3" 
> roleSelectionMode="and" />
> [to be visible, user MUST BE in all roles - role1, role2 AND role3]
> <t:commandButton value="value" visibleOnUserRole="role1,role2" 
> roleSelectionMode="and" rendered="false"/>
> [never rendered]
> <t:commandButton value="value" enabledOnUserRole="role1,role2,role3" 
> roleSelectionMode="or" />
> EQUALS
> <t:commandButton value="value" enabledOnUserRole="role1,role2,role3"/>
> [to be enabled, user MUST BE in one or more roles from list (role1, role2, 
> role3)]
> -------------------------------------------------------------
> Hidden bug in commandButton/commandLink - fixed
> -------------------------------------------------------------
> Note on bug:
> EnabledOnUserRole is currently never used in HtmlCommandButton (tomahawk 
> 1.1.5 in svn)
> -- i addded support for it (method isDisabled())

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to