on 09-13-2005 10:51 AM
Hi All,
I am trying to sort the contents of my table column and I am using the TableSorter.java for achieving the same.
When I call the sort method of the class TableSorter and on debuging, the control comes to sort function on sort event:
public void sort(IWDCustomEvent wdEvent, IWDNode dataSource)
{
// find the things we need
String columnId = wdEvent.getString("col");
IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
........
but <b>columnId is Null</b>.
Could you please help me and suggest what parameter to pass in place of "col" ??
Regards,
mahesh
Hi Mahesh,
Make sure you have written the following code snippet in your wdDoModify()
if (firstTime)
{
IWDTable table = (IWDTable) view.getElement("<table name>");
wdContext.currentContextElement().set<yourTableSorter_attribute>(new TableSorter(table, wdThis.wdGet<Action Name>Action(), null));
}
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which TableSorter class are you referring to?
As already was pointed out, you have to map UI event parameters like TableColumn.onAction.col to action handler parameters to use them in the action handler.
Other remark: In your code, you access UI elements from within event handlers, this is not allowed.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mahesh,
wdEvent.getString("col") should contain column ID. Did you call column.mappingOfOnAction().addSourceMapping("col", "col"); for every table column?
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.