cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Input Field in Table Control

former_member187658
Participant
0 Kudos

Hi

I have put Input Field in one of the Columns of the table. In this field the user is going to fill the data.

But when i run the application, I am not able to place cursor on it, even though its visible property is set to visible and enabled property is also set true.

If anybody knows please help , it is urgent.

Thanks & regards,

Anupreet

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Get the numer of rows coming from the backend by

int size=wdContext.node<<name of the node>>.size();

Next, create this many number of node elements for the input fields.

Eg:

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

{

// Create and add elements here

}

Regards

Leena

Former Member
0 Kudos

Hi Anupreet,

Have you resolved your issue?

If yes then please close this thread.

Regards,

Bhavik

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anupreet,

if you have bound the input field to a node of cardinality 0-n or 1-n then u need to instantiate the node .Otherwise do one thing bind to the

node of cardinality 1:1

iprivate<view name>.i<node name>element element= wdcontext.node<node name>.create<node name>element();

wdcontext.node<node name>.bind(element);

Hope this helps you,

Regards

Rohit

former_member187658
Participant
0 Kudos

Hi Rohit

I have bound the node to the node of cardinality 1:n, and tried to instantiate it the way you told, but it didn't work. whereas if i use 1:1 then only 1 input field int eh table gets highlighted. but i want all the corresponding cells in that column to show the input fields in order to input data.

can you please help in it.

Former Member
0 Kudos

Please read my posting above: Create as many node elements in the data source node as needed, these will be shown as empty table rows. Set the cardinality of the data source node to 0:N or 1:N.

Armin

former_member187658
Participant
0 Kudos

Hi Armin

Thanks a lot. But i have one doubt. The number of rows in my table are going to be dynamic, as except for 1 column the rest of the data is being picked up from the backend. So as such i cannot specify that this number of rows are going to be required. can you hep in that as to how to go about it.

Thanks & regards,

Anupreet

Former Member
0 Kudos

Hi,

You can get the size of the node by using wdContext.node<<name of the node>>.size().

Regrads,

Vijith

Former Member
0 Kudos

Hi Anupreet,

Do one thing.

Put one button on the top of table control.

Write following code of adding element in this action method.

iprivate<view>.i<node>element ele = wdContext.create<node>element();

wdcontext.node<node>().addelement(ele);

So, whenever you click this button it will add one row to your table. And as element is created you can also enter values in this input field.

Regards,

Bhavik

Former Member
0 Kudos

Hi Anupreet!

Try changing the cardinality of the value node that you might be using. Tell me if this worked out.

former_member187658
Participant
0 Kudos

Hi Fran

No Fran, it is not working out.

Former Member
0 Kudos

Check that the column is not set as ReadOnly. Did you inserted a new column in the table, or you just binded directly?

former_member187658
Participant
0 Kudos

Hi

No, the column is not set as ReadOnly. Besides, I have inserted a new column and in that using TableCellEditor inserted the Input Field. But it is not showing up in the table when i run the Application.

Former Member
0 Kudos

To get a Web Dynpro table working:

- Create IWDTable UI element, bind property IWDTable.dataSource to context node X with cardinality 0:N or 1:N

- Add column (IWDTableColumn) to table

- Choose a cell editor for the column, e.g. IWDInputField

- Bind properties of cell editor to attributes of node X, e.g. bind property IWDInputField.value to an attribute with simple type like string, integer, date etc.

To add table rows, add node elements.

Table row at index i corresponds to node element at index i of node X.

Table selection corresponds to selection of node X.

Armin