You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Richard Eggert <re...@proteus-technologies.com> on 2007/03/26 23:37:28 UTC
Tomahawk's enabledOnUserRole attribute and Clay
Perhaps I'm overlooking something here, but from the testing I did this afternoon, it appears that the "enabledOnUserRole" attribute provided with most of Tomahawk's components doesn't work at all in Clay HTML templates. However, it does work properly when I use straight JSP/JSF without Clay (at least most of the time, anyway; t:commandButton seems to have issues with it).
I have an HTML template that contains an element that looks something like the following:
<input
type="checkbox"
jsfid="t:selectBooleanCheckbox"
value="#{mybean.myflag}"
enabledOnUserRole="myrole"
/>
When I view the page while logged in as a user that does not have the "myrole" role, the checkbox is still enabled, and I can use it to toggle the corresponding flag in the underlying bean. Thinking that it might be a problem with the implicit mapping of the <input> element, I tried changing the HTML element to just a <span> tag (with attributes set as above, minus the type="checkbox" part), to no avail.
I also tried setting enabledOnUserRole for a textarea, and it didn't work correctly there, either.
visibleOnUserRole seems to work just fine, though.
Any ideas on this, or should I post it to JIRA?
For reference, I'm using MyFaces 1.1.4, Tomahawk 1.1.3, and Shale 1.0.4.
Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com