struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <shirishchandra.sakh...@ubs.com>
Subject RE: Back to the originating screen...
Date Fri, 06 Feb 2004 15:39:50 GMT
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:fvillalba@mailext.com]
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:alexander.jesse@credit-suisse.com] 
Enviado el: viernes, 06 de febrero de 2004 16:07
Para: 'Mailing List struts-user@jakarta.apache.org'
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message