cancel
Showing results for 
Search instead for 
Did you mean: 

Very Urgent!!!! Reg Tables in Web Dynpros

Former Member
0 Kudos

Hi all,

The following is my requirement.

I need to display values in my table on the view. But based on the Field content in one perticular column i need to make that entire row editable/in editable.

Say I have a column Status in my Table.

If the status field content for a given row is 'In progress' then that row should be made Editable and all other rows with status other than 'In Progress' should be made Ineditable.

Please Revert back ASAP.

Thanks

Sravan.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Sravan,

In context node create attribute enabled (type boolean), set it to appropriate value depending on your status attribute after data load, bind attribute to enable proprty of your table columns.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

Thanks a lot for the reply. With the solution provided we can enable/disable different columns of the table. But my requirement is that, i should make certain rows enable/disabled based on content of one of the fields in that row. Certain columns should be enabled for certain rows and same columns might have to be disabled for other rows.

Please let me know if this is also possible.

Thanks in advance,

Sravan

Former Member
0 Kudos

Sravan,

Maksim made a small mistake:

istead of <i>bind attribute to enable proprty of your table columns</i>

do the following: bind attribute to enable proprty of your table column <b>editor</b>.

VS

Former Member
0 Kudos

Hi,

In my opinion, creating a single boolean attribute to your context and binding it to the tablecolumn editors won't work, because all your editors will then share the same attribute. Once you change it, all others will use this value.

Try using the wdDoModifyView() method and modifying the table rows dynamically.

Regards,

Satyajit.

former_member182372
Active Contributor
0 Kudos

Satyajit, could you please give some more details about how to "modify the table rows dynamically" in wdDoModifyView?

Actually, I was talking about creation boolean attribute within context node (which is must probably the case).

former_member182372
Active Contributor
0 Kudos

Hi Sravan,

Could you please decribe your context structure? It will simplify description of solution.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

No, do not use wdDoModifyView().

You could add a calculated boolean attribute "ReadOnly" under the data source node "Rows", and (assuming the table cell editor is an InputField) bind the "readOnly" property of the input field to this attribute.

In the generated getter for the calculated attribute, you would write something like

boolean getRowsReadOnly(IWDNodeElement element)
{
  //@@begin ...
  IRowsElement row = (IRowsElement) element;
  return row.getState() != State.IN_PROGRESS;
  //@@end
}

Armin

Former Member
0 Kudos

hi sravan

use a supply node function.

Try this procedure:

Create a node name --> EditNode and a value

attribute-->Edit of type boolean. Attach that to the Progress column edit.

Now in the supply function write something like this:


if(parentElement.getStatus().equals("In Progress))
 node.setEdit(true);

I hope this helps

Thanks

Srikant