struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gawain Hammond" <>
Subject RE: ajax validation issue
Date Wed, 10 Sep 2008 12:40:57 GMT
> Can you confirm whether "crud.Group.listAll" is invoked after 
> a validation failure?

No, when validation returns to the form action 'crud.Group.listAll' is
not invoked.

This happens with struts versions 2.0.11.x and 2.1.x

So you would expect using an action tag in this manner (to produce a
list for a select box) to work after validation returns to the form?
Interesting, I may investigate this further as it would be the more
simple solution as I'm a bit over my head with the ajax stuff.

-----Original Message-----
From: Jeromy Evans [] 
Sent: 10 September 2008 13:00
To: Struts Users Mailing List
Subject: Re: ajax validation issue

Gawain Hammond wrote:
> A really nice solution so far has been to an action tag to populate
> forms, which has worked nicely the rest of the time. I've really liked
> using this approach to fill drop-downs, like so:
> <s:action namespace="/admin" name="crud.Group.listAll"
> id="groupAction"/>
> ...
> <s:select label="Group" name="" value="%{}" 
>   list="%{#groupAction.list}" listKey="id" listValue="name"/>

That's a novel approach.  I like it.

> Using %{#groupAcation.list} to populate the drop down works great, but
> the only work around I've seen to fill the select box after validation
> returns to the form is rather messy:
> alidation-fails.html

I don't see why the above approach wouldn't be working after a 
validation failure.  When the INPUT result is returned it presumably 
renders the same JSP (and doesn't do a redirect).  The problem occurs 
when the context/valuestack doesn't contain something you're expecting 
(such as the list for the select). 
Can you confirm whether "crud.Group.listAll" is invoked after a 
validation failure?

> Knowing ajax validation will only work with xhtml/css_html theme is
> helpful, I've been using ajax all along which may explain some issues.
That should read client-side validation.

> You said to use the default interceptor stack for 2.1.2, and the
> documentation I read says to use 'jsonValidationWorkflowStack' do I
> both of them or will just the default stack work?

jsonValidationWorkflowStack is correct one.

The autocompleter works because it performs a separate request to 
populate the permitted values.  Your case is just that the list for the 
selects is empty or null.

To unsubscribe, e-mail:
For additional commands, e-mail:
This transmission is strictly confidential, possibly legally privileged, and intended solely
for the 
addressee.  Any views or opinions expressed within it are those of the author and do not necessarily

represent those of, i-CD Publishing (UK) Ltd or any of it's subsidiary companies.
 If you 
are not the intended recipient then you must not disclose, copy or take any action in reliance
of this 
transmission. If you have received this transmission in error, please notify the sender as
soon as 
possible.  No employee or agent is authorised to conclude any binding agreement on behalf
i-CD Publishing (UK) Ltd with another party by email without express written confirmation
by an 
authorised employee of the Company. (Tel: 08000 192 192).  i-CD Publishing
(UK) Ltd 
is incorporated in England and Wales, company number 3148549, VAT No. GB 673128728.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message