on 01-18-2006 10:26 PM
Hi
How to make Table column empty.?
Thanks
It depends.
Assume the cell editor for the table column is a TextView and the type of the corresponding context attribute A is "string".
Let "Rows" be the data source node. To clear all entries in the table column bound to attribute A:
for (int i = 0; i < wdContext.nodeRows().size(); ++i)
{
IRowsElement row = wdContext.nodeRows().getRowsElementAt(i);
row.setA(null); /* or "" */
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In my application I have to select the date to display values in table from DateNavigator, for fisrt selction i am getting the right display when i select the second time the values are concatinating to the fisrt selected values....
well here i made those first selected values to null when i select the date again istead of first selected values i am getting empty rows then the second selcted values.?
Here i have to delete empty rows too..?
Thanks
Hi
If i write that line before adding elements itz giving error:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at com.sap.tc.webdynpro.progmodel.context.Node$ElementList.getElement(Node.java:2084)
at com.sap.tc.webdynpro.progmodel.context.Node.getElementAtInternal(Node.java:672)
You need to navigate each element of the node and set the what ever the value you want to set.
//Context Node to which table data soure attached is "MyNode"
for(int i = 0; i< wdContext.nodeMyNode().size(); i++) {
IWDNodeElement element = wdContext.nodeMyNode().getElementAt(i);
//"attruteName": Column data source; Refer IWDNodeElement Java Doc.
element.setAttributeValue("attrubuteName", "");
}
Sorry, I didn't see Armin's response
Message was edited by: Kranthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.