> 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 [mailto:[EMAIL PROTECTED] 
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="user.group.id" value="%{user.group.id}" 
>   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:
>
>
http://struts.apache.org/2.1.2/docs/how-do-we-repopulate-controls-when-v
> 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
need
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
----------------------------------------------------------
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 192.com, 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 of 
i-CD Publishing (UK) Ltd with another party by email without express written 
confirmation by an 
authorised employee of the Company. http://www.192.com (Tel: 08000 192 192).  
i-CD Publishing (UK) Ltd 
is incorporated in England and Wales, company number 3148549, VAT No. GB 
673128728.

Reply via email to