AnsweredAssumed Answered

Problem using the a:richList (initialSortColumn)

Question asked by geert on Mar 28, 2008

For a project I need a custom browse page with custom columns. I created a CustomBrowseBean extending from BrowseBean and took a copy of browse.jsp. I added an extra column an everything works fine…

But… :wink: I also need some custom initial sort depending on the current Space. I added a method on CustomBrowseBean that returns a String (the a:sortLink value).
Here a copy of my a:richList tag:

<a:richList id="contentRichList" [b]initialSortColumn="#{BrowseBean.sortColumn}"[/b]
      pageSize="#{BrowseBean.pageSizeContent}" styleClass="recordSet"
      headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
      altRowStyleClass="recordSetRowAlt" width="100%"
      value="#{BrowseBean.content}" var="r">

The problem is that the getSortColumn() is not called from the CustomBrowseBean. I set a breakpoint on the getSortColumn() method but the debugger doesn't stop there when I call the browse page.
To test if my code is correct I put the following line on my page:
<h:outputText value="#{BrowseBean.sortColumn}"></h:outputText>
The value is printed correctly on my page (and the debugger stops in the method). In my case that is "dateLastUpdated".

Now I set the "dateLastUpdated" directly in initialSortColumn and it works perfect. Default sorting on that column is enabled on all the pages.

What am I doing wrong? The initialSortColumn supports rtexprvalue so it should work doesn't it?

Hope someone can help me.

Kind regards,