on 02-11-2006 5:19 AM
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try opening the table sorter code and see which path the image location is pointed to.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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");
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.