on 05-10-2011 5:22 AM
Hi everyone.
I have a requirement for a Web Dynpro application I've created where a user with a certain authorisation can tick a checkbox to make all the rest of my fields read-only.
I should have no problem with the read-only part based on the value of the checkbox, but the issue I would like help with is how to make the checkbox only enabled for certain user groups.
I.E. I would like the checkbox to either not show or not be enabled unless the user belongs to authorisation group 'XXX'.
Is this possible?
If anyone could point me in the right direction it would be much appreciated.
Thanks
Kieran
Edited by: Kieran Ryan on May 10, 2011 6:23 AM
Hi
Create an attribute of type WDY_BOOLEAN say ENABLE ,and bind enable property of check box.
Check the authorization in WDDOINIT method
i) If user is authorized set ENABLE with value "ABAP_TRUE"
ii) If user is NOT authorized set ENABLE with value "ABAP_FALSE"
OR
Create one attribute of type WDUI_VISIBILITY bind to visible property of ROOTUIELEMENTCONTAINER.
So based on login user show veiw, otherwise through some warning or error messange.
Hope it helps.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
You can bind the enabled property of the check box to a context attribute of type WDY_BOOLEAN.
WDY_BOOLEAN has values as follows,
X-true.
' '-false.
Then set this context attribute as required based on the auth group.
This would disable the checkbox.
However if you want to completely hide the checkbox, then bind the visible property of the checkbox to a context attribute of type
WDUI_VISIBILITY
WDUI_VISIBILITY has values as follows,
01- none.
02- visible.
Thanks,
Aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.