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:
public String getReqNumLink() {
final SearchResults reqValues = (SearchResults) getCurrentRowObject();
final String reqNum = reqValues.getReqNum().trim();
final String entity = reqValues.getEntityCode().trim();
I am so sorry to have posted such a long email before. I tried one solution given by David earlier adding to the DISPLAYTABLE tag DEFAULTORDER="1" and DISPLAYSORT="ASCENDING". But this did not help my problem and the sorting is still a problem. I also added DEFAULTORDER to my column tag that is set to sortable="true" but still to no avail.
I know I must be missing a setting somewhere. ANY HELP or DIRECTION would be greatly appreciated.
Regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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();
I am so sorry to have posted such a long email before. I tried one solution given by David earlier adding to the DISPLAYTABLE tag DEFAULTORDER="1" and DISPLAYSORT="ASCENDING". But this did not help my problem and the sorting is still a problem. I also added DEFAULTORDER to my column tag that is set to sortable="true" but still to no avail.
I know I must be missing a setting somewhere. ANY HELP or DIRECTION would be greatly appreciated.
Regards.