Re: [appfuse-user] Struts validation

2010-12-19 Thread Dustin Pearce
That sounds a little nastier.  The exact same validation message and exact same 
field name?  Is the validation repeated in the action-validation and the 
model-valiation files?  Multiple copies (honestly I don't think that works or 
if it did would fire twice, but who knows sometimes).  What is the deal on the 
input result on your action?  Not a redirect, right?  

-D
On Dec 19, 2010, at 11:44 AM, Ramzi MAALEJ wrote:

> Thank you for your help !
> I get it working now, it was a path problem.
> The only remaining problem is : the error message is displayed twice. is 
> there any configuration to prevent that.
> 
> thank you again !
> 
> On 2010-12-19 13:08, Dustin Pearce wrote:
>> Barring some nasty syntax problem, it seems like the only things left are 
>> the path of your -validation.xml files and the validator type.  The 
>> validator files should mirror your class package path.  So in the case of 
>> your actions your -validation files should be in 
>> src/main/resources/com/xxx/webapp/action/club
>> 
>> The other possibility is the use of the required validator vs. the 
>> requiredstring validator.  Requiredstring is used when you are trying to 
>> prevent an empty string vs a null.  When the post comes in model.name=  then 
>> Struts2 will fill that String with "" rather than null, so it will pass 
>> Required but fail Requiredstring.
>> 
>> 
>> We are assuming the action method is save() or something like that
>> 
>> You shouldn't have to move your actions.  Sub-packages are fine
>> 
>> -D
>> 
>> On Dec 19, 2010, at 9:16 AM, Ramzi MAALEJ wrote:
>> 
>>> Let's say name is a mandatory field. When I try to save a sport with empty 
>>> name, validation is not firing and the exception I got is from DAO layer 
>>> saying that name cannot be empty.
>>> Normally validation should be fired before going to DAO layer, and this is 
>>> not working in my case.
>>> My actions are extending ActionSupport, and I didn't modify the validation 
>>> stack. here is my config:
>>> 
>>> cancel,execute,delete,edit,list
>>> 
>>> 
>>> input,back,cancel,browse
>>> 
>>> 
>>> Everything is working fine for User, except for my new Pojos.
>>> 
>>> Do you think that all my actions should in webapp.action package (I mean 
>>> extract them from webapp.action.club to webapp.action).
>>> 
>>> Thanks for your help !
>>> 
>>> On 2010-12-19 11:43, Dustin Pearce wrote:
 Interesting.  I think the error you are getting from the DAO layer would 
 be helpful.   When you say the validation is not working, is the 
 validation you want not firing or an exception is being thrown by a DAO?  
 Or an exception is thrown because your validations are not firing?  What 
 does your action class look like?  Does it extend ActionSupport?  If your 
 validations are not firing, the other place to look is in the interceptor 
 stack.  In struts.xml the validation and workflow interceptors have 
 "excludeMethod" parameters that will prevent validation from firing.  If 
 you have customized the validation stack you may not have validation or 
 workflow included.
 
 It's probably hard to guess without knowing the DAO layer error, the 
 Hibernate mapping of the field involved, the Action setup and struts.xml 
 config.
 
 -D
 
 On Dec 19, 2010, at 7:39 AM, Ramzi MAALEJ wrote:
 
> I have two files generated by Appfuse
> Sport-validation.xml, I put it in model package and the second one 
> SportAction-validation i put in webapp.action.sport package which using 
> visitor validator.
> I'm testing validation by simply running the application using mvn:jetty 
> run-war, I get errors from dao layers not from validation layer.
> 
> 
> 
> On 2010-12-19 00:47, DUSTIN PEARCE wrote:
>> What validation files were created?  For the model?  What is there path 
>> location?  If you just have model validation it will not work since you 
>> need to add a Visitor validator to the action that uses the model.  
>> Check to see if the action validation files are there.  If they are post 
>> the package path for your actions and the file locations and names of 
>> your validation files.  Finally explain how you are testing the 
>> validation?  Mvn:jetty?
>> 
>> On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ   
>> wrote:
>> 
>>> Hi all,
>>> 
>>> I did create an application using Struts framework. I generated all the 
>>> needed stuff for my pojo and deployed the application successfully but 
>>> the validation is not working.
>>> The validation files are generated but it seems to be that they aren't 
>>> used.
>>> I followed the tutorial that talk about this problem, I didn't succeed 
>>> to have validation working.
>>> Please note also that my actions are in a second package under *.action 
>>> package.
>>> 
>>> Thank you
>>> -- 
>>> Best regards, Ramzi MAALEJ
>>

Re: [appfuse-user] Struts validation

2010-12-19 Thread Ramzi MAALEJ

Thank you for your help !
I get it working now, it was a path problem.
The only remaining problem is : the error message is displayed twice. is 
there any configuration to prevent that.


thank you again !

On 2010-12-19 13:08, Dustin Pearce wrote:

Barring some nasty syntax problem, it seems like the only things left are the 
path of your -validation.xml files and the validator type.  The validator files 
should mirror your class package path.  So in the case of your actions your 
-validation files should be in src/main/resources/com/xxx/webapp/action/club

The other possibility is the use of the required validator vs. the requiredstring 
validator.  Requiredstring is used when you are trying to prevent an empty string vs a 
null.  When the post comes in model.name=  then Struts2 will fill that String with 
"" rather than null, so it will pass Required but fail Requiredstring.


We are assuming the action method is save() or something like that

You shouldn't have to move your actions.  Sub-packages are fine

-D

On Dec 19, 2010, at 9:16 AM, Ramzi MAALEJ wrote:


Let's say name is a mandatory field. When I try to save a sport with empty 
name, validation is not firing and the exception I got is from DAO layer saying 
that name cannot be empty.
Normally validation should be fired before going to DAO layer, and this is not 
working in my case.
My actions are extending ActionSupport, and I didn't modify the validation 
stack. here is my config:

cancel,execute,delete,edit,list


input,back,cancel,browse


Everything is working fine for User, except for my new Pojos.

Do you think that all my actions should in webapp.action package (I mean 
extract them from webapp.action.club to webapp.action).

Thanks for your help !

On 2010-12-19 11:43, Dustin Pearce wrote:

Interesting.  I think the error you are getting from the DAO layer would be helpful.   
When you say the validation is not working, is the validation you want not firing or an 
exception is being thrown by a DAO?  Or an exception is thrown because your validations 
are not firing?  What does your action class look like?  Does it extend ActionSupport?  
If your validations are not firing, the other place to look is in the interceptor stack.  
In struts.xml the validation and workflow interceptors have "excludeMethod" 
parameters that will prevent validation from firing.  If you have customized the 
validation stack you may not have validation or workflow included.

It's probably hard to guess without knowing the DAO layer error, the Hibernate 
mapping of the field involved, the Action setup and struts.xml config.

-D

On Dec 19, 2010, at 7:39 AM, Ramzi MAALEJ wrote:


I have two files generated by Appfuse
Sport-validation.xml, I put it in model package and the second one 
SportAction-validation i put in webapp.action.sport package which using visitor 
validator.
I'm testing validation by simply running the application using mvn:jetty 
run-war, I get errors from dao layers not from validation layer.



On 2010-12-19 00:47, DUSTIN PEARCE wrote:

What validation files were created?  For the model?  What is there path 
location?  If you just have model validation it will not work since you need to 
add a Visitor validator to the action that uses the model.  Check to see if the 
action validation files are there.  If they are post the package path for your 
actions and the file locations and names of your validation files.  Finally 
explain how you are testing the validation?  Mvn:jetty?

On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ   wrote:


Hi all,

I did create an application using Struts framework. I generated all the needed 
stuff for my pojo and deployed the application successfully but the validation 
is not working.
The validation files are generated but it seems to be that they aren't used.
I followed the tutorial that talk about this problem, I didn't succeed to have 
validation working.
Please note also that my actions are in a second package under *.action package.

Thank you
--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e

Re: [appfuse-user] Struts validation

2010-12-19 Thread Dustin Pearce
Barring some nasty syntax problem, it seems like the only things left are the 
path of your -validation.xml files and the validator type.  The validator files 
should mirror your class package path.  So in the case of your actions your 
-validation files should be in src/main/resources/com/xxx/webapp/action/club

The other possibility is the use of the required validator vs. the 
requiredstring validator.  Requiredstring is used when you are trying to 
prevent an empty string vs a null.  When the post comes in model.name=  then 
Struts2 will fill that String with "" rather than null, so it will pass 
Required but fail Requiredstring.


We are assuming the action method is save() or something like that

You shouldn't have to move your actions.  Sub-packages are fine  

-D

On Dec 19, 2010, at 9:16 AM, Ramzi MAALEJ wrote:

> Let's say name is a mandatory field. When I try to save a sport with empty 
> name, validation is not firing and the exception I got is from DAO layer 
> saying that name cannot be empty.
> Normally validation should be fired before going to DAO layer, and this is 
> not working in my case.
> My actions are extending ActionSupport, and I didn't modify the validation 
> stack. here is my config:
> 
> cancel,execute,delete,edit,list
> 
> 
> input,back,cancel,browse
> 
> 
> Everything is working fine for User, except for my new Pojos.
> 
> Do you think that all my actions should in webapp.action package (I mean 
> extract them from webapp.action.club to webapp.action).
> 
> Thanks for your help !
> 
> On 2010-12-19 11:43, Dustin Pearce wrote:
>> Interesting.  I think the error you are getting from the DAO layer would be 
>> helpful.   When you say the validation is not working, is the validation you 
>> want not firing or an exception is being thrown by a DAO?  Or an exception 
>> is thrown because your validations are not firing?  What does your action 
>> class look like?  Does it extend ActionSupport?  If your validations are not 
>> firing, the other place to look is in the interceptor stack.  In struts.xml 
>> the validation and workflow interceptors have "excludeMethod" parameters 
>> that will prevent validation from firing.  If you have customized the 
>> validation stack you may not have validation or workflow included.
>> 
>> It's probably hard to guess without knowing the DAO layer error, the 
>> Hibernate mapping of the field involved, the Action setup and struts.xml 
>> config.
>> 
>> -D
>> 
>> On Dec 19, 2010, at 7:39 AM, Ramzi MAALEJ wrote:
>> 
>>> I have two files generated by Appfuse
>>> Sport-validation.xml, I put it in model package and the second one 
>>> SportAction-validation i put in webapp.action.sport package which using 
>>> visitor validator.
>>> I'm testing validation by simply running the application using mvn:jetty 
>>> run-war, I get errors from dao layers not from validation layer.
>>> 
>>> 
>>> 
>>> On 2010-12-19 00:47, DUSTIN PEARCE wrote:
 What validation files were created?  For the model?  What is there path 
 location?  If you just have model validation it will not work since you 
 need to add a Visitor validator to the action that uses the model.  Check 
 to see if the action validation files are there.  If they are post the 
 package path for your actions and the file locations and names of your 
 validation files.  Finally explain how you are testing the validation?  
 Mvn:jetty?
 
 On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ  wrote:
 
> Hi all,
> 
> I did create an application using Struts framework. I generated all the 
> needed stuff for my pojo and deployed the application successfully but 
> the validation is not working.
> The validation files are generated but it seems to be that they aren't 
> used.
> I followed the tutorial that talk about this problem, I didn't succeed to 
> have validation working.
> Please note also that my actions are in a second package under *.action 
> package.
> 
> Thank you
> -- 
> Best regards, Ramzi MAALEJ
> 
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
 -
 To unsubscribe, e-mail: [email protected]
 For additional commands, e-mail: [email protected]
 
>>> 
>>> -- 
>>> Best regards, Ramzi MAALEJ
>>> 
>>> -
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>> 
>> 
>> -
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]

Re: [appfuse-user] Struts validation

2010-12-19 Thread Ramzi MAALEJ
Let's say name is a mandatory field. When I try to save a sport with 
empty name, validation is not firing and the exception I got is from DAO 
layer saying that name cannot be empty.
Normally validation should be fired before going to DAO layer, and this 
is not working in my case.
My actions are extending ActionSupport, and I didn't modify the 
validation stack. here is my config:


cancel,execute,delete,edit,list


input,back,cancel,browse


Everything is working fine for User, except for my new Pojos.

Do you think that all my actions should in webapp.action package (I mean 
extract them from webapp.action.club to webapp.action).


Thanks for your help !

On 2010-12-19 11:43, Dustin Pearce wrote:

Interesting.  I think the error you are getting from the DAO layer would be helpful.   
When you say the validation is not working, is the validation you want not firing or an 
exception is being thrown by a DAO?  Or an exception is thrown because your validations 
are not firing?  What does your action class look like?  Does it extend ActionSupport?  
If your validations are not firing, the other place to look is in the interceptor stack.  
In struts.xml the validation and workflow interceptors have "excludeMethod" 
parameters that will prevent validation from firing.  If you have customized the 
validation stack you may not have validation or workflow included.

It's probably hard to guess without knowing the DAO layer error, the Hibernate 
mapping of the field involved, the Action setup and struts.xml config.

-D

On Dec 19, 2010, at 7:39 AM, Ramzi MAALEJ wrote:


I have two files generated by Appfuse
Sport-validation.xml, I put it in model package and the second one 
SportAction-validation i put in webapp.action.sport package which using visitor 
validator.
I'm testing validation by simply running the application using mvn:jetty 
run-war, I get errors from dao layers not from validation layer.



On 2010-12-19 00:47, DUSTIN PEARCE wrote:

What validation files were created?  For the model?  What is there path 
location?  If you just have model validation it will not work since you need to 
add a Visitor validator to the action that uses the model.  Check to see if the 
action validation files are there.  If they are post the package path for your 
actions and the file locations and names of your validation files.  Finally 
explain how you are testing the validation?  Mvn:jetty?

On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ  wrote:


Hi all,

I did create an application using Struts framework. I generated all the needed 
stuff for my pojo and deployed the application successfully but the validation 
is not working.
The validation files are generated but it seems to be that they aren't used.
I followed the tutorial that talk about this problem, I didn't succeed to have 
validation working.
Please note also that my actions are in a second package under *.action package.

Thank you
--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [appfuse-user] Struts validation

2010-12-19 Thread Dustin Pearce
Interesting.  I think the error you are getting from the DAO layer would be 
helpful.   When you say the validation is not working, is the validation you 
want not firing or an exception is being thrown by a DAO?  Or an exception is 
thrown because your validations are not firing?  What does your action class 
look like?  Does it extend ActionSupport?  If your validations are not firing, 
the other place to look is in the interceptor stack.  In struts.xml the 
validation and workflow interceptors have "excludeMethod" parameters that will 
prevent validation from firing.  If you have customized the validation stack 
you may not have validation or workflow included.

It's probably hard to guess without knowing the DAO layer error, the Hibernate 
mapping of the field involved, the Action setup and struts.xml config.

-D

On Dec 19, 2010, at 7:39 AM, Ramzi MAALEJ wrote:

> I have two files generated by Appfuse
> Sport-validation.xml, I put it in model package and the second one 
> SportAction-validation i put in webapp.action.sport package which using 
> visitor validator.
> I'm testing validation by simply running the application using mvn:jetty 
> run-war, I get errors from dao layers not from validation layer.
> 
> 
> 
> On 2010-12-19 00:47, DUSTIN PEARCE wrote:
>> What validation files were created?  For the model?  What is there path 
>> location?  If you just have model validation it will not work since you need 
>> to add a Visitor validator to the action that uses the model.  Check to see 
>> if the action validation files are there.  If they are post the package path 
>> for your actions and the file locations and names of your validation files.  
>> Finally explain how you are testing the validation?  Mvn:jetty?
>> 
>> On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ  wrote:
>> 
>>> Hi all,
>>> 
>>> I did create an application using Struts framework. I generated all the 
>>> needed stuff for my pojo and deployed the application successfully but the 
>>> validation is not working.
>>> The validation files are generated but it seems to be that they aren't used.
>>> I followed the tutorial that talk about this problem, I didn't succeed to 
>>> have validation working.
>>> Please note also that my actions are in a second package under *.action 
>>> package.
>>> 
>>> Thank you
>>> -- 
>>> Best regards, Ramzi MAALEJ
>>> 
>>> -
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>> 
>> 
>> -
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
> 
> 
> -- 
> Best regards, Ramzi MAALEJ
> 
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [appfuse-user] Struts validation

2010-12-19 Thread Ramzi MAALEJ

I have two files generated by Appfuse
Sport-validation.xml, I put it in model package and the second one 
SportAction-validation i put in webapp.action.sport package which using 
visitor validator.
I'm testing validation by simply running the application using mvn:jetty 
run-war, I get errors from dao layers not from validation layer.




On 2010-12-19 00:47, DUSTIN PEARCE wrote:
What validation files were created?  For the model?  What is there 
path location?  If you just have model validation it will not work 
since you need to add a Visitor validator to the action that uses the 
model.  Check to see if the action validation files are there.  If 
they are post the package path for your actions and the file locations 
and names of your validation files.  Finally explain how you are 
testing the validation?  Mvn:jetty?


On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ  wrote:


Hi all,

I did create an application using Struts framework. I generated all 
the needed stuff for my pojo and deployed the application 
successfully but the validation is not working.
The validation files are generated but it seems to be that they 
aren't used.
I followed the tutorial that talk about this problem, I didn't 
succeed to have validation working.
Please note also that my actions are in a second package under 
*.action package.


Thank you
--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [appfuse-user] Struts validation

2010-12-18 Thread DUSTIN PEARCE
What validation files were created?  For the model?  What is there  
path location?  If you just have model validation it will not work  
since you need to add a Visitor validator to the action that uses the  
model.  Check to see if the action validation files are there.  If  
they are post the package path for your actions and the file locations  
and names of your validation files.  Finally explain how you are  
testing the validation?  Mvn:jetty?


On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ   
wrote:



Hi all,

I did create an application using Struts framework. I generated all  
the needed stuff for my pojo and deployed the application  
successfully but the validation is not working.
The validation files are generated but it seems to be that they  
aren't used.
I followed the tutorial that talk about this problem, I didn't  
succeed to have validation working.
Please note also that my actions are in a second package under  
*.action package.


Thank you
--
Best regards, Ramzi MAALEJ

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [appfuse-user] struts validation - need to check atleast one field is entered

2009-02-16 Thread Matt Raible
I don't know how to do this off the top of my head. The following
documentation may help though:

http://struts.apache.org/2.x/docs/validation.html

Matt

On Tue, Feb 10, 2009 at 4:27 AM, ashan  wrote:

>
> Hi,
>
> I'm trying to validate if 1 of 3 field value is entered on a form. If not
> would like to show one of those fields are required.
>
> How to configure validation.xml to do this?
>
> Thanks!
>
> --
> View this message in context:
> http://www.nabble.com/struts-validation---need-to-check-atleast-one-field-is-entered-tp21931774s2369p21931774.html
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: [appfuse-user] struts validation in appfuse-light-struts-hibernate-1.8.2

2008-08-19 Thread Marc Siramy
I use jetty:run like this (using eclipse remote debugging):
mvnDebug.bat -X -e jetty:run -Dmaven.test.skip=true
with -X to see Debug messages in console but I can't see these messages in
that case - even if I can see Jetty Debug output in console for some other
actions.

I've also configured Jetty logging like this in my pom:

 ${project.build.directory}/_mm_dd.request.log
90
 true
 GMT

but that's not very useful anyway. The only message I have in my log file
is:
' 127.0.0.1 -  -  [19/août/2008:09:10:49 +] "GET /users.html HTTP/1.1"
500 150 "http://localhost:9090/persons.html"; "Mozilla/5.0 (Windows; U;
Windows NT 5.1; fr-FR) AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1.2
Safari/525.21"

So this is an HTTP error 500. That's my only one conclusion for the moment.


Marc


'






2008/8/19 Matt Raible <[EMAIL PROTECTED]>

> How are you running your application? Are you creating a war and
> deploying to it or using jetty:run? If you use the latter, you should
> see the output in your console.
>
> Matt
>
> On Mon, Aug 18, 2008 at 4:17 AM, Marc Siramy <[EMAIL PROTECTED]>
> wrote:
> > After turning the validate from 'false' to 'true' in '/user' struts
> action ,
> > I obtain a blank page with following message when selecting 'Users' in
> the menu:
> > "An Error has occurred in this application. Please check your log
> > files for further information."
> > But I can't see any log files for Jetty (on which I run appfuse).
> >
> > So I have a few questions:
> > - where does this error come from ?
> > and/or
> > - where do Jetty log files take place ?
> >
> >
> > Marc
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [appfuse-user] struts validation in appfuse-light-struts-hibernate-1.8.2

2008-08-18 Thread Matt Raible
How are you running your application? Are you creating a war and
deploying to it or using jetty:run? If you use the latter, you should
see the output in your console.

Matt

On Mon, Aug 18, 2008 at 4:17 AM, Marc Siramy <[EMAIL PROTECTED]> wrote:
> After turning the validate from 'false' to 'true' in '/user' struts action ,
> I obtain a blank page with following message when selecting 'Users' in the 
> menu:
> "An Error has occurred in this application. Please check your log
> files for further information."
> But I can't see any log files for Jetty (on which I run appfuse).
>
> So I have a few questions:
> - where does this error come from ?
> and/or
> - where do Jetty log files take place ?
>
>
> Marc
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [appfuse-user] Struts validation rules

2007-05-10 Thread Matt Raible

This sounds like it may be a bug - can you reproduce it on the demo site?

http://demo.appfuse.org/appfuse-struts

Matt

On 5/9/07, Michael Chen <[EMAIL PROTECTED]> wrote:


Thanks to matt.
I'm using 2.0M4 with Struts2 basic, and I do the steps to create a model
object and action and related jsp pages, as show in the tutorial (something
like the Person model, the PersonAction, and personList.jsp,
personForm.jsp).
Then I set a field of the model object to "required" in the xxxForm.jsp,
and leave blank for this field,  I can't submit this form, that's right,
because the validation fails.
But then i fill this filed, and submit it again, the same validation error
still exist.
I have already implements the Preparable interface in the xxxAction.
Why?

thanks.


mraible wrote:
>
> Can you please tell us the steps we need to go through to reproduce
> this problem?
>
> Matt
>
>
> On 5/9/07, Michael Chen <[EMAIL PROTECTED]> wrote:
>>
>> I have the same issue, and i want know anyone can help me to fix it?
>>
>>
>> Matt Stine wrote:
>> >
>> > Anyone had trouble w/ your validation rules not being cleared out w/
>> > each request in Struts 2?  With each submit I end up getting a long
>> list
>> > of error messages above each field that only stops when I correct that
>> > field. However, at that point, even if I correct the entire form the
>> > previous errors still remain and the form will not pass validation.
>> >
>> >
>> >
>> > By the way, I'm using Equinox 1.7 w/ Struts 2.0.6.
>> >
>> >
>> >
>> > _
>> >
>> > Matt Stine
>> >
>> > Senior Software Engineer
>> >
>> > Hartwell Center for Bioinformatics and Biotechnology
>> >
>> > St. Jude Children's Research Hospital
>> >
>> > 332 N. Lauderdale St.
>> >
>> > Memphis, TN 38105
>> >
>> > Voice: 901.495.4602
>> >
>> > Fax: 901.495.5108
>> >
>> > Pgr: 901.495.3578 #1314
>> >
>> > [EMAIL PROTECTED]
>> >
>> > http://www.hartwellcenter.org
>> >
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-validation-rules-tf3474100s2369.html#a10395318
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> http://raibledesigns.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
View this message in context: 
http://www.nabble.com/Struts-validation-rules-tf3474100s2369.html#a10406141
Sent from the AppFuse - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
http://raibledesigns.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [appfuse-user] Struts validation rules

2007-05-09 Thread Michael Chen

Thanks to matt.
I'm using 2.0M4 with Struts2 basic, and I do the steps to create a model
object and action and related jsp pages, as show in the tutorial (something
like the Person model, the PersonAction, and personList.jsp,
personForm.jsp).
Then I set a field of the model object to "required" in the xxxForm.jsp, 
and leave blank for this field,  I can't submit this form, that's right,
because the validation fails. 
But then i fill this filed, and submit it again, the same validation error
still exist. 
I have already implements the Preparable interface in the xxxAction.
Why?

thanks.


mraible wrote:
> 
> Can you please tell us the steps we need to go through to reproduce
> this problem?
> 
> Matt
> 
> 
> On 5/9/07, Michael Chen <[EMAIL PROTECTED]> wrote:
>>
>> I have the same issue, and i want know anyone can help me to fix it?
>>
>>
>> Matt Stine wrote:
>> >
>> > Anyone had trouble w/ your validation rules not being cleared out w/
>> > each request in Struts 2?  With each submit I end up getting a long
>> list
>> > of error messages above each field that only stops when I correct that
>> > field. However, at that point, even if I correct the entire form the
>> > previous errors still remain and the form will not pass validation.
>> >
>> >
>> >
>> > By the way, I'm using Equinox 1.7 w/ Struts 2.0.6.
>> >
>> >
>> >
>> > _
>> >
>> > Matt Stine
>> >
>> > Senior Software Engineer
>> >
>> > Hartwell Center for Bioinformatics and Biotechnology
>> >
>> > St. Jude Children's Research Hospital
>> >
>> > 332 N. Lauderdale St.
>> >
>> > Memphis, TN 38105
>> >
>> > Voice: 901.495.4602
>> >
>> > Fax: 901.495.5108
>> >
>> > Pgr: 901.495.3578 #1314
>> >
>> > [EMAIL PROTECTED]
>> >
>> > http://www.hartwellcenter.org
>> >
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-validation-rules-tf3474100s2369.html#a10395318
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-validation-rules-tf3474100s2369.html#a10406141
Sent from the AppFuse - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [appfuse-user] Struts validation rules

2007-05-09 Thread Matt Raible

Can you please tell us the steps we need to go through to reproduce
this problem?

Matt


On 5/9/07, Michael Chen <[EMAIL PROTECTED]> wrote:


I have the same issue, and i want know anyone can help me to fix it?


Matt Stine wrote:
>
> Anyone had trouble w/ your validation rules not being cleared out w/
> each request in Struts 2?  With each submit I end up getting a long list
> of error messages above each field that only stops when I correct that
> field. However, at that point, even if I correct the entire form the
> previous errors still remain and the form will not pass validation.
>
>
>
> By the way, I'm using Equinox 1.7 w/ Struts 2.0.6.
>
>
>
> _
>
> Matt Stine
>
> Senior Software Engineer
>
> Hartwell Center for Bioinformatics and Biotechnology
>
> St. Jude Children's Research Hospital
>
> 332 N. Lauderdale St.
>
> Memphis, TN 38105
>
> Voice: 901.495.4602
>
> Fax: 901.495.5108
>
> Pgr: 901.495.3578 #1314
>
> [EMAIL PROTECTED]
>
> http://www.hartwellcenter.org
>
>
>
>
>

--
View this message in context:
http://www.nabble.com/Struts-validation-rules-tf3474100s2369.html#a10395318
Sent from the AppFuse - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
http://raibledesigns.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [appfuse-user] Struts validation rules

2007-05-09 Thread Michael Chen

I have the same issue, and i want know anyone can help me to fix it?


Matt Stine wrote:
> 
> Anyone had trouble w/ your validation rules not being cleared out w/
> each request in Struts 2?  With each submit I end up getting a long list
> of error messages above each field that only stops when I correct that
> field. However, at that point, even if I correct the entire form the
> previous errors still remain and the form will not pass validation.
> 
>  
> 
> By the way, I'm using Equinox 1.7 w/ Struts 2.0.6.
> 
>  
> 
> _
> 
> Matt Stine
> 
> Senior Software Engineer
> 
> Hartwell Center for Bioinformatics and Biotechnology
> 
> St. Jude Children's Research Hospital
> 
> 332 N. Lauderdale St.
> 
> Memphis, TN 38105
> 
> Voice: 901.495.4602
> 
> Fax: 901.495.5108
> 
> Pgr: 901.495.3578 #1314
> 
> [EMAIL PROTECTED]
> 
> http://www.hartwellcenter.org
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-validation-rules-tf3474100s2369.html#a10395318
Sent from the AppFuse - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]