Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4779994 By: savoym
My SQL query sorts by the REQNNUM value in a ASC order by default. The information in my DISPLAYTAG table is sorted correctly when I first come into my JSP page. The problem is that when I click on the REQ # title in the first column of my table the order should change to a DESC order however the order is anything but. There appears to be no order in which the rows are displayed and they are NOT displayed by REQ # order at all. I've read through the website and I've tried entering an EXTERNAL sort in the table tag in my JSP page with a sortNAME of the column name but to no avail. I'm just not sure how to proceed. I am NOT using the EXTERNAL PAGING/SORTING option and do not know why I would have to. Any help or direction would be greatly appreciated. The code for the JSP page, table decorator that I created, and the SORT property setting in my DISPLAYTAG properties file is all below: I have the following in my JSP page: <display:table sort="list" name="actionBean.results" decorator="org.texashealth.scm.displaytag.decorator.SCMTableDecorator" pagesize="50" requestURI="/reqs/Search.action" class="reqList"> <display:column property="reqNumLink" title="Req #" sortName="REQNUM" sortable="true" class="reqNum"/> <display:column property="poNum" title="PO #" class="poNum"/> <display:column property="delivrToDeptCode" title="Del" class="del"/> <display:column property="chrgToDeptCode" title="Chg" class="chg"/> <display:column property="srceLocation" title="Src" class="src"/> <display:column property="purchDeptCode" title="Pur" class="pur"/> <display:column property="recStatus" title="St" class="st"/> <display:column property="createdBy" title="Created By" class="created"/> <display:column property="assignedTo" title="Assign To" class="assigned"/> <display:column property="reqTypeValue" title="Typ" class="typ"/> <display:column property="vendorCatNum" title="Vendor Cat #" class="vnd"/> <display:column property="itemNum" title="Item #" class="item"/> </display:table> In my DISLAYPROPERTIES file: # page | list sort.amount=list In my DECORATOR: public String getReqNumLink() { final SearchResults reqValues = (SearchResults) getCurrentRowObject(); final String reqNum = reqValues.getReqNum().trim(); final String entity = reqValues.getEntityCode().trim(); if (reqValues.isNonStock()) return "<a href = \"/reqs/NonStock.action?view=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isNonStockCredit()) return "<a href = \"/reqs/NonStock.action?viewCredit=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isStock()) return "<a href = \"/reqs/StockRequisition.action?view=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isStockless()) return "<a href = \"/po/StocklessRequisition.action?view=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isStocklessCredit()) return "<a href = \"/po/StocklessRequisition.action?viewStocklessCreditReq=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isInventory()) return "<a href = \"/po/InventoryRequisition.action?view=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isInventoryCredit()) return "<a href = \"/po/InventoryRequisition.action?viewInvCreditReq=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isCapital()) return "<a href = \"/reqs/NonStock.action?view=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; else if (reqValues.isCapitalCredit()) return "<a href = \"/reqs/NonStock.action?viewCredit=&reqNum=" + reqNum + "&entityCode=" + entity + "\">" + reqNum + "</a>"; return reqNum; } public String getReqTypeValue() { final SearchResults reqValues = (SearchResults) getCurrentRowObject(); if (reqValues.isNonStock()) return "NST"; else if (reqValues.isNonStockCredit()) return "CRN"; else if (reqValues.isStock()) return "STK"; else if (reqValues.isCapital()) return "CAP"; else if (reqValues.isCapitalCredit()) return "CRP"; else if (reqValues.isStockless()) return "STL"; else if (reqValues.isStocklessCredit()) return "CRL"; else if (reqValues.isInventory()) return "INV"; // Req should be an Inventory Credit return "CRS"; } ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=249317 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user