on 07-06-2008 12:15 PM
Hello all,
I created a table element which contains a column of check boxes.
I want to add to my table an option to check/uncheck all the check boxes.
I already created the events but I dont know how to call the events I created using the table?
Thanks in advance,
Tomer
Hi Tomer,
you haven't said how your gui should look like. For example you can add two buttons ("select all" and "Unselect all") for this task. Now you add two actions, one for each button. Add the actions as eventtarget in the properties of the buttons. And in the event-methods of the actions you write your code to select/deselect the checkboxes, like
public void onActionSelectAll(...) {
for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(true);
}
}
public void onActionUnselectAll(...) {
for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(false);
}
}
HTH,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I already wrote the actions for select/unselect.
my problem is that I want to somehow call these actions from within the table.
can I somehow place a button or a link to action in the column header?
I saw that there is a select/unselect all rows button embeded in the table(top lef corner) but I wasnt able to connect this button to any events...
thanks,
Tomer
In SAP Service Market website, we can see the left upper corner existing in some pages, that's right.
But when I tried to insert UI element Table, the left upper corner did not be generated automatic.
And I could not find a property related to the function, so the way I used is add 2 button and write some codes to set all table row element selected.
I don't think the left upper corner is made up by java web dynpro. (Maybe by ABAP web dynpro or BSP/HTMLB? )
As I said this new functionality does not exist in all releases. It is a pure client-side functionality (provided by the Unfied Rendering framework which is used by Web Dynpro for its HTML implementation). There is no API or property to control it, it is just there (depending on the table's selection mode).
Armin
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.