You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "andrea.castello" <a....@gmail.com> on 2010/11/25 10:07:04 UTC

"Shared" message property file not working on 1.4

Hi, here's a new episode of my Wicket "upgrade saga".
Hope I'm not disturbing anyone :D

In my application developed with Wicket 1.3.6 I have a
CarMessages.properties file which was sort of "shared" by two classes
CarListPage and CarDetail, since they use the same messages.
When I upgraded to 1.4 all the labels in CarMessages.properties are not
resolved anymore.

I solved the problem by creating two new properties file
CarListPage.properties and CarDetail.properties and it all works fine, but
this is kind of awful because I need to duplicate the messages in these two
files.

Is there any other way I can workaround this problem?

Thanks,

Andrea
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058612.html
Sent from the Users forum 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: "Shared" message property file not working on 1.4

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
How was this CarMessages.properties shared by the two classes? If your
car CarListPage uses CarDetail placing them on CarListPage should be
enough, AFAIK. Additionally on 1.4.X I think package level resource
files are supported.

Ernesto

On Thu, Nov 25, 2010 at 10:07 AM, andrea.castello
<a....@gmail.com> wrote:
>
> Hi, here's a new episode of my Wicket "upgrade saga".
> Hope I'm not disturbing anyone :D
>
> In my application developed with Wicket 1.3.6 I have a
> CarMessages.properties file which was sort of "shared" by two classes
> CarListPage and CarDetail, since they use the same messages.
> When I upgraded to 1.4 all the labels in CarMessages.properties are not
> resolved anymore.
>
> I solved the problem by creating two new properties file
> CarListPage.properties and CarDetail.properties and it all works fine, but
> this is kind of awful because I need to duplicate the messages in these two
> files.
>
> Is there any other way I can workaround this problem?
>
> Thanks,
>
> Andrea
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058612.html
> Sent from the Users forum 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:

Posted by "andrea.castello" <a....@gmail.com>.
One thing that I just noticed is that in every class I have this problem I
had to change the invocation of the method getModel() to getDefaultModel(),
according to the migration guide to 1.4.

Can the problem be there (honestly, I don't think so but, who knows, I'm
just a Wicket newbie)

Andrea
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058701.html
Sent from the Users forum 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: "Shared" message property file not working on 1.4

Posted by Martin Grigorov <mg...@apache.org>.
you can use com/example/something/package.properties
or MyApplication.properties (global)

On Thu, Nov 25, 2010 at 11:12 AM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> Another possibility is that had your own IStringResourceLoader registered
> via
> getResourceSettings().addStringResourceLoader(new MyResourceLoader())?
>
> Ernesto
>
> On Thu, Nov 25, 2010 at 10:57 AM, andrea.castello
> <a....@gmail.com> wrote:
> >
> > Hi,
> >
> >
> > Martin Grigorov-4 wrote:
> >>
> >> What is the relation between CarMessages.java (if there is such file)
> >> and CarDetail.java
> >> ?
> >> Does the one extend/implement the other ?
> >>
> >> On Thu, Nov 25, 2010 at 10:11 AM, adam.gibbons
> >> <ad...@gmail.com>wrote:
> >>
> >
> > There's no CarMessages.java, just the two I mentioned, which are not
> > apparently related (that surprieses me a bit)
> >
> > CarDetail extends a generic DetailPanel class (which extends Wicket's
> > panel), while CarListPage extends a genric ListPage...so apparently no
> > relation between the two. I wonder how they could work with just the
> > Carmessages.properties resource...anyway. How can I use package resource?
> Is
> > there a convention to do it in 1.4?
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058686.html
> > Sent from the Users forum 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: "Shared" message property file not working on 1.4

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Another possibility is that had your own IStringResourceLoader registered via
getResourceSettings().addStringResourceLoader(new MyResourceLoader())?

Ernesto

On Thu, Nov 25, 2010 at 10:57 AM, andrea.castello
<a....@gmail.com> wrote:
>
> Hi,
>
>
> Martin Grigorov-4 wrote:
>>
>> What is the relation between CarMessages.java (if there is such file)
>> and CarDetail.java
>> ?
>> Does the one extend/implement the other ?
>>
>> On Thu, Nov 25, 2010 at 10:11 AM, adam.gibbons
>> <ad...@gmail.com>wrote:
>>
>
> There's no CarMessages.java, just the two I mentioned, which are not
> apparently related (that surprieses me a bit)
>
> CarDetail extends a generic DetailPanel class (which extends Wicket's
> panel), while CarListPage extends a genric ListPage...so apparently no
> relation between the two. I wonder how they could work with just the
> Carmessages.properties resource...anyway. How can I use package resource? Is
> there a convention to do it in 1.4?
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058686.html
> Sent from the Users forum 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: "Shared" message property file not working on 1.4

Posted by "andrea.castello" <a....@gmail.com>.
Hi,


Martin Grigorov-4 wrote:
> 
> What is the relation between CarMessages.java (if there is such file)
> and CarDetail.java
> ?
> Does the one extend/implement the other ?
> 
> On Thu, Nov 25, 2010 at 10:11 AM, adam.gibbons
> <ad...@gmail.com>wrote:
> 

There's no CarMessages.java, just the two I mentioned, which are not
apparently related (that surprieses me a bit)

CarDetail extends a generic DetailPanel class (which extends Wicket's
panel), while CarListPage extends a genric ListPage...so apparently no
relation between the two. I wonder how they could work with just the
Carmessages.properties resource...anyway. How can I use package resource? Is
there a convention to do it in 1.4?
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058686.html
Sent from the Users forum 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: "Shared" message property file not working on 1.4

Posted by Martin Grigorov <mg...@apache.org>.
What is the relation between CarMessages.java (if there is such file)
and CarDetail.java
?
Does the one extend/implement the other ?

On Thu, Nov 25, 2010 at 10:11 AM, adam.gibbons <ad...@gmail.com>wrote:

>
> How about better architecture? Using a database instead of a file would be
> much nicer. With proper caching there's little to no difference in terms of
> performance than using a file.
>
> Cheers,
> Adam
>
> On 25 November 2010 09:07, andrea.castello [via Apache Wicket] <
> ml-node+3058612-308220060-201041@n4.nabble.com<ml...@n4.nabble.com>
> <ml...@n4.nabble.com>
> >
> > wrote:
>
> > Hi, here's a new episode of my Wicket "upgrade saga".
> > Hope I'm not disturbing anyone :D
> >
> > In my application developed with Wicket 1.3.6 I have a
> > CarMessages.properties file which was sort of "shared" by two classes
> > CarListPage and CarDetail, since they use the same messages.
> > When I upgraded to 1.4 all the labels in CarMessages.properties are not
> > resolved anymore.
> >
> > I solved the problem by creating two new properties file
> > CarListPage.properties and CarDetail.properties and it all works fine,
> but
> > this is kind of awful because I need to duplicate the messages in these
> two
> > files.
> >
> > Is there any other way I can workaround this problem?
> >
> > Thanks,
> >
> > Andrea
> >
> > ------------------------------
> >  View message @
> >
> http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058612.html
> > To start a new topic under Apache Wicket, email
> > ml-node+1842946-1499480286-201041@n4.nabble.com<ml...@n4.nabble.com>
> <ml...@n4.nabble.com>
> >
> > To unsubscribe from Apache Wicket, click here<
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=YWRhbS5zLmdpYmJvbnNAZ21haWwuY29tfDE4NDI5NDZ8LTUzNzMyMDU4OQ==
> >.
> >
> >
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058616.html
> Sent from the Users forum 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: "Shared" message property file not working on 1.4

Posted by "adam.gibbons" <ad...@gmail.com>.
How about better architecture? Using a database instead of a file would be
much nicer. With proper caching there's little to no difference in terms of
performance than using a file.

Cheers,
Adam

On 25 November 2010 09:07, andrea.castello [via Apache Wicket] <
ml-node+3058612-308220060-201041@n4.nabble.com<ml...@n4.nabble.com>
> wrote:

> Hi, here's a new episode of my Wicket "upgrade saga".
> Hope I'm not disturbing anyone :D
>
> In my application developed with Wicket 1.3.6 I have a
> CarMessages.properties file which was sort of "shared" by two classes
> CarListPage and CarDetail, since they use the same messages.
> When I upgraded to 1.4 all the labels in CarMessages.properties are not
> resolved anymore.
>
> I solved the problem by creating two new properties file
> CarListPage.properties and CarDetail.properties and it all works fine, but
> this is kind of awful because I need to duplicate the messages in these two
> files.
>
> Is there any other way I can workaround this problem?
>
> Thanks,
>
> Andrea
>
> ------------------------------
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058612.html
> To start a new topic under Apache Wicket, email
> ml-node+1842946-1499480286-201041@n4.nabble.com<ml...@n4.nabble.com>
> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=YWRhbS5zLmdpYmJvbnNAZ21haWwuY29tfDE4NDI5NDZ8LTUzNzMyMDU4OQ==>.
>
>

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Shared-message-property-file-not-working-on-1-4-tp3058612p3058616.html
Sent from the Users forum 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