You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by jensiator <je...@megasol.se> on 2009/03/16 12:33:05 UTC

Global resources

Hi
Im suspecting that there is a very easy solution for my problem this time. 
I got to define som global string resources. I allready have a
MyApplication.xml where I store them. Our application is going to be big so
I need a way to splitt the properties in differents xml files in the future.
Example: We want to localize enums. We will have alot of enums and I dont
want to have them in MyApplication.xml. So how can I load an extra
EnumNames.xml? 

IMPORTENT: I dont want to create an empty EnumNames.class to load the
resource. I dont want to add dummy classes just for adding global resources.
Jens
-- 
View this message in context: http://www.nabble.com/Global-resources-tp22536340p22536340.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Global resources

Posted by Igor Vaynberg <ig...@gmail.com>.
see PropertiesFactory, both .properties and .xml are loaded the same way.

-igor

On Wed, Mar 18, 2009 at 7:06 AM, jensiator <je...@megasol.se> wrote:
>
> Thanks Igor
> That really help me getting started.  I'm able to use
> BundleStringResourceLoader but it only loads property files. Do I have to
> write my own StringResourceLoader for xml file propertyfile?
> Jens Alenius
>
> --
> View this message in context: http://www.nabble.com/Global-resources-tp22536340p22579172.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Global resources

Posted by jensiator <je...@megasol.se>.
Thanks Igor 
That really help me getting started.  I'm able to use
BundleStringResourceLoader but it only loads property files. Do I have to
write my own StringResourceLoader for xml file propertyfile?
Jens Alenius

-- 
View this message in context: http://www.nabble.com/Global-resources-tp22536340p22579172.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Global resources

Posted by Igor Vaynberg <ig...@gmail.com>.
see iresourcesettings#addstringresourceloader()

-igor

On Mon, Mar 16, 2009 at 4:33 AM, jensiator <je...@megasol.se> wrote:
>
> Hi
> Im suspecting that there is a very easy solution for my problem this time.
> I got to define som global string resources. I allready have a
> MyApplication.xml where I store them. Our application is going to be big so
> I need a way to splitt the properties in differents xml files in the future.
> Example: We want to localize enums. We will have alot of enums and I dont
> want to have them in MyApplication.xml. So how can I load an extra
> EnumNames.xml?
>
> IMPORTENT: I dont want to create an empty EnumNames.class to load the
> resource. I dont want to add dummy classes just for adding global resources.
> Jens
> --
> View this message in context: http://www.nabble.com/Global-resources-tp22536340p22536340.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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