Discussion:
How to change the properties file location in Wicket
oliver.stef
2012-05-17 12:27:27 UTC
Permalink
Hi all,

I just start using Wicket and I have a big problem!

I have a few sources files (Page (folder) with the files: Page1.html,
Page1.java, Page1.properties, Page2(another folder) with the files:
Page2.html, Page2.java, Page2.properties).

now, my problem is that i want to merge all the *.properties file into one
file (one *.properties file) that will be located in the src folder, or
under the root folder.

I don't know how to do it. i tried to read about "IResourceStream" but
still, i didn't understand nothing... :(

can someone help me with it?

Thanks!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
Martin Grigorov
2012-05-17 19:11:44 UTC
Permalink
Hi,

Create MyApplication.properties and put it next to MyApplication.java.
Post by oliver.stef
Hi all,
I just start using Wicket and I have a big problem!
I have a few sources files (Page (folder) with the files: Page1.html,
Page2.html, Page2.java, Page2.properties).
now, my problem is that i want to merge all the *.properties file into one
file (one *.properties file) that will be located in the src folder, or
under the root folder.
I don't know how to do it. i tried to read about "IResourceStream" but
still, i didn't understand nothing... :(
can someone help me with it?
Thanks!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
oliver.stef
2012-05-20 16:47:47 UTC
Permalink
Hi Martin,

Thank you for your help, but my problem is that i need to put my properties
file in folder that is not next to the HTML and Java files.

i need to change the look-up algorithm of wicket.

Any body know how to do it?

Thanks!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
Thomas Götz
2012-05-20 21:12:43 UTC
Permalink
Why do you need to change that? What is your usecase?

-Tom
Post by oliver.stef
Hi Martin,
Thank you for your help, but my problem is that i need to put my properties
file in folder that is not next to the HTML and Java files.
i need to change the look-up algorithm of wicket.
Any body know how to do it?
Thanks!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
Martin Grigorov
2012-05-21 06:40:12 UTC
Permalink
See org.apache.wicket.resource.loader.BundleStringResourceLoader

Or create your own impl of
org.apache.wicket.resource.loader.IStringResourceLoader and register
it with :
app.getStringResourceLoaders().add(yours)
Post by oliver.stef
Hi Martin,
Thank you for your help, but my problem is that i need to put my properties
file in folder that is not next to the HTML and Java files.
i need to change the look-up algorithm of wicket.
Any body know how to do it?
Thanks!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
oliver.stef
2012-05-31 06:34:39 UTC
Permalink
Hi Tom,

my usecase is:
I wan't wicket to search for the "key=value" in particular order, i.e:

let's say i have those propertis files:

1. ...\java\com\mycompany*\external\*WicketApplication_en.properties
2. ...\java\com\mycompany\WicketApplication_en.properties
3. ...\java\com\mycompany*\external\*WicketApplication.properties
4. ...\java\com\mycompany\WicketApplication.properties

so i want Wicket to load the "wicket:messag" in the following order:

<wicket:message key="eee" /> -->should be load from
...\java\com\mycompany\WicketApplication_en.properties

<wicket:message key="ccc" /> -->should be load from
...\java\com\mycompany*\external\*WicketApplication_en.properties

<wicket:message key="jjj" /> -->should be load from
...\java\com\mycompany\WicketApplication.properties

<wicket:message key="kkk" /> -->should be load from
...\java\com\mycompany\WicketApplication_en.properties

any idea?

Thanks!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4649606.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
oliver.stef
2012-05-31 06:37:38 UTC
Permalink
Please change the sentence "so i want Wicket to load the "wicket:messag" in
the following order: "
to "so i want Wicket to load the "wicket:messag" from the following files:"

Thanks!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4649607.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org

Continue reading on narkive:
Loading...