cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownByIndex

Former Member
0 Kudos

Hi All,

I have one problem with DropDownByIndex , i created one model node contains one child element mapped with model data .Data is coming fine But I want put first value in dropdown as SelectOption remaining should populate from model.

A,B and C come from model.

Example : Select Option

A

B

C

Thanks & Regards

Adams

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Set selection of context node to 1:1

Regards, ANilkumar

Former Member
0 Kudos

Anil ,

Thanks for your quick reply.

I want put first value as SelectOption and remaining will come from model table.

I took modelnode and mapped with model data.

Please reply back to me.

Thx & Regards

Adams

Former Member
0 Kudos

Hello Anil,

I took the model node (In the view) having one child element and mapped with component controller model data.Evem model node properties not allowing to change any properties.

In the view DropDownByIndex binded with that model node.

I guess you understood my problem now.

Thx & Regards

Adams

Former Member
0 Kudos

Hi

Create a value node "vnSample" and a value attribute "vaSampleatt" under that node. In the property of the node set the cardinality of value node to 1..n and Selection to 1..1

Bind that attribute to your DropdownbyIndex.

Now in the implementation give the code below.

<i>IPrivateSampleView.IVnSampleElement ele=wdContext.nodeVnSample().createVnSampleElement();

ele.setVaSampleAtt("Select Option");

wdContext.nodeVnSample().addElement(ele);</i>

//Loop for the number of values in the model node and create elements for the value node "vnSample" and set values to "vaSampleAtt".

After setting the values set the leadselection of the 0.

<i> wdContext.nodeVnSample().setLeadSelection(0);</i>

Hope this helps.

Regards,

Rathna

Former Member
0 Kudos

adam,

Then set selection cardinality to 1..1 in component controller node.

VS

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Adam:

If u r still looking for code, check here it is:

-


IPrivateWelComeAppView.IOneElement oE = wdContext.nodeOne().createOneElement();

IPrivateWelComeAppView.IOneElement oE1;

oE.setO1("Select");

wdContext.nodeOne().addElement(oE);

for(int i=0;i<6;i++){

oE1 = wdContext.nodeOne().createOneElement();

oE1.setO1("A"+i);

wdContext.nodeOne().addElement(oE1);

}

-


Node Name: One

Attrib Name: O1

Munna SAP

Former Member
0 Kudos

Hi All,

Thanks everybody for your replies.

Rathna answer has worked out.

Thanks & Regards

Adams