cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Table UI Element

Former Member
0 Kudos

Hi SDN,

I have created a Table UI Element with Input Field editor property.I have maintained the cardinality 1-n for the context element. I clould able to enter the data in the first row but my problem is i could not able to enter the data in the second row even though all the 5 rows are in input mode. So can any one suggest me how to enable the second row after entering the data in the first row of the table.

Regards

basha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Basha,

I think you should create as many node elements as you need (5 I guess) in your code. By default only one is created (because of cardinalityy 1..n) that why you can only edit the first line.

Hope this helps,

Julien

Former Member
0 Kudos

Hi Julien,

Can u allobrate some what clearly. Hope a quick reply.

Regards

Basha

Former Member
0 Kudos

Basha,

You can make the cardinality of the node as 0..n and use the following code in wdDoinit of the view where the node resides.

for (int index= 0; index < 4; index++) {

IEmployeeElement employeeEle = wdContext.createEmployeeElement();

wdContext.nodeEmployee().addElement(employeeEle);

}

Here I have assumed that the node name is 'Employee'

I hope this will solve your problem.

Regards,

Anand

Former Member
0 Kudos

Hi Basha,

each input field in your table is bound to an element of the node.

Let's take Anand example with the employees. Then your context needs to look like this :

Employee node

__EmployeeElement

__EmployeeElement

__EmployeeElement

__EmployeeElement

__EmployeeElement

If your node cardinality is 1..n, you will by default have in your context :

Employee node

|__EmployeeElement

So you need to create (wdContext.createEmployeeElement()) and add to the node (wdContext.nodeEmployee().addElement(employeeEle)) the 4 missing elements.

Regards,

Julien

Former Member
0 Kudos

Hi Anand and Julien,

My problem is solved!!

Thanks a lot!

Regards,

Basha.S

Answers (0)