So, for the first moment, i need change only the language of the text on the page. But, i have some difficult with reload() or other refresh methods because their lost the gwt state. For example, if i change the language on first page, its ok , because the following pages will work with the new language without i need to set this again. But, in my application, i can set this language in all following pages.But, with the query string solution its works but my application lose all state and return to the first page.Using the property solution (gwt:property content="locale=blablabla") , i change that on html with javascript, but its dont changed anything, only the property, and its only work if i refresh the page again (also losing the gwt state). I take a look on GWT's history support and i dont see anything which be usefull in my problem. So, somebody have more tips about this case?
best regards Eduardo On Oct 22, 10:57 am, "Ian Petersen" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 22, 2008 at 3:41 AM, Lothar Kimmeringer <[EMAIL PROTECTED]> wrote: > > Ian Petersen schrieb: > >> Why do you want to avoid the refresh? > > > You mean, why do we need AJAX? We don't need it but if we have it > > (here with GWT) there shouldn't be any exceptions. > > No, I meant, "what's your reason?" not "why would you possibly want > that?!"--I was just trying to see if, for example, history support or > meta tags were enough to solve the problem. > > >> If you're worried about losing application state, look > >> into GWT's history support. > > > I know it's a way but it's a very complicated way if you "only" > > want to exchange the texts of all widgets that are implementing > > HasLocalizableText (an interface I just made up right now ;-) > > > As the OP said, he just want to do a setLocale(new Locale.BR) > > to change all localizable data on the page without caring what > > the current state of the page is. That's nothing new, e.g. > > Casabac (bought and abadoned by Software AG) allowed exactly that. > > Yeah, I kind of agree but with one really big caveat: the user's > locale seems like something that won't change much. I think, ideally, > it should change at most once because you should be able to sniff the > user's desired locale out of their HTTP request headers and, if you > have user accounts, you could store the user's preferred locale in > your database and make sure to set the correct locale every time they > log in. > > I guess I'm saying that, to me, the trade off of (presumably) more > efficient i18n in exchange for having to request a new page to change > the locale is a fine one. > > Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
