cancel
Showing results for 
Search instead for 
Did you mean: 

Input table becomes Read-Only

former_member300754
Participant
0 Kudos

Hi all,

I'm trying to implement input table but the table shows as read-only.

1. Node cardinality = 0...n

2. Selection = 0...1

3. Singleton = true

All fields are input field.

After i deploy and run the application, the read-only table shows up.

Please advise me on this. Thanks in advance.

Peerasit

Accepted Solutions (1)

Accepted Solutions (1)

gill367
Active Contributor
0 Kudos

Hello Jomsri,

The table is coming as read only because you havenot added any element to the nodes and by default there will be no element in the node as you are selecting a cardinality of 0...n. If you change it to 1..n then you can see one row will have input fields enabled.

Best way to implement this is add a button in the layout, name it as add a new row and in the action of this button add the following code:-



    	IPrivateTestingCompView.I<nodename>Element a = wdContext.node<nodename>().create<nodename>Element();
    	wdContext.node<nodename>().addElement(a);
  

this will add a new row to the table each time you press the push button.

Hope this will solve the problem

Regards,

Sarbjeet

former_member300754
Participant
0 Kudos

Thanks Sarbjeet and Fazal.

Answers (1)

Answers (1)

former_member201361
Active Contributor
0 Kudos

Hi,

Have u created node elements to display?

u have to create and add node elements.

for eg:

let say ur node is "Test",

ITestElement element = wdContext.nodeTest().createTestElement();

element.set<Attibute name>() = " XXXXXXXXX";

wdContext.nodeTest().addElement(element);

Hope it helps

Thanks and Regards

Fazal