Skip to Content
author's profile photo Former Member
Former Member

TableSOrter Problem

Hi ,

I have one view having two tables and two buttons(Prev Table and NextTable) in the same view . These Tables are showing the data from the same Node .

If i click on prev button , i am displaying First table in the view and same for the Next button to display second table.

Here , on both tables i want a Table SOrting .

I have written the code in the modify view (Without FirstTime), i have taken two value atrributes of TableSorter type ...TableSorter.Java file is uploaded ,Two Actions ie SortAction and Sort1Action .

Sorting is Happening Perfectly But the Problem s that i am not able to see the icon of sorting after it happens ,user will not come to know what screen has done ,but it get sorted Properly .

if(wdContext.currentContextElement().getPrevViewTableVisible() == WDVisibility.VISIBLE)

{

IWDTable table1 = (IWDTable) view.getElement("Property_First_Table");

wdContext.currentContextElement().setTableSorter(

new TableSorter(table1, wdThis.wdGetSortAction() ,null));

}

if(wdContext.currentContextElement().getNextViewTableVisible() == WDVisibility.VISIBLE)

{

IWDTable table2 = (IWDTable) view.getElement("PropertyList_Table");

wdContext.currentContextElement().setTableSorter2(

new TableSorter(table2, wdThis.wdGetSort1Action() ,null));

}

Two SOrt Actions Code is

public void onActionSort(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionSort(ServerEvent)

wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.nodeProp_List());

//@@end

}

public void onActionSort1(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionSort1(ServerEvent)

wdContext.currentContextElement().getTableSorter2().sort(wdEvent, wdContext.nodeProp_List());

//@@end

}

Would Anyone tell whats going wrong ?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2006 at 08:11 AM

    Hi,

    Try opening the table sorter code and see which path the image location is pointed to.

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Code from actual sort method (From TableSorter.java File is ). Would you please tell what changes needs to be done for this .still not getting those sorting icons

      // set icon in currently sorted column

      if ( currentlySortedColumn.getHeader() != null )

      currentlySortedColumn.getHeader().setImageSource(reversable.isReversed()

      ? "~sapicons/s_b_srtd.GIF"

      : "~sapicons/s_b_srtu.GIF");

  • author's profile photo Former Member
    Former Member
    Posted on Mar 23, 2006 at 03:40 PM

    It seems there are not rewards for sharing code and explanations in questions. I just want to let you know that detail of your explanation of this problem helped me solve my sorting table problem.. <b>THANKS!!</b>

    BTY how did you solve the icon problem?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      My experience is that it is VERY important that the node which contains the data which should be sorted is a VALUENODE and not a MODELNODE!

      I can't imagine that it has something to do with this, but...

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.