You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Guillaume Carré <gu...@gmail.com> on 2007/06/19 19:11:27 UTC

[S2] Validation, actionerrors, actionmessages and redirect

This one has been talked about quite a few times here. But I haven't
seen any good solution, so I would like to raise it again.

IMHO (with the broken datepicker tag that is being reworked for 2.1)
this is THE big "issue" with Struts 2.0.x. At least this is mine.

When you have:
Action A -> jsp -> Action B
with action A populating some elements of the form presented in the jsp

when Action B does a "return INPUT" (manually, or through automatic
validation), you need it to forward to Action A, to repopulate the
form elements, and you don't want to loose your actionmessages and/or
actionerrors or the values the user typed in the form fields.

There is no ideal solution yet to do this right! Apart from manually
coding your own flash scope filter or whatever brilliant idea you
could have.

What causes all my headaches with Struts2, is that when an action
calls its INPUT result, all the other actions in the chain (if you
forward to a chain result), or the actions called with the action tag
within the JSPs, also call their INPUT result...
I don't even see when this behaviour could be useful.

Should we open a JIRA issue or am I (are we) missing something here?
-- 
Guillaume Carré

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


Re: [S2] Validation, actionerrors, actionmessages and redirect

Posted by Guillaume Carré <gu...@gmail.com>.
2007/6/19, Jeff Amiel <je...@gmail.com>:
> Ya know...I cannot believe that people categorize the datepicker
> 'issue' as a 'big issue'.

when I loose several hours trying to make a, as you say, "small 'nice
to have' component", work, in a GA struts version, I call it a "big"
issue (and it's not advertized in the docs that it is not working...)
How many components in Struts 2.0.8 are broken like this one???
Yeah that's what I thought, thanks!

anyway, any thoughts about the main subject Jeff?
(apart from these 2 issues, Struts2 is working great for me)
-- 
Guillaume Carré

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


Re: [S2] Validation, actionerrors, actionmessages and redirect

Posted by Jeff Amiel <je...@gmail.com>.
On 6/19/07, Guillaume Carré <gu...@gmail.com> wrote:

>
> IMHO (with the broken datepicker tag that is being reworked for 2.1)
> this is THE big "issue" with Struts 2.0.x. At least this is mine.

Ya know...I cannot believe that people categorize the datepicker
'issue' as a 'big issue'.
I mean...it's a small 'nice to have' component that, to be honest,
I've done just fine without for the past several years.  Struts 2 has
so much 'wealth' other than this little javascript control that I have
no issue overlooking a buggy component that I'm sure will get remedied
in the near future (it took us a single day to find a tolerable
javascript calendar control that we integrated into our own struts 1.X
apps that did just fine).

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


RE: nested s:iterator

Posted by Dave Newton <ne...@yahoo.com>.
--- "Hartrich, James CTR USTRANSCOM J6" wrote:
> Quick follow up to correct myself. This works:
> <s:property value="#row[(#columnName)]"/>

Yeah, that ;)

d.



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


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


RE: nested s:iterator

Posted by "Hartrich, James CTR USTRANSCOM J6" <Ja...@ustranscom.mil>.
Quick follow up to correct myself. This works:
<s:property value="#row[(#columnName)]"/>
I referenced the following documentation
http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/expressionEva
luation.html
James


-----Original Message-----
From: Hartrich, James CTR USTRANSCOM J6
[mailto:James.Hartrich.ctr@ustranscom.mil] 
Sent: Wednesday, June 20, 2007 9:17 AM
To: Struts Users Mailing List
Subject: nested s:iterator

How would one iterate a bean's collection<hashmap> "row" values by key
of bean's collection<string> "columnName"? Here's what I have on the
jsp:

<s:iterator id="row" value="bean.tableColumnData" status="rowStatus">
	<s:iterator id="columnName" value="bean.tableColumns"
status="status">
		<s:property value="row.columnName"/>
		<s:property value="#row.columnName"/>
	</s:iterator>
</s:iterator>

Neither s:property shows any values. Can anyone throw me a bone here?
James

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


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


Re: nested s:iterator

Posted by Dave Newton <ne...@yahoo.com>.
--- "Hartrich, James CTR USTRANSCOM J6" wrote:
>  <s:property value="#row.columnName"/>

I'd probably try something like #row[#columnName] (or
maybe #row[(#columnName)] to force OGNL to eval
again); I'm doing something similar but I don't have
the example in front of me at the moment.

d.



       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

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


nested s:iterator

Posted by "Hartrich, James CTR USTRANSCOM J6" <Ja...@ustranscom.mil>.
How would one iterate a bean's collection<hashmap> "row" values by key
of bean's collection<string> "columnName"? Here's what I have on the
jsp:

<s:iterator id="row" value="bean.tableColumnData" status="rowStatus">
	<s:iterator id="columnName" value="bean.tableColumns"
status="status">
		<s:property value="row.columnName"/>
		<s:property value="#row.columnName"/>
	</s:iterator>
</s:iterator>

Neither s:property shows any values. Can anyone throw me a bone here?
James

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