rdicroce / jsfexporter

Lapis JSF Exporter
19 stars 17 forks source link

IValueFormatter for h/p/a4j/r:commandLink #28

Closed yanLanglois closed 9 years ago

yanLanglois commented 10 years ago

"a4j:" for richfaces 4x "r:" for richfaces 5.x

rdicroce commented 10 years ago

h/p should already be working in the latest version. See #14. I did not test a4j/r so maybe those don't work.

yanLanglois commented 10 years ago

With the last release: 1.0.2.Final. I used a4j:commandLink in the rich:column header like this:

<rich:dataTable id="...">
    <rich:column sortBy="..." sortOrder="...">
        <f:facet name="header">
               <a4j:commandLink value="..." action="..." />
         </f:facet>
         <h:outputText value="..." />
     </rich:column>
     ...
</rich:dataTable>

And I got this information on the excel sheet: test

rdicroce commented 10 years ago

I just checked the RichFaces 5.x JavaDoc. The problem is that UICommandLink does not extend HtmlCommandLink. The PrimeFaces commandLink implementation does extend HtmlCommandLink, which is why that works.

The best way to fix this is probably to change CommandLinkFormatter so it handles UICommand instead of HtmlCommandLink. That would make it work for the RichFaces components, as well as h/p:commandButton (which would resolve #15).

rdicroce commented 9 years ago

Fixed in 1.0.3.Final, which should be in Maven Central shortly.