Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » resource-bundle defined in faces-config.xml not used by validator and intellisen
resource-bundle defined in faces-config.xml not used by validator and intellisen [message #475016] Fri, 10 August 2007 16:58 Go to next message
jmi is currently offline jmiFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

in faces-config.xml i have following piece of configuration
<application>
<resource-bundle>
<base-name>bundles.messages</base-name>
<var>bundle</var>
</resource-bundle>
</application>

Bundle messages.properties is available in package "bundles". Everything
works when project is compiled and deployed. Only problem i have is
validation and intellisense. E.g. i have following tag in my jsp:

<h:outputText value="#{bundle.caption_preview}"></h:outputText>

Intellisense after "button." shows following items: class, keys, locale.
It should show keys from resource bundle.

Validation and intellisense works if <f:loadBundle is used.

Note: intellisense for backing-beans works well.

any idea how to solve the problem? Does someone else has the problem or is
it a bug or a feature?

thanks
best regards
jano
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #475018 is a reply to message #475016] Mon, 13 August 2007 17:50 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
The most likely causes are:

1) There is no messages.properties under a bundles package in any
classpath container (by default the project creates the "src" dir). Note
that we currently don't support localized property files with this
feature, so you need a messages.properties file in addition to whatever
localized files you may have (i.e. messages_DE.properties).

2) Your project doesn't have a Faces 1.2 facet. The resource-bundle
feature in faces-config is for JSF 1.2 and above only.


--Cam

jmi wrote:

> Hello,

> in faces-config.xml i have following piece of configuration
> <application>
> <resource-bundle>
> <base-name>bundles.messages</base-name>
> <var>bundle</var>
> </resource-bundle>
> </application>

> Bundle messages.properties is available in package "bundles". Everything
> works when project is compiled and deployed. Only problem i have is
> validation and intellisense. E.g. i have following tag in my jsp:

> <h:outputText value="#{bundle.caption_preview}"></h:outputText>

> Intellisense after "button." shows following items: class, keys, locale.
> It should show keys from resource bundle.

> Validation and intellisense works if <f:loadBundle is used.

> Note: intellisense for backing-beans works well.

> any idea how to solve the problem? Does someone else has the problem or is
> it a bug or a feature?

> thanks
> best regards
> jano
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #475021 is a reply to message #475018] Tue, 14 August 2007 16:48 Go to previous messageGo to next message
jmi is currently offline jmiFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

atm I don't have localized properties file, only one with
messages.properties name in bundles package in one of multiple source
folders. There is faces JSF 1.2 in project. Moreover everything works if
jsp uses tag
<f:loadBundle var="bundle" basename="bundles.messages" />

but if only faces-config.xml contains
<application>
<resource-bundle>
<base-name>bundles.messages</base-name>
<var>bundle</var>
</resource-bundle>
</application>

intelisense and validation doesn't work. In runtime there is no
difference, and everything works.

according to your post it looks like that it works for you. Maybe i should
try with simplier project setup.

regards
jano
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #475022 is a reply to message #475021] Tue, 14 August 2007 22:48 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
Two other things:

1) Go to the Project Properties menu and go to Project Facets. Ensure
that the version of the JSF facet 1.2.

2) Ensure you are using WTP 2.0. The resource bundle variable contributor
was not in WTP 1.5.x. The loadBundle contributor was.


--Cam
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #475023 is a reply to message #475022] Wed, 15 August 2007 07:24 Go to previous messageGo to next message
jmi is currently offline jmiFriend
Messages: 8
Registered: July 2009
Junior Member
1) i have it there.
2) i'm using it. Downloaded few days ago.

does this feature work for you?

regards
jmi
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #475026 is a reply to message #475023] Wed, 15 August 2007 19:37 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> does this feature work for you?

Yes. Could you produce an example project (or your actual project if it
something you can make publicly available) where the features don't work
you and attach it to a bug? This way I can try the actual code that you
are using and try to debug the problem.


--Cam
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #475030 is a reply to message #475026] Thu, 16 August 2007 14:45 Go to previous message
jmi is currently offline jmiFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

when making minimalistic example, i found that it works now. Maybe opening
of all dialogs when checking the settings and closing them with OK instead
of cancel did something what helped. Don't know.

Project itself was created by maven, not by eclipse, and WTP2.0 stuff was
added manually. Maybe there was something wrong and corrected after
opening WTP dialogs.

many thanks.

best regards
jmi
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #613876 is a reply to message #475016] Mon, 13 August 2007 17:50 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
The most likely causes are:

1) There is no messages.properties under a bundles package in any
classpath container (by default the project creates the "src" dir). Note
that we currently don't support localized property files with this
feature, so you need a messages.properties file in addition to whatever
localized files you may have (i.e. messages_DE.properties).

2) Your project doesn't have a Faces 1.2 facet. The resource-bundle
feature in faces-config is for JSF 1.2 and above only.


--Cam

jmi wrote:

> Hello,

> in faces-config.xml i have following piece of configuration
> <application>
> <resource-bundle>
> <base-name>bundles.messages</base-name>
> <var>bundle</var>
> </resource-bundle>
> </application>

> Bundle messages.properties is available in package "bundles". Everything
> works when project is compiled and deployed. Only problem i have is
> validation and intellisense. E.g. i have following tag in my jsp:

> <h:outputText value="#{bundle.caption_preview}"></h:outputText>

> Intellisense after "button." shows following items: class, keys, locale.
> It should show keys from resource bundle.

> Validation and intellisense works if <f:loadBundle is used.

> Note: intellisense for backing-beans works well.

> any idea how to solve the problem? Does someone else has the problem or is
> it a bug or a feature?

> thanks
> best regards
> jano
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #613879 is a reply to message #475018] Tue, 14 August 2007 16:48 Go to previous message
jmi is currently offline jmiFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

atm I don't have localized properties file, only one with
messages.properties name in bundles package in one of multiple source
folders. There is faces JSF 1.2 in project. Moreover everything works if
jsp uses tag
<f:loadBundle var="bundle" basename="bundles.messages" />

but if only faces-config.xml contains
<application>
<resource-bundle>
<base-name>bundles.messages</base-name>
<var>bundle</var>
</resource-bundle>
</application>

intelisense and validation doesn't work. In runtime there is no
difference, and everything works.

according to your post it looks like that it works for you. Maybe i should
try with simplier project setup.

regards
jano
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #613880 is a reply to message #475021] Tue, 14 August 2007 22:48 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
Two other things:

1) Go to the Project Properties menu and go to Project Facets. Ensure
that the version of the JSF facet 1.2.

2) Ensure you are using WTP 2.0. The resource bundle variable contributor
was not in WTP 1.5.x. The loadBundle contributor was.


--Cam
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #614171 is a reply to message #475022] Wed, 15 August 2007 07:24 Go to previous message
jmi is currently offline jmiFriend
Messages: 8
Registered: July 2009
Junior Member
1) i have it there.
2) i'm using it. Downloaded few days ago.

does this feature work for you?

regards
jmi
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #614177 is a reply to message #475023] Wed, 15 August 2007 19:37 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> does this feature work for you?

Yes. Could you produce an example project (or your actual project if it
something you can make publicly available) where the features don't work
you and attach it to a bug? This way I can try the actual code that you
are using and try to debug the problem.


--Cam
Re: resource-bundle defined in faces-config.xml not used by validator and intellisen [message #614189 is a reply to message #475026] Thu, 16 August 2007 14:45 Go to previous message
jmi is currently offline jmiFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

when making minimalistic example, i found that it works now. Maybe opening
of all dialogs when checking the settings and closing them with OK instead
of cancel did something what helped. Don't know.

Project itself was created by maven, not by eclipse, and WTP2.0 stuff was
added manually. Maybe there was something wrong and corrected after
opening WTP dialogs.

many thanks.

best regards
jmi
Previous Topic:Where can I change the HostElement attribute value?
Next Topic:AbstractTagConverter#doConvertRefresh
Goto Forum:
  


Current Time: Tue Apr 16 12:30:04 GMT 2024

Powered by FUDForum. Page generated in 0.43563 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top