on 04-07-2009 11:05 AM
HI,
Experts,
I am new to web dynpro for java i was able to create a project and component and my intention is to change the text value of a view(default view) when ever i press a button.
Thank u,
Shabeer ahmed.
Hi sabeer,
if you want to change your default view when you click on button..so you need to some code written in WddoModify
in
public static void wdDoModifyView(IPrivateCheckView wdThis, IPrivateCheckView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
urView=view;
}
declare in view..at
//<@other begin
static IWDView urView=null;
//<@end
crate one action for button like
public void onActionShowChange(event){
//TextView1--id of textview Ui element
IWDTextView text=(IWDTextView) urView.getElement("TextView");
text.setText("you choice massage");
}
this action assign your button..
hope this will work
thanks
jati
Edited by: sudhir kumar on Apr 7, 2009 12:22 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank u
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shabbir
You have hard coded the "Hello world" in the text property of your "TEXT VIEW" UI element.
Thats not the procedure to change the text of above UI element when user is pressed a button.
Create a context attr in the context and bind with the text property of the UI element.
Create an action and bind with the onAction event of a button
In the action property change the value like
wdContext.currentContextElement().set<ATTRIBUTE NAME>("Your Custom Value");
Regards
Kalyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shabeer,
Hope you have created an Action and bind it to the button.
Create an attribute in your context and bind that to the text UI element of the default view.
In onAction<action> method change the text of the context attribute. It will get reflected in your view when you press the button.
Hope this helps.
Sathya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shabeer,
Bind you TextView UI element to the context attribute and change the value on the action of Button by setting the value to a context attribute.
Thanks,
Jhansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.