on 06-24-2010 8:40 AM
I am new to webdynpro so I apologise in advance for my stupid question.
In the webdynpro I have a view called VSELECT with 2 buttons i.e. CREATE and CHANGE which when clicked goes to the view VCHANGE_CREATE.
I want to change the property of 1 of the fields depending on whether CREATE or CHANGE has been clicked.
So, for example, I have field ZCONTACT and when CREATE is clicked it goes to the view VCHANGE_CREATE and all the fields, including ZCONTACT are cleared out and the user may enter new data on the screen.
When I click CHANGE it goes through to the same view VCHANGE_CREATE with all the data (it doesn't clear down) and then the user can amend the fields they want.
What I want to achieve is to have the ZCONTACT (which is an InputField) is to have the readOnly checkbox ticked if the CHANGE button is selected, but readOnly to be unticked if CREATE is selected.
Thank you.
Hello,
create a context attribute isReadOnly of type 'wdy_boolean' and bind that to the readOnly property of ZCONTACT.
And change the value of isReadOnly based on which button is clicked whether CHANGE or CREATE.
if CHANGE is clicked, in the event handler, change the value of isReadOnly to abap_true/abap_false. Do the same thing in the event handler of CREATE button.
Hope this helps!
Regards,
Srilatha
Edited by: Srilatha M on Jun 24, 2010 9:59 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both!
Works perfectly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can bind the checked property of checkbox to a context attribute of type wdy_boolean, and then manipluate this attribute values with your views actions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.