on 08-20-2008 3:14 PM
Hi All,
I have a tabel UI element and a delete button. When the user pushes the delete button, the currently marked line should get grayed out.
How can I do that?
Thanks, Johannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johannes,
I think it is clear to you that you need to bind the TableCellDesign of every row to your context attribute of type com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign.
I have done something like this
Current Situation
TableNode (0..n)
--- Attri1
--- Attri2
--- Attri New Situation : Introduce a new value node Color (1..1) singleton ture. Create a calculated value attribute calcCellDesign of type TableCellDesign. TableNode (0..n) Color(1..1) --calcCellDesign --- Attri1 --- Attri2 --- Attri
bind this Color.calcCellDesign to your table CellDesign of every column.
You need to create your logic inside the set and ge methods of the calcCellDesign .
For Example TableCellDesign.Standard or TableCellDesign.Grey to your set your calcCellDesign
Success
2 other questions:
1. Is there a way to mark a whole row (not each cell individually)?
2. Marking takes effect not until the user leaves the row. How can I have the row being marked as soon as the delete button was pressed (something like an update view function call at the end of the onActionDelete method)?
Thanks, Johannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You will need to set the enabled property of each TableCellEditor in that row. To do this, create a new attribute of type boolean under the node that is bound to the datasource property of the table. Bind this context attribute to the enabled property of each UI element (Inputfield, DropDowns etc.) that you have added to each column of the table. Finally, in the event-handler method for the "Delete" button, set this attribute to true for the node element at lead selection, something like this:
//Let's say the node is called TableData and the attribute is called "IsDeleted"
wdContext.nodeTableData().currentTableDataElement().setIsDeleted(true);
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.