on 03-03-2008 12:58 PM
Hello all,
Please help me on
How to enable and disable the buttons in web dynpro?
Thanks in advance,
CSP
Hey,
Define Variable in context of Type Visibility from ur WD dictionary.
And bind this variable to ur button UI Element property Visible.
Goto your Initmethod of your program add the following code.
require to hide add this.
Wdcontext.CurrentContextElement().setVarname(WDVISIBILITY.NONE);
Require to display
Wdcontext.CurrentContextElement().setVarname(WDVISIBILITY.VISIBLE);
This might helps u.
Thanks,
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Create a context attribute of type "Boolean".
In the button properties there is an property called "Enabled".
Bind that created context attribute with that property.
So whenever the context attribute is made as "false" it gets "disabled" and if "true" na it get "enabled".
Regards
Chandran S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
In wdDoModifyView() you can get the Button by specifying the name of the button
Regards
- Vinod
*
Gets the button with id Button1 and the second line makes it editable false
IWDButton btn1 = (IWDButton)view.getElement( "Button1");
btn1.setEnabled( false);
Gets the button with id Button2 and the second line makes it editable true
IWDButton btn2 = (IWDButton)view.getElement( "Button2");
btn2.setEnabled( false);
Edited by: Vinod V on Mar 4, 2008 10:08 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Either bind the "enabled" property to a context attribute or just change the enabling of the assigned action.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You create an attribute of boolean type and map it to enabled property of the button.
Now for enabling it use:
wdContext.currentContextElement().setEnableButton(true);
for disabling it use:
wdContext.currentContextElement().setEnableButton(false);
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Create an attribute of type boolean bind this to the enabled property of your button
based on your condition set the value of the context attribute to true/false
Ex: Lets say Enabled is the attribute of type boolean
wdContext.currentContextElement().setEnabled(true);
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.