[Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Shawn Tumey

Hello,

The application I am working on uses i18n. Wicket has been great with this.
:)

Our base page that every other page extends from, does the following:

getSession().setLocale(((INLWebSession)getSession()).getCredentials((WebRequest)getRequest()).getPreferredLocale());

to set the current locale based on the users preference. The content of the
application is in an iframe. (The wicket pages are in the iframe) The
navigation, preferences elements, etc. are outside the iframe in what we
refer to as the wrapper. Changing the language is done through this wrapper.
When the display language is changed, we refresh the contents of the iframe
and it comes back in the new language.

HOWEVER

We have one page that uses TabbedPanel with two tabs. This page (and tabs)
correctly internationalizes based on the locale used when the page is
loaded. Changing the language in the wrapper does cause the page to refresh,
but not cause it to change languages.

Is there something special with tabs and TabbedPanel?

Another issue with the same page, we use the following constructors:

public ReviewPage(String ahId) {
   build(ahId, 0);
   }

public ReviewPage(String ahId, int tab) {
   build(ahId, tab);
   }

So, if no tab number is passed in it uses tab 0. From tab 1, there are
actions that update the underlying object and use:

setResponsePage(new ReviewPage(req.getReqId(), 1) );

to show the changes, effectively just calling it's self. This work just
fine.

However, from a different wicket page trying to have a link that uses the
setResponsePage(new ReviewPage(req.getReqId(), 1) ); causes a
NotSerializableException. Why / how does the same call cause two different
results?

Thanks for any insights.

-Shawn
-
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


Re: [Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Igor Vaynberg

how are you creating your itab/abstracttab objects? can we see that code?
mainly what model do you pass in for the title.

and what object does it say is not serializable?

-igor


On 6/11/07, Shawn Tumey [EMAIL PROTECTED] wrote:


Hello,

The application I am working on uses i18n. Wicket has been great with
this. :)

Our base page that every other page extends from, does the following:

getSession().setLocale(((INLWebSession)getSession()).getCredentials((WebRequest)getRequest()).getPreferredLocale());


to set the current locale based on the users preference. The content of
the application is in an iframe. (The wicket pages are in the iframe) The
navigation, preferences elements, etc. are outside the iframe in what we
refer to as the wrapper. Changing the language is done through this wrapper.
When the display language is changed, we refresh the contents of the iframe
and it comes back in the new language.

HOWEVER

We have one page that uses TabbedPanel with two tabs. This page (and tabs)
correctly internationalizes based on the locale used when the page is
loaded. Changing the language in the wrapper does cause the page to refresh,
but not cause it to change languages.

Is there something special with tabs and TabbedPanel?

Another issue with the same page, we use the following constructors:

public ReviewPage(String ahId) {
build(ahId, 0);
}

public ReviewPage(String ahId, int tab) {
build(ahId, tab);
}

So, if no tab number is passed in it uses tab 0. From tab 1, there are
actions that update the underlying object and use:

setResponsePage(new ReviewPage(req.getReqId(), 1) );

to show the changes, effectively just calling it's self. This work just
fine.

However, from a different wicket page trying to have a link that uses the
setResponsePage(new ReviewPage( req.getReqId(), 1) ); causes a
NotSerializableException. Why / how does the same call cause two different
results?

Thanks for any insights.

-Shawn

-
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


Re: [Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Shawn Tumey

The spring service is what it is complaining about not being serializable.

private void build(final String ahId, final int tab) {

   List tabs=new ArrayList();

   tabs.add(new AbstractTab(new ResourceModel(common.summary)){

   private static final long serialVersionUID = 1L;

   public Panel getPanel(String panelId)
   {
   return new SummaryPanel(panelId, AHBasePage.getASM
().getRequest(ahId));
   }
   });  // this is tab 0 // getASM() is a spring service

   Credentials creds =
((INLWebSession)getSession()).getCredentials((WebRequest)getRequest());
   UserPrivileges userPrivs = creds.getPrivileges();
   if (userPrivs.hasPrivilege(
CredentialsConstants.PRIV_CATG_AUTOMATED_REQUESTS ,
CredentialsConstants.ACTION_PRIV_UPDATE)){
   tabs.add(new AbstractTab(new ResourceModel(common.details)) {

   private static final long serialVersionUID = 1L;

   public Panel getPanel(String panelId)
   {
   return new DetailPanel(panelId, AHBasePage.getASM
().getRequest(ahId));
   }

   }); // this is tab 1 // getASM() is a spring service
   }
   TabbedPanel tPanel = new TabbedPanel(tabs, tabs);
   tPanel.setOutputMarkupId(true);
   tPanel.setSelectedTab(tab);
   add(tPanel);


Thanks for the assistance,

-Shawn


On 6/11/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


how are you creating your itab/abstracttab objects? can we see that code?
mainly what model do you pass in for the title.

and what object does it say is not serializable?

-igor


-
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