Eric,
Their is an example of using <t:commandSortHeader> in Tomahawk's examples [1], 
but it does not
include a graphic image.  I would start by simplifying your usecase.  
Specifically try the following
then add the <h:outputText value="Column 0"/> and finally convert the <h:outputText/> 
to <t:graphicImage>.

     <t:commandSortHeader columnName="0" arrow="false" immediate="false">
       <f:facet name="ascending">
         <h:outputText value="ascending.gif"/>
       </f:facet>
       <f:facet name="descending">
         <h:outputText value="descending.gif"/>
       </f:facet>

     </t:commandSortHeader>

I also suggest changing the loggging setting [2] to see what MyFaces is doing.

Although I am using sortable table with Tomahawk 1.1.5, I have not used 
<t:commandSortHeader>

Paul Spencer


[1] 
http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/sortTable.jsp?view=markup
[2] http://wiki.apache.org/myfaces/LoggingSettings


[EMAIL PROTECTED] wrote:
Hi Paul,

Thanks for the reply. The table is inside an <h:form/>. I left it out below for the sake of brevity. Any other ideas?






Paul Spencer <[EMAIL PROTECTED]> 04/26/2007 12:24 PM
Please respond to
"MyFaces Discussion" <[email protected]>


To
MyFaces Discussion <[email protected]>
cc

Subject
Re: sort arrows for <t:column>






Eric,

The table must be inside a <h:form>

Paul Spencer


[EMAIL PROTECTED] wrote:
Hi,

I'm trying to get <t:column/> elements to display custom ascending/descending sort arrows. I've converted the following code
(which
works well but displays the default text sort arrows):

  <t:column sortable="true">
    <f:facet name="header">
      <h:outputText value="Column 0"/>
    </f:facet>
    <h:outputText value="#{row.id}" />
  </t:column>

to:

<t:column defaultSorted="true" sortable="true">
  <f:facet name="header">
    <t:commandSortHeader columnName="0" arrow="false" immediate="false">
      <f:facet name="ascending">
        <t:graphicImage value="ascending.gif"/>
      </f:facet>
      <f:facet name="descending">
        <t:graphicImage value="descending.gif"/>
      </f:facet>
      <h:outputText value="Column 0"/>
    </t:commandSortHeader>
  </f:facet>
  <h:outputText value="#{row.id}" />
</t:column>

This displays graphic sort arrows, but clicking on the column header doesn't actually *sort* the columns any more (a submit is performed
after
clicking the column, but the data is displayed in the same order as
before
clicking the column). The column is contained within this <t:dataTable/>

<t:dataTable id="dt" value="#{bean.dataObjects}" var="row" binding="#{bean.dataTable}" preserveDataModel="false"
preserveSort="true">
What might I be doing wrong?

Thank you for any advice,
Eric Jung

_________________________

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for
the
exclusive use of the individual or entity named above and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivery of the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly

prohibited. If you have received this communication in error, please notify the sender immediately by e-mail and delete the material from any

computer.  Thank you.





_________________________

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the exclusive use of the individual or entity named above and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivery of the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by e-mail and delete the material from any computer. Thank you.



Reply via email to