Sorry, my bad... I wasn't aware of the LocaleAction. Apparently my suggestion was a good one, just late :)

Frank

Frank W. Zammetti wrote:
I just wanted to point out the 3rd question on this page:

http://husted.com/struts/FAQ/view-i18n.htm

Laurie, your a committer now... this seems to me like a good inclusions for the Actions package. Any thoughts from anyone?

Frank

Laurie Harper wrote:

You don't need to save the parameter, you can just append it to the URL you forward to at the end of your SwitchLanguage action, assuming you know it should be there. RedirectAction in Struts 1.2.7 and up gives you a relatively easy way to add parameters to a forward mapping before you return it.

There's no way to save the parameter on the action forward, since such a feature wouldn't be very useful -- consider what would happen if two different users hit the switchLanguage action at the same time.

If you need to solve the more general problem, where you don't know in your SwitchLanguage action where to return, it gets rather harder. See my post earlier today on this topic for some suggestions for that problem.

L.

Thomas Hamacher wrote:

Okay - here are some more details:

Let's say I have the following URL: http://somehost/showEntry?entryID=343 I have multilanguage support in my application, so let´s assume, that I click on the language-button and therefor call the page /switchLanguage.do, which changes my Locale. The switchLanguage uses the last ActionForward to link back to the refering page (showEntry). But the problem is, that it doesn't have the param "entryID" anymore. So the page shows an empty page. As I don't want to add this parameter in my session-, but in the request scope I have to remember this param somehow. So I thought if there might be a way to save this to the ActionForward, because there is no request.setParameter()-Method anywhere. And I have been told that the reques.getHeader("referer")-solution is pretty unsafe, because of proxies and firewalls. So I wonder what would be the best way, as I think refering back to one page and mulit-language-support should be one of the standard-issues on modern webapplication.

I hope that helps a little..

Thanks
Thomas

On Thursday 10 November 2005 22:31, Laurie Harper wrote:

Thomas Hamacher wrote:

But anyways: does anybody know, if the parameters, given through paramId are saved in an ActionForward? This would help me a lot, because I have
to remember the parameters - if any are used - together with my
ActionForward for later references. Right know I'm trying a workaround
with my own RequestProcessor, which tries to cut out the parameters and save it somewhere and add it later to the ActionForward, but that doesn't
work that well.



I'm not quite sure what you're trying to do. The parameters you specify
through paramId are request parameters to include in the URL. They're
available in your action through your form bean or from
request.getParameter().

An ActionForward is what your action returns to tell Struts where to
forward control to after the request has been processed. So the
parameters you setup when you construct the URL don't have anything to
do it.

Perhaps you can explain what you are trying to achieve by saving the
parameters?

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to