-
1. Re: rich:column sortBy doesn’t sort properly
ilya_shaikovsky Feb 8, 2010 7:01 AM (in response to sumathra)not sure that get the point correctly. Could you please check if you have scroller/sorting problems there http://livedemo.exadel.com/richfaces-demo/richfaces/sortingFeature.jsf?c=sorting&tab=usage ? -
2. Re: rich:column sortBy doesn’t sort properly
sumathra Feb 9, 2010 12:06 AM (in response to ilya_shaikovsky)Thanks for your reply Ilya, but we are not quite ready to use the scrolling capability yet which involves some level of code change.
We actually merged th existing code to look like this, but the label currently appears as "Name with an Up arrow or Down arrow", but we would rather like to use the sortBy images which are shipped as part of richfaces. How do we achieve that?
<rich:column>
<f:facet name="header">
<ui:include src="/layout/sort.xhtml">
<ui:param name="entityList" value="#{userList}"/>
<ui:param name="propertyLabel" value="Name"/>
<ui:param name="propertyPath" value="user.firstName"/>
</ui:include>
</f:facet>
<s:link value="#{_user.fullName}" reRender="tabs" view="User.xhtml"
action="#{tabHome.setTab('home', 'account')}"
id="userViewId">
<f:param name="userId" value="#{_user.id}"/>
</s:link>
</rich:column>
layout/sort.xhtml looks like this
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:s="http://jboss.com/products/seam/taglib">
<s:link styleClass="columnHeader" value="#{propertyLabel} #{entityList.orderColumn == propertyPath ? (entityList.orderDirection == 'desc' ? messages.down : messages.up) : ''}">
<f:param name="sort" value="#{propertyPath}"/>
<f:param name="dir" value="#{entityList.orderColumn == propertyPath and entityList.orderDirection == 'asc' ? 'desc' : 'asc'}"/>
</s:link>
</ui:composition>