on 03-23-2009 8:39 AM
Dear Experts,
In my webdynpro application I am recieving a table from my Model, I have to read table rows fields and set them into my value attributes.
Request you to please suggest, and provide some code examples.
Warm Regards,
Upendra Agrawal
Hi Upendra,
Please go through this link:
Please note that there is method provided by the WDCopyService however i guessin this case that will not work since you want to transfer the model node data to value node. So you would have to iterate over the model node and set the values of the attributes in the value node.
Its similar requirement.
Thanks nad Regards,
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
catch the size of the table .
set the for loop
int i=wdcontext.TableName.size();
leadSelection = wdcontext.node<NOdename>.getLeadSelection();
for(int i=0;i<ni++)
{
if(wdcontext.<nodeNOdeName>.isSelected(i) || leadSelection==i)
{
fetch the data from the table using the index .
String abc = wdcontext.node<Table Name>.getElementNameatindex{}.get<element>;
you can then store this values in the value attribute you need.
}
the above code will help you single row selection . and if the user wants multi selection simply change the if condition as if(wdcontext.<nodeNOdeName>.ismutliSelected(i) )
or
if you want both then use write both if conditions .
murali
Edited by: murali krishna reddy on Mar 23, 2009 11:54 AM
Hi,
Like Ayyapparaj KV suggested, I'd use the same piece of code;
IEmployeesElement employeesElement = wdContext.nodeEmployees().getEmployeesElementAt(x);
IEmployeesFormElement employeesFormElement wdContext.nodeEmployeesForm().currentSelection();
WDCopyService.copyElements(employeesElement, employeesFormElement );
I'm guessing here that you want to do some sort of Editable Form, which is kinda common. I'd use 1.1 in the Form node. Just remember, you need the same Value Attribute Name / Type in order to use the Copy.
Regards,
Daniel
Hi ..
you have to use code like
target cardinality should be---0:N...
WDCopyService.copyElements(source,target)
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,
int size = wdContext.node<name>().size();
int leadSelection = wdContext.node<name>.getLeadSelection;
for(int i=0; i<size; i++)
{
if (wdContext.node<name>().isMultiSelected(i) || leadSelected == i)
{
I<node name>Element ele = wdContext.node<name>().get<Attribute>ElementAt(i);
// now get the attributes of the element ele and set it to the desired node element.
}
}
hope it helps you meet your requirement,
Jithin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 | |
10 | |
7 | |
6 | |
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.