myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerd Schaffer (JIRA)" <...@myfaces.apache.org>
Subject [jira] Issue Comment Edited: (MFCOMMONS-5) <mc:exporterActionListener> does not work with message bundles
Date Fri, 20 Feb 2009 13:03:01 GMT

    [ https://issues.apache.org/jira/browse/MFCOMMONS-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675351#action_12675351
] 

giemes edited comment on MFCOMMONS-5 at 2/20/09 5:02 AM:
----------------------------------------------------------------

ok - hwere is the whole example:
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
	    xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
      xmlns:mc="http://at.finanzfenster.web.components"
      xmlns:s="http://myfaces.apache.org/sandbox">
<body>
<t:saveState value="#{pageBean.list}" />
           <f:loadBundle basename="formmessages" var="form"/>
           <t:dataTable styleClass="standardTable"
               var="j"
               id="reportData"
               value="#{pageBean.list}"
               rowClasses="firstline, secondline"
               columnClasses=" , , , , column_right, column_right, column_right, , "
               sortColumn="#{cbaOutgoReportPageBean.sort}"
               sortAscending="#{cbaOutgoReportPageBean.ascending}"
               preserveDataModel="true"
               forceId="true"
               rendered="#{cbaOutgoReportPageBean.showResults}">
                   <t:column>
                       <f:facet name="header">
                           <t:commandSortHeader columnName="payedDate" arrow="true">
                               <t:outputText value="#{form.headerValue1}" />
                           </t:commandSortHeader>
                       </f:facet>
                       <t:outputText value="#{j.payedDate}" />
                   </t:column>
                       .
                       .
                       .
     </t:dataTable> 

<t:commandButton value="exportXLS">
  <mc:exporterActionListener filename="filename.xls" fileType="XLS" for="reportData" showDisplayedPageOnly="false"/>
</t:commandButton>
</body>
</html>

-----------------------
the message file is just a ordinary file: formmessages.properties file:
headerValue1=this is the header

-----------------------
the pageBean method returns a list like this:
...
	public Collection<RecordVo> getList() {
		if (jlist == null)
			jlist= new ArrayList<RecordVo>();
		return jlist;
	}
...

      was (Author: giemes):
    ok - hwere is the whole example:
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
	    xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
      xmlns:mc="http://at.finanzfenster.web.components"
      xmlns:s="http://myfaces.apache.org/sandbox">
<body>
           <f:loadBundle basename="formmessages" var="form"/>
           <t:dataTable styleClass="standardTable"
               var="j"
               id="reportData"
               value="#{pageBean.list}"
               rowClasses="firstline, secondline"
               columnClasses=" , , , , column_right, column_right, column_right, , "
               sortColumn="#{cbaOutgoReportPageBean.sort}"
               sortAscending="#{cbaOutgoReportPageBean.ascending}"
               preserveDataModel="true"
               forceId="true"
               rendered="#{cbaOutgoReportPageBean.showResults}">
                   <t:column>
                       <f:facet name="header">
                           <t:commandSortHeader columnName="payedDate" arrow="true">
                               <t:outputText value="#{form.headerValue1}" />
                           </t:commandSortHeader>
                       </f:facet>
                       <t:outputText value="#{j.payedDate}" />
                   </t:column>
                       .
                       .
                       .
     </t:dataTable> 

<t:commandButton value="exportXLS">
  <mc:exporterActionListener filename="filename.xls" fileType="XLS" for="reportData" showDisplayedPageOnly="false"/>
</t:commandButton>
  
> <mc:exporterActionListener> does not work with message bundles
> --------------------------------------------------------------
>
>                 Key: MFCOMMONS-5
>                 URL: https://issues.apache.org/jira/browse/MFCOMMONS-5
>             Project: MyFaces Commons
>          Issue Type: Bug
>          Components: myfaces-commons-components
>    Affects Versions: 1.0.1-SNAPSHOT
>         Environment: myfaces 1.2.6
> tomahawk 1.1.8
> sandbox 1.1.7 snapshot
> facelets 1.1.14
> tomcat 6.0.16
> Apache mod_jk 2
> Myfaces-common-components (current source with taglib from MFCOMMONS-3 issue)
>            Reporter: Gerd Schaffer
>            Assignee: Hazem Saleh
>
> The ExporterActionListener does not render value bindings that come from ressource message
files (needed for multilanguage). We took a look into the sourcecode but did not spot a big
difference between the render-method of the datatable or the output-text components and the
renderer of the exporter. The values are null in any case (see example below). It does not
matter if we have an output Text in the header, footer or "detail" part of a column- the value
from the bundle will never be drawn.
> Is it possible, that the ExporterActionListener cannot access the values drawn via value
bindings from message-files (ressource bundles) because the resource files are not in the
context of the exporter (or something similar)?
> our code:
>            <f:loadBundle basename="formmessages" var="form"/>
>            <t:dataTable styleClass="standardTable"
>                var="j"
>                id="reportData"
>                value="#{pageBean.list}"
>                rowClasses="firstline, secondline"
>                columnClasses=" , , , , column_right, column_right,
> column_right, , "
>                sortColumn="#{cbaOutgoReportPageBean.sort}"
>                sortAscending="#{cbaOutgoReportPageBean.ascending}"
>                preserveDataModel="true"
>                forceId="true"
>                rendered="#{cbaOutgoReportPageBean.showResults}">
>                    <t:column>
>                        <f:facet name="header">
>                            <t:commandSortHeader columnName="payedDate" arrow="true">
>                                <t:outputText value="#{form.headerValue1}" />
>                            </t:commandSortHeader>
>                        </f:facet>
>                        <t:outputText value="#{j.payedDate}" />
>                    </t:column>
>                        .
>                        .
>                        .
>      </t:dataTable>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message