cancel
Showing results for 
Search instead for 
Did you mean: 

model attribute multiple values handling

Former Member
0 Kudos

I have a model attribute "checked" which is under a model node T_Tasks.

T_Tasks is of type List and "checked" is having multiple values(size of T_Tasks).

I want to store all these multiples values of "Checked" in a value attribte "fetchedCheck" which of type List.

How can i do this.

Thanks

Akhilesh

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

answered

Former Member
0 Kudos

Hi Akhilesh,

List list = new List();

for(int i=0; i<wdContext.node<output>().size();i++)

{

String value = wdContext.node<output>().get<output>ElementAt(i).get<attribute>();

list.add(value);

}

wdContext.currentContextElement().set<ListAttribute>(list);

Regards,

Murtuza

PradeepBondla
Active Contributor
0 Kudos

Hi,

loop the values of "checked" for size of T_Task and inside the loop get the values from "Checked" and set those values to attribute "fetchedChecked".

PradeeP

Former Member
0 Kudos

>

> I have a model attribute "checked" which is under a model node T_Tasks.

> T_Tasks is of type List and "checked" is having multiple values(size of T_Tasks).

>

> I want to store all these multiples values of "Checked" in a value attribte "fetchedCheck" which of type List.

>

> How can i do this.

Hi,

Have you tried -

for loop (i=0; i<size of T_Tasks; i++)

fetchedCheck[<i>] = wdcontext.nodeT_Tasks().getElementAt(i).getChecked();

Regards,

Anagha