p:DataExporter Message Bundles support?
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Do you use <resource-bundle /> in faces-config? How do you define your bundle?
-
- Posts: 5
- Joined: 28 Jun 2011, 17:10
hallo, i have defined it in faces-config.xml
<application>
<resource-bundle>
<base-name>com.xxx.bundle</base-name>
<var>gui</var>
</resource-bundle>
</application>
I tried also to define the message bundle within the jsf page like :
<f:loadBundle basename="com.xxx.bundle" var="gui" />
Mojarra 2.1.2 + Glassfish 3.1 + new primefaces M2-SNAP
<application>
<resource-bundle>
<base-name>com.xxx.bundle</base-name>
<var>gui</var>
</resource-bundle>
</application>
I tried also to define the message bundle within the jsf page like :
<f:loadBundle basename="com.xxx.bundle" var="gui" />
Mojarra 2.1.2 + Glassfish 3.1 + new primefaces M2-SNAP
I have the same problem.
faces-config:
primefaces version 3.1
On the debug mode I can see somthing like:
component var is:
and line
returns:
And in view file:
Any help?
faces-config:
Code: Select all
<application>
<message-bundle>messages</message-bundle>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<resource-bundle>
<base-name>messages</base-name>
<var>msg</var>
</resource-bundle>
<resource-bundle>
<base-name>ValidationMessages</base-name>
<var>val</var>
</resource-bundle>
</application>
primefaces version 3.1
On the debug mode I can see somthing like:
Code: Select all
in method protected String exportValue(FacesContext context, UIComponent component)
Code: Select all
component UIInstructions (id=6131)
Code: Select all
String value = component.toString();
Code: Select all
#{msg['sarp.balance.details.table.documentDate']}
Code: Select all
<p:column sortBy="#{balanceDetails.documentDate}" filterBy="#{balanceDetails.documentDate}"
filterMatchMode="contains">
<f:facet name="header">#{msg['sarp.balance.details.table.documentDate']}</f:facet>
<h:outputText value="#{balanceDetails.documentDate}" style="margin-left:10px">
<f:convertDateTime type="date" pattern="yyyy-MM-dd" />
</h:outputText>
</p:column>
Is there any chance to have at least reply with info "ok that's not possible in this version" or "check something ..." because I was trying everything that come to my mind to fix this and the last (and the worst) solution is to hardcode this in Java code..
use the <h:outputText value="#{msg['sarp.balance.details.table.documentDate']}" />
the code can be like;
<p:column sortBy="#{balanceDetails.documentDate}" filterBy="#{balanceDetails.documentDate}"
filterMatchMode="contains">
<f:facet name="header"><h:outputText value="#{msg['sarp.balance.details.table.documentDate']}" /></f:facet>
<h:outputText value="#{balanceDetails.documentDate}" style="margin-left:10px">
<f:convertDateTime type="date" pattern="yyyy-MM-dd" />
</h:outputText>
</p:column>
this works!
the code can be like;
<p:column sortBy="#{balanceDetails.documentDate}" filterBy="#{balanceDetails.documentDate}"
filterMatchMode="contains">
<f:facet name="header"><h:outputText value="#{msg['sarp.balance.details.table.documentDate']}" /></f:facet>
<h:outputText value="#{balanceDetails.documentDate}" style="margin-left:10px">
<f:convertDateTime type="date" pattern="yyyy-MM-dd" />
</h:outputText>
</p:column>
this works!
Gürkan İMRAĞ
-
- Information
-
Who is online
Users browsing this forum: No registered users and 46 guests