Hi Johan
I have created a jira but i have closed it again.
https://issues.apache.org/jira/browse/WICKET-742
The IStringResourceLoader was only called 3 times if debug was enabled. No
problem when running in a deployment environment.
This method was triggering the 3 calls
LoadableDetachableModel.getObject()
/**
* @see org.apache.wicket.model.IModel#getObject()
*/
public Object getObject()
{
if (!attached)
{
attached = true;
transientModelObject = load();
if (log.isDebugEnabled())
{
log.debug("loaded transient object " + transientModelObject
+ " for " + this
+ ", requestCycle " + RequestCycle.get());
}
onAttach();
}
return transientModelObject;
}
/Murat
2007/7/11, Johan Compagner <[EMAIL PROTECTED]>:
add an issue to jira with a quickstart case
On 7/11/07, Murat Yücel <[EMAIL PROTECTED]> wrote:
>
> Hi Johan
>
> It is the same key and it is being called with the same component
> instance everytime.
> There are no locale added to the key.
>
> /Murat
>
> 2007/7/10, Johan Compagner < [EMAIL PROTECTED]>:
> >
> > is the string key 3 time exactly the same?
> > or is the locale added to it and then stripped down?
> >
> > On 7/9/07, Murat Yücel < [EMAIL PROTECTED]> wrote:
> >
> > > Hi All,
> > >
> > > I have some problems when using StringResourceModel. It seems like
> > > it is calling the IStringResourceLoader 3 times.
> > >
> > > I am currently using wicket 1.3.0-incubator.
> > >
> > > Here is an example:
> > >
> > > CLASS: TestPage.java
> > > public class TestPage extends WebPage {
> > > public TestPage() {
> > > StringResourceModel model = new
> > > StringResourceModel("myresourcekey", this, null);
> > > add(new Label("label", model));
> > > }
> > > }
> > >
> > > MARKUP:TestPage.html
> > > <html>
> > > <head>
> > > <title>Test Page</title>
> > > </head>
> > > <body>
> > > <h1>This is a test page...</h1>
> > > <span wicket:id="label"></span>
> > > </body>
> > > </html>
> > >
> > > PROPERTY FILE:TestPage.properties
> > > myresourcekey=label
> > >
> > > Add a breakpoint in the wicket class
> > > ComponentStringResourceLoader.public String loadStringResource(final
> > > Component component, final String key)
> > > Trigger the webpage and you will see it be triggered 3 times.
> > >
> > > /Murat
> > >
> > >
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user