on 03-12-2009 3:25 PM
Hi Experts,
When my screen my loads, input field should be disabled by default.
After selecting button , the input field should be enabled. I created context attribute of type boolean and mapped it to the input field.
Please suggest me the code which i need to write.
Thanks a lot.
Hi Srini,
You can set the enabled property for the input field to 'false' initially.
On click of button, the associated click event for the button onAction.. is called. There you need to set this property to 'true', code is like wdContext.currentContextElement.setEnabled(true);.
Kind Regards,
Nitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitin,
Thanks a lot. It worked.
One more question. If the action is getting triggered from Radio button by index, then also this code is working.
But while passing action do i need to create two separate pairs of radio buttons with independent actions so that i can navigate back to any radio buttons and the actions will be triggered accordingly.
Please suggest.
Hi Srini,
You can try like this:
In onSelect action, get the value of the radiobutton value and then process it.
//compare the value of the radiobutton
if( wdContext.current<RBnode>Element().get<keyattribute>().equalsIgnoreCase("RBcode1"))
{
//do whatever you want
}
else if( wdContext.current<RBnode>Element().get<keyattribute>().equalsIgnoreCase("RBcode2"))
{
//do whatever you want
}
Remember this event is triggered only if you select the radiobutton manually
Regards,
Siva
Hi Srini,
In general, you can refer to UI Element Guide on SAP NetWeaver Library
http://help.sap.com/saphelp_nw70/helpdata/EN/9f/656442a1c4de54e10000000a155106/frameset.htm (7.0 release)
Kind Regards,
Nitin
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b06c8c9a-19a4-2b10-d985-9ae7a438... (CE 7.11 release pdf)
Edited by: Nitin Jain on Mar 13, 2009 7:47 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
check this tutorial
bvr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi...
if you want to disable and enable UI element at time page load..so you have to
create conext atrribute as datatype should be Boolean...
thant attribute binding to your inputfield....
set input property like enabled as boolean attribute like InputField.....
Wdinit(){
//load time----input field Disable
wdContext.currentContextElement().setInputFieldEnable(false);
}
then supose you action onActionSet(){
.
...........
//input field enable
wdContext.currentContextElement().setInputFieldEnable(true);
thanks
sjati
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
on the onAction of the button method change the value of the context attribute
e.g. - wdContext.currentContextElement.setInputFieldEnabled(true);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot. It worked.
One more question. If the action is getting triggered from Radio button by index, then also this code is working.
But while passing action do i need to create two separate pairs of radio buttons with independent actions so that i can navigate back to any radio buttons and the actions will be triggered accordingly.
Please suggest.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.