Hi,
We have implemented similar concept.And you are right.You have to be careful not to 
redo the last posts.

Luckily for us, the desin we had solved the problem.We have a concept of 
OpenAction(Actions that prepare data for view) and Save action(Post actions,actions 
that update DB).So in AbstractOpenAction, the called URL is saved in session under a 
specific key(Open actions always use GET.So the saved URL can always recreate the 
request if you forward to it :-))) and when the user changes the language, we change 
the language in session and just forward to last action called.And as the last action 
called will be always be the OpenAction which created the last screen seen by user.So 
chance of a post being done again.

Some users have pointed out that having such Reusable small actions lends itself to 
action chaining(e.g. To complete a user Preference save request, you will first call 
SaveUserPrefrrenceAction which will then forward to UserdetaislOpenAction,assuming you 
are showing user details after he saves them) And qwe had a long discussion on this 
forum about action chainning.

So you may want to review all of this before you take this route.

HTH.
regards,
Shirish

-----Original Message-----
From: Villalba Arias, Fredy [BILBOMATICA] [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 4:26 PM
To: Struts Users Mailing List
Subject: RE: Back to the originating screen...


Hi,

IMHO, this is a difficult problem to solve (100%, that is). Including the redo-URL on 
the language link is the most practical of those options, if you are able to generate 
"redo-URLs" that do not "redo" the last action itself but only "recompose" the current 
view (not that simple, I know). Remember to be careful with issues such as redo-ing 
posts that, for instance, involve persistency-related tasks. Say: "saveNewProduct".

Hth,
Freddy.

-----Mensaje original-----
De: Jesse Alexander (KAID 11) [mailto:[EMAIL PROTECTED] 
Enviado el: viernes, 06 de febrero de 2004 16:07
Para: 'Mailing List [EMAIL PROTECTED]'
Asunto: Back to the originating screen...

Hi
I need a hint on how to return always to the originating action preserving
all input-parameters to that originating action...

problem: From any screen in my application the user is allowed to
         change the language of the UI. He should be immediately presented
         the same screen again in the new UI-language.

So far I think I create an action (and a global forward) to change the
UI-language. That's the easy part. But what strategy to use in order
to be able to redo the last action before the change of language?

The possibilities I thought of are:
- on the language link, include always the "redo"-URL
- on each primary action (actions called from the UI, opposed to secondary
  actions called from primary actions...) I store the "redo"-URL in the
  session.

What do you do in such a case? 

thanks in advance
Alexander
  


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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
 

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

Reply via email to