p:DataExporter Message Bundles support?

UI Components for JSF
Post Reply
scorpioleo
Posts: 5
Joined: 28 Jun 2011, 17:10

28 Jun 2011, 23:53

:oops:
Image

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Jun 2011, 08:30

Do you use <resource-bundle /> in faces-config? How do you define your bundle?

scorpioleo
Posts: 5
Joined: 28 Jun 2011, 17:10

29 Jun 2011, 19:13

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

alarik
Posts: 4
Joined: 09 Feb 2012, 10:07

09 Feb 2012, 10:50

I have the same problem.
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)
component var is:

Code: Select all

component	UIInstructions  (id=6131)	
and line

Code: Select all

String value = component.toString();
returns:

Code: Select all

 #{msg['sarp.balance.details.table.documentDate']}
And in view file:

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>
Any help?

alarik
Posts: 4
Joined: 09 Feb 2012, 10:07

13 Feb 2012, 21:52

So nobody can help in this issue?

alarik
Posts: 4
Joined: 09 Feb 2012, 10:07

20 Feb 2012, 16:21

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..

User avatar
gimrag
Posts: 1
Joined: 20 Sep 2013, 16:43

20 Sep 2013, 16:47

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!
Gürkan İMRAĞ

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 46 guests