This content has been marked as final.
Show 3 replies
-
1. Re: How to disable rich:listShuttle
kragoth May 11, 2009 11:47 PM (in response to venuvanama)I have generally found that rather then trying to change an input component to readonly based on permissions, just don't render that component at all.
So your page would look like this:<rich:listShuttle rendered="#{User.hasPermission}"> </rich:listShuttle> <h:panelGrid rendered="#{not User.hasPermission}"> ... </h:panelGrid>
So here, you would show the list shuttle if the user has the permission. Otherwise just show a standard table.
However, I can see that if you have the requirement for the user without the permission to see what is on both sides of the shuttle then this solution may not be good for you.
If this is the case then I'm not sure what you can do, I mean you can do things like:controlsType="none"
But this will only hide the buttons. Double clicking on a row will still copy it. I can't seem to stop that behaviour.
So yeah, I think reall your solution at the moment would be to just render 2 different components based on the user's permissions. -
2. Re: How to disable rich:listShuttle
ilya_shaikovsky May 12, 2009 5:24 AM (in response to venuvanama)use next attributes
controlType=none
switchByDblClick=false
switchByClick=false
B.t.w. request for disabled state already reported but not implemented yet. But the workaround above should works fine for you. -
3. Re: How to disable rich:listShuttle
venuvanama May 12, 2009 12:14 PM (in response to venuvanama)Thanks Kragoth and ilya_shaikovsky for your suggestions, this will definitely help me.
Venu