on 12-21-2010 11:56 AM
I hv created tables, context, and d buttons dynamically.......
each table has got its own button n context..... but event is 1ly 1........
wen i lick on a button of particular table i want operations to be performed on tat particular table, for tat i need to tel d EVENT tat,
which table( i.e. which context)...
hw to pass d dynamically created context names to events????/
You can do one thing since there are three buttons you can make 3 different methods for those buttons like onClickofButton1(), onClickofButton2(),onClickofButton3(). Now what you need to do is call the event from these method by giving the parameter for event a value like for first button give the value 1 in the event similarly 2 and 3 for second and third. Now when you will writing the code for event you can put an if condition to give different logic for different buttons/table.
Regards,
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can map table with related context node element and write the table related code in the button which you have created.
Example code:
public void onActionOnUpload(com.sap.tc.webdynpro................)
{
IPrivate<ViewName>.I<node>element tab;
for(int i=0;i<=3;i++)
{
tab=wdcontext.create<;node>element();
tab.set<;attribute name>("value1");
tab.set<;attribute name>("value2");
"
"
"
"
wdcontext.node<;element>().addElement(tab);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.