on 09-09-2009 6:49 AM
Hi ,
I have 2 buttons in the view.once if i click on one button , the second button should be disabled.how to proceed on this?
Regards,
Pavani
Hi If you want to disable the second button then create an context attribute (suppose ButtonEnable) of type boolean. and bind it with the enabled property of second button and write following code in onAction of first button.
wdContext.currentContextElement().setButtonEnable(false);
And if you want after clicking on first button second button should not visible at all then Use following approach.
create a value attribute suppose Buttonvisibility of type Visibility and bind the visibile property of your second Button with attribute ButtonVisibility.
To create value attribute "ButtonVisibility" --> Go to the properties tab --> Select the type --> click on lookup button --> Choose Dictionary Simple Type --> Expand Local Dictionary > Expand com.sap.ide.webdynpro.uielementdefinitions>Select Visibility
And write following code in onAction of first button.
wdContext.currentContextElement().setButtonVisibility(WDVisibility.NONE);
I hope it helps.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavani,
If you want to once you click on 1st button then 2 button has to Nonvisible in View.
better you have to create one Value attribute in view controller and go to Type propery of atrribute click on button beside
type properties,then set visible api in List.
Visible Type==com.sap.ide.webdynpro.uielementdefinitions.visibilty
supoose attibute Neme--Visible.
when you click on Ist button has action metheod which you have created..
action method as ---onActionVisible
public onactionvisible(event){
wdContext.currentContextelement().setVisible(wdVisibility.NONE);
/////////////////////your code/////////////////////////
}
Thanks
Jati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan
In the propertyButton enabled is there. Bind it with ur context. The context should be boolean type.
Then On action event of your button you have to make enablity false. Like this
wdContext.currentContextElement().setu2026.(false);
Prashant Krishen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi PavaniPoruri ,
1)create on value attribute say "visible" of type com.sap.ide.webdynpro.uielementdefinitions.visibilty
2)bind this attribute to the visible property of the second button.
3)write the code in the Action of the First button.
wdContext.currentContextElement.setVisible(WDVisibility.NONE);
For Disabling the button.
1)create one context attribute of type boolean say "enable "and map it to the enable property of second button.
2)write the code in action method of first button
wdContext.currentContexElement.setEnable(false);
Regards,
srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.