on 06-26-2008 10:56 AM
hi
iam trying to sort the table in ascending
and descending order ,
but iam not able to sort my model node table .
below is the code i have written
and other thing i have created a class called Tablesorter.java
and copied the code of the TableSorter present in
IDE\eclipse\examples as i was not able to copy and
paste the TableSorter Class , in the
src\pkg.
import com.sap.tc.webdynpro.tests.utils.TableSorter;
if(firstTime)
{
view.nowCreateAllCustomExtensionFields();
IWDTable tab= (IWDTable)view.getElement("Table");
wdContext.currentContextElement().setCustomerTableSorter(new TableSorter(tab,wdThis.wdGetTableSortAction(),null,new String[] {"Customers") ));
}
in the above coding i am getting error as Constructor TableSorter is undefined.
wdContext.currentContextElement().getCustomerTableSorter().sort(wdEvent,wdContext.nodeCustomers());
can any one help me out ?
nbbbb
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
kishore,
replace your code by
if(firstTime)
{
view.nowCreateAllCustomExtensionFields();
IWDTable tab= (IWDTable)view.getElement("Table");
wdContext.currentContextElement().setCustomerTableSorter(new TableSorter(tab,wdThis.wdGetTableSortAction(),new HashTable() ,new String[] {"Customers") ));
}
do organize imports
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI create Value attribute TableSorter and bind the Java native type(TableSorter) to this Table sorter attribute property type
In DoModfiy View
if(firstTime)
{
IWDTABLE table =(IWDTABLE)View.getElement("Table");
wdContext.CurrentcontextElement().setTablSorter(new TableSorter(table,wdThis.wdGetsortaction(),null));
}
create a action on table sort
wdcontext.currentcontextElement().getTableSorter().sort(wdEvent,wdcontext.nodeItab());
try this code
Thanks and Regaards,
Tulasi.Palnati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
thanks for the response
i have tried wht u have posted above ,
but table sorting in working fine when iam creating
table using Value Node
but its failing when iam working this sorting scenario
on Model Node Table .
its showing error in the action method
sort();
i cannot copy model node data to the value node
as this will effect the performance of the application
there is huge amount of data present in the table .
can any one help ?
hi
thanks for the response
i cannot copy the model node data to the value node
as i am performing some operations in the itemlistbox
and then populating the model node table
and there will be thousands of data , so copying
the data to the value node will affect the performance
and other thing is i have one more table of model node
where i have to perform sorting , so is there a way
that TABLESORTING can be directly performed on the
model node , i have to perform ascending and descending order sorting on the two tables w.r.t the columns
can any one help me out ?
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.