You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vaibhav Khare <va...@gmail.com> on 2007/12/10 16:37:12 UTC

Struts Validation issue

Hi,

I am using Struts validation framework in my project. My form becomes null
whenever I try to do some validation. The validation works fine but the next
time it comes on the UI, the list becomes null.
Any help will be appreciated.
example:
<logic:present name="<%=formName%>"  property="someList">

When I do the validation, this tag fails as the list comes null the second
time..
Any help is highly appreciated.

Thx
-- 
View this message in context: http://www.nabble.com/Struts-Validation-issue-tp14255159p14255159.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Struts Validation issue

Posted by Vaibhav Khare <va...@gmail.com>.
<action path="/struts/poi/save" 
	type="SomeAction"
	name="myForm" scope="request" validate="true" 
	parameter="save" input="view.edit.poitable">
</action>

I am using tile page as an input.
Thx


Paul Benedict-2 wrote:
> 
> Can you paste in the set of action configuration mappings that you're
> using?
> 
> On Dec 10, 2007 9:37 AM, Vaibhav Khare <va...@gmail.com> wrote:
> 
>>
>> Hi,
>>
>> I am using Struts validation framework in my project. My form becomes
>> null
>> whenever I try to do some validation. The validation works fine but the
>> next
>> time it comes on the UI, the list becomes null.
>> Any help will be appreciated.
>> example:
>> <logic:present name="<%=formName%>"  property="someList">
>>
>> When I do the validation, this tag fails as the list comes null the
>> second
>> time..
>> Any help is highly appreciated.
>>
>> Thx
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-Validation-issue-tp14255159p14255159.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-Validation-issue-tp14255159p14255615.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Struts Validation issue

Posted by Paul Benedict <pb...@apache.org>.
Can you paste in the set of action configuration mappings that you're using?

On Dec 10, 2007 9:37 AM, Vaibhav Khare <va...@gmail.com> wrote:

>
> Hi,
>
> I am using Struts validation framework in my project. My form becomes null
> whenever I try to do some validation. The validation works fine but the
> next
> time it comes on the UI, the list becomes null.
> Any help will be appreciated.
> example:
> <logic:present name="<%=formName%>"  property="someList">
>
> When I do the validation, this tag fails as the list comes null the second
> time..
> Any help is highly appreciated.
>
> Thx
> --
> View this message in context:
> http://www.nabble.com/Struts-Validation-issue-tp14255159p14255159.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: Struts Validation issue

Posted by Vaibhav Khare <va...@gmail.com>.
I fixed it using the session option...cudnt find the better way though..
anyways thanks for your help


Jiang, Jane (NIH/NCI) [C] wrote:
> 
> We had the same problem.  When you submit a form, only the information
> in form gets submitted and repopulated when there is a validation error.
> Since the list is not part of form submission, it is not saved any
> where.  The same applies to disabled fields and dynamically generated
> labels.  I asked this question before, the options I found at the time
> were
> 1. put the list in session or 2. repopulate the list using the prepare
> method
> 
> We ended up with option 1.  I'd be interested to find out if there is
> better solution too.
> 
> -----Original Message-----
> From: Vaibhav Khare [mailto:vaibhavk81@gmail.com] 
> Sent: Monday, December 10, 2007 10:37 AM
> To: user@struts.apache.org
> Subject: Struts Validation issue
> 
> 
> Hi,
> 
> I am using Struts validation framework in my project. My form becomes
> null
> whenever I try to do some validation. The validation works fine but the
> next
> time it comes on the UI, the list becomes null.
> Any help will be appreciated.
> example:
> <logic:present name="<%=formName%>"  property="someList">
> 
> When I do the validation, this tag fails as the list comes null the
> second
> time..
> Any help is highly appreciated.
> 
> Thx
> -- 
> View this message in context:
> http://www.nabble.com/Struts-Validation-issue-tp14255159p14255159.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-Validation-issue-tp14255159p14260010.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Struts Validation issue

Posted by "Jiang, Jane (NIH/NCI) [C]" <ji...@mail.nih.gov>.
We had the same problem.  When you submit a form, only the information
in form gets submitted and repopulated when there is a validation error.
Since the list is not part of form submission, it is not saved any
where.  The same applies to disabled fields and dynamically generated
labels.  I asked this question before, the options I found at the time
were
1. put the list in session or 2. repopulate the list using the prepare
method

We ended up with option 1.  I'd be interested to find out if there is
better solution too.

-----Original Message-----
From: Vaibhav Khare [mailto:vaibhavk81@gmail.com] 
Sent: Monday, December 10, 2007 10:37 AM
To: user@struts.apache.org
Subject: Struts Validation issue


Hi,

I am using Struts validation framework in my project. My form becomes
null
whenever I try to do some validation. The validation works fine but the
next
time it comes on the UI, the list becomes null.
Any help will be appreciated.
example:
<logic:present name="<%=formName%>"  property="someList">

When I do the validation, this tag fails as the list comes null the
second
time..
Any help is highly appreciated.

Thx
-- 
View this message in context:
http://www.nabble.com/Struts-Validation-issue-tp14255159p14255159.html
Sent from the Struts - User mailing list archive at Nabble.com.


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