cancel
Showing results for 
Search instead for 
Did you mean: 

Table getting disabled

Former Member
0 Kudos

Hi,

All my cell editors in the table are getting disabled when attach my model node to the table.

Can any one give me a solution please

regards,

Kumar.

Accepted Solutions (1)

Accepted Solutions (1)

sridhar_k2
Active Contributor
0 Kudos

Hi Kuamar,

Is it properly mapped to model? These type of problems comes, when we dont map properly to model. Check it once?

Sridhar

Former Member
0 Kudos

The custom controller context is mapped to model. The view context is mapped to the custom controller. Finally the table is mapped to the view context.

By default the cardinality of the root node is set to 0..n and selction to 0..1

Please let me know.

Former Member
0 Kudos

You have to change cardinality to 1..1 or 1..n, Otherwise your context will be empty, thus no data will be available.

Former Member
0 Kudos

Hi Aditya,

The table is disabled because you haven't created elements for the node. Each row of a table represents an element of the bounded node. So before the table is displayed, create as many elements as the no: of rows you want by this code:

Let <table node> be the node that you have bound to the table.

IPrivate<your view>.I<tableNode>Element elmt;

for(int i=0;i<no_of_rows_req;i++)

{

elmt = wdContext.node<table node>().create<table node>Element();

// if you want some data to be shown as the default ones, you can do it here as

elmt.set<attribute name>(<data>);

wdContext.node<table node>().addElement(elmt);

}

Now those many rows will be active.

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

This message was moderated.

Answers (2)

Answers (2)

Former Member
0 Kudos

Probably your model is empty or not bound correctly such that the table cell editors have no storage location. In this case editors are disabled by the framework.

Armin

Former Member
0 Kudos

armin,

What do you mean by model is empty? Can you please explain. The contents of the table should go as input to the model (Bapi) and so i have directly attached the table to the model.

and in my init i have written the code;

Bapi_Salesorder_Createfromdat2_Input createSO_input = new Bapi_Salesorder_Createfromdat2_Input();

wdContext.nodeBapi_Salesorder_Createfromdat2_Input().

bind(createSO_input);

Renjith;

Neither my table is not disabled nor the cell editors (enabled = true; readonly = false)

Former Member
0 Kudos

Hi Kumar,

Pls check the properties of the Table containing the cell editors.

The table properties over-ride the corresponding column properties.

For ex: if the table is 'disabled', then the fields in it will not be editable no matter what the settings are at column level.

Thanks & Regards,

Renjith