server side validation using GWT

2010-02-22 Thread loucat
Hi everybody,

I'm developing a web application with GWT and I was supposed to do the
server side validation with struts2.
I've read that the integration of GWT and struts2 is not so easy, in fact
I've used gwtstruts2plugin but actually I'm not using it and I still don't
know how to match widget and stuff like that with struts2, using the xml
files. I don't use struts2 tag libraries so how can I tell the validator
what widget (a text area for example) or field it should handle with?
I'm quite a newbie... I don't know if there are other validation methods in
struts2, I read something about annotations but I'd like just a normal
library with java methods I could use...

Do you have some tips for this purpose?
Any link to a tutorial or something like that?
I only find something related to tag libraries...

Thanks in advance

lou


Client-side AND server-side validation

2009-08-10 Thread Nicolas Baron
Hi everybody,

I'm trying to implement validation using the standard mecanism provided by
Struts 2. I understood that it's possible to use the same XML file to
perform both client side (JS being generated) and server side validation. I
don't need to do AJAX validation. Another constraint : We don't want to rely
on the DOJO plugin since it has been deprecated.
Any configuration tips or documentation link to implement this kind of
validation ?

Thanks in advance,

Nicolas


Struts 2 Client Server Side Validation

2008-10-30 Thread Struts Developer
Hello, In our current project are using struts 2.0 and would like to take
advantage of the struts validation framework. We would like our form fields
to be validated both on the client and server side. If i have VALIDATE =
TRUE in the form  field will the validation happen only on client side? For
some reason if the client side validation does not happen will struts do the
validation on the server side for the same field using the same XML
configuration files?


RE: Struts 2 Client Server Side Validation

2008-10-30 Thread Kawczynski, David
That validate=true in the form field only serves to place a required 
asterisk next to your field's label. 

First, you will want to ensure you are not using a simple theme for 
the form tag.

Next, you will want to use an sx:head tag in your page's head tags

Finally, you will need to have validation xml files defining your 
Validation rules for the action (and optionally, method) being 
called by the struts framework.

Check out these 
http://java-x.blogspot.com/2006/11/struts-2-validation.html

http://www.roseindia.net/struts/struts_validator_framework.shtml

-Original Message-
From: Struts Developer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 4:24 PM
To: user@struts.apache.org
Subject: Struts 2 Client  Server Side Validation

Hello, In our current project are using struts 2.0 and would like to
take
advantage of the struts validation framework. We would like our form
fields
to be validated both on the client and server side. If i have VALIDATE
=
TRUE in the form  field will the validation happen only on client side?
For
some reason if the client side validation does not happen will struts do
the
validation on the server side for the same field using the same XML
configuration files?
Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp  Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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



Different error messages for client and server side validation

2008-09-30 Thread Dimitris Mouchritsas

Hi all,
we are using a elements in our error messages to allow the user to go 
to the form field when the error message shows up.
Obviously this messes up the client side javascript popup message which 
shows like: a href=#UsernameUsername/a is missing.
Is there a way to use a different error message or should we abandon the 
idea of client side validation?


Regards
Dimitris Mouchritsas

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



Re: Different error messages for client and server side validation

2008-09-30 Thread Dimitris Mouchritsas

Dimitris Mouchritsas wrote:

Hi all,
we are using a elements in our error messages to allow the user to 
go to the form field when the error message shows up.
Obviously this messes up the client side javascript popup message 
which shows like: a href=#UsernameUsername/a is missing.
Is there a way to use a different error message or should we abandon 
the idea of client side validation?


Regards
Dimitris Mouchritsas

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


BTW Struts v1.3.8

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



RE: Different error messages for client and server side validation

2008-09-30 Thread Kawczynski, David
Your Action classes can add ActionMessages for a specific property, not
just GLOBAL_MESSAGES.  
Then, display GLOBAL_MESSAGES at the top of the page, and field-specific
ones relative to the field.
(this will work in 1.3.8)

See
http://struts.apache.org/1.2.7/api/org/apache/struts/action/ActionMessag
es.html 

Specifically:
add(java.lang.String, org.apache.struts.action.ActionMessage)
get(java.lang.String)

-Original Message-
From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 30, 2008 11:23 AM
To: Struts Users Mailing List
Subject: Re: Different error messages for client and server side
validation

Dimitris Mouchritsas wrote:
 Hi all,
 we are using a elements in our error messages to allow the user to 
 go to the form field when the error message shows up.
 Obviously this messes up the client side javascript popup message 
 which shows like: a href=#UsernameUsername/a is missing.
 Is there a way to use a different error message or should we abandon 
 the idea of client side validation?

 Regards
 Dimitris Mouchritsas

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

BTW Struts v1.3.8

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

Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp  Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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



Re: Different error messages for client and server side validation

2008-09-30 Thread Manos Batsis


Geia sou wre Dimitri.

Dimitris Mouchritsas wrote:
we are using a elements in our error messages to allow the user to 
go to the form field when the error message shows up.
Obviously this messes up the client side javascript popup message 
which shows like: a href=#UsernameUsername/a is missing.
Is there a way to use a different error message or should we abandon 
the idea of client side validation?


You could modify the JS file in the struts JARs (cant remember where it 
is) and modify the code to strip the markup from the alert() *only*. A 
function to strip markup is




stripTags = function (s) {
return s?s.replace(/[^]+/g,):s;
};

so you could modify e.g.

alert(errors);

to


alert(stripTags(errors));


Xeraitismata ston Pitarokili, to Valassopoulo kai to Nikita ;-)

Cheers,

Manos


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



Re: Different error messages for client and server side validation

2008-09-30 Thread Dimitris Mouchritsas

Kawczynski, David wrote:

Your Action classes can add ActionMessages for a specific property, not
just GLOBAL_MESSAGES.  
Then, display GLOBAL_MESSAGES at the top of the page, and field-specific

ones relative to the field.
(this will work in 1.3.8)

See
http://struts.apache.org/1.2.7/api/org/apache/struts/action/ActionMessag
es.html 


Specifically:
add(java.lang.String, org.apache.struts.action.ActionMessage)
get(java.lang.String)

-Original Message-
From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 30, 2008 11:23 AM

To: Struts Users Mailing List
Subject: Re: Different error messages for client and server side
validation

Dimitris Mouchritsas wrote:
  

Hi all,
we are using a elements in our error messages to allow the user to 
go to the form field when the error message shows up.
Obviously this messes up the client side javascript popup message 
which shows like: a href=#UsernameUsername/a is missing.
Is there a way to use a different error message or should we abandon 
the idea of client side validation?


Regards
Dimitris Mouchritsas

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



BTW Struts v1.3.8

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

Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp  Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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

  

Can you please elaborate with a small example? I don't get it.
Thanks

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



RE: Different error messages for client and server side validation

2008-09-30 Thread Kawczynski, David
What I spoke of doesn't really address your immediate issue, which was
how could you use different error messages for client-sided and
server-sided validation.  It's more of a workaround as it eliminates the
need to have your error messages contain links to the fields.  

Have you ever filled out a form where invalid field values result in a
big bold error message being rendered directly above the field that
contained the invalid value?  That's what this would do.  Invalid values
would result in a javascript alert box containing plain text (Username
is required) for clients with javascript enabled.  Script-disabled
browsers would have an error box at the top of the page containing
something like Please correct the errors below, and the username text
box would have big red text above it reading Username is required.  

Unless your form is many pages long, linking to the errors would perhaps
be considered a novelty.  If your form really is that long, you may want
to consider breaking it up into multiple pages.  Just a thought.


In your action class:
public ActionForward execute(req, res, form, mapping) {
  ActionMessages failures = null;
  if(form.getUsername() == null) {
failures.add(username, new ActionMessage(error.username));
failures.add(ActionMessages.GLOBAL_MESSAGE, 
  new ActionError(validation.failure);
  }
  saveMessages(req, failures);
  ...
}

Your JSP page:
body
  logic:messagesPresent message=true 
  property=org.apache.struts.action.GLOBAL_MESSAGE  
div class=errorHeaderThe following error(s) occurred:/div
ul
  html:messages property=org.apache.struts.action.GLOBAL_MESSAGE
  id=message
libean:write name=message/br
  /html:messages
/ul  
  /logic:messagesPresent
  form
logic:messagesPresent message=true property=username
  div class=errorDetailhtml:errors property=username//div
/logic:messagesPresent
input name=username/

logic:messagesPresent message=true property=password
  div class=errorDetailhtml:errors property=password//div
/logic:messagesPresent
input name=password/
  /form
/body


-Original Message-
From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 30, 2008 12:13 PM
To: Struts Users Mailing List
Subject: Re: Different error messages for client and server side
validation

Kawczynski, David wrote:
 Your Action classes can add ActionMessages for a specific property,
not
 just GLOBAL_MESSAGES.  
 Then, display GLOBAL_MESSAGES at the top of the page, and
field-specific
 ones relative to the field.
 (this will work in 1.3.8)

 See

http://struts.apache.org/1.2.7/api/org/apache/struts/action/ActionMessag
 es.html 

 Specifically:
 add(java.lang.String, org.apache.struts.action.ActionMessage)
 get(java.lang.String)

 -Original Message-
 From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 30, 2008 11:23 AM
 To: Struts Users Mailing List
 Subject: Re: Different error messages for client and server side
 validation

 Dimitris Mouchritsas wrote:
   
 Hi all,
 we are using a elements in our error messages to allow the user to 
 go to the form field when the error message shows up.
 Obviously this messes up the client side javascript popup message 
 which shows like: a href=#UsernameUsername/a is missing.
 Is there a way to use a different error message or should we abandon 
 the idea of client side validation?

 Regards
 Dimitris Mouchritsas

 
 BTW Struts v1.3.8


   
Can you please elaborate with a small example? I don't get it.
Thanks

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

Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp  Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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



Re: Struts 2.0.9 server side validation problem

2007-12-20 Thread TuomoS


newton.dave wrote:
 
 
 Is it mandatory to define doctype in the validation xml file?
 
 That I don't know, but I don't know why you wouldn't put it in there; it
 can
 be pretty helpful.
 
 

This was the case. Now that I added the doctype everything works.


newton.dave wrote:
 
 
 is it really enough just to have the file in classpath? (WEBINF/..)
 
 WEB-INF is not the classpath; the validation file should be in the same
 package as the action in question.
 
 

Thanks for clarification. I had removed the doctype at somepoint (for some
reason) and tried different locations for the xml files.

-- 
View this message in context: 
http://www.nabble.com/Struts-2.0.9-server-side-validation-problem-tp14419444p14434671.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 2.0.9 server side validation problem

2007-12-20 Thread Arpan Debroy
Actually what I have noticed that, if you make any mistake(may a single
spelling) in validation xml file, it will
not catch any validation error.

On Dec 19, 2007 9:19 PM, TuomoS [EMAIL PROTECTED] wrote:


 How can I confirm that the XML validator file is read? It seems that the
 actionName-validation.xml is not read. I have checked many times that the
 action java class matches with the xml file name.

 actionName.java
 actionName-validation.xml (when using execute method in submit)

 I overrided the validate() method in my action for debugging. I can add a
 fielderror manually with hasFieldError() method and it is then shown in
 the
 jsp.

 Is it mandatory to define doctype in the validation xml file? And is it
 really enough just to have the file in classpath? (WEBINF/..)

 clip from the validation file:

 validators
  field name=trader.address.name
 field-validator type=requiredstring
message key=errors.required.name/
 /field-validator
  /field

 .
 .
 .
 :clap:

 /validators
 --
 View this message in context:
 http://www.nabble.com/Struts-2.0.9-server-side-validation-problem-tp14419444p14419444.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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




-- 
Thanks  Regards
 Arpan Debroy

AOL Online India Private Ltd
RMZ EcoSpace Campus 1A
Outer Ring Road, Bellandur,
Bangalore - 560037
India
Mobile No :+9886006306
on-board :+91 (80) 4035 4528
E-mail : [EMAIL PROTECTED]


Struts 2.0.9 server side validation problem

2007-12-19 Thread TuomoS

How can I confirm that the XML validator file is read? It seems that the
actionName-validation.xml is not read. I have checked many times that the
action java class matches with the xml file name.

actionName.java
actionName-validation.xml (when using execute method in submit)

I overrided the validate() method in my action for debugging. I can add a
fielderror manually with hasFieldError() method and it is then shown in the
jsp. 

Is it mandatory to define doctype in the validation xml file? And is it
really enough just to have the file in classpath? (WEBINF/..)

clip from the validation file:

validators
  field name=trader.address.name
 field-validator type=requiredstring
message key=errors.required.name/
 /field-validator
  /field

.
.
.
:clap:

/validators
-- 
View this message in context: 
http://www.nabble.com/Struts-2.0.9-server-side-validation-problem-tp14419444p14419444.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 2.0.9 server side validation problem

2007-12-19 Thread Dave Newton
--- TuomoS [EMAIL PROTECTED] wrote:
 How can I confirm that the XML validator file is read?

Turning up the debug level on com.opensymphony.xwork2.validator is the
easiest.

 It seems that the actionName-validation.xml is not read. I

That's not very likely; this definitely works.

 have checked many times that the
 action java class matches with the xml file name.

Does it subclass ActionSupport (or implement ValidationAware and
Validateable?

 I overrided the validate() method in my action for debugging. I can add a
 fielderror manually with hasFieldError() method and it is then shown in the
 jsp. 

For completeness, I think you meant addFieldError there.

 Is it mandatory to define doctype in the validation xml file?

That I don't know, but I don't know why you wouldn't put it in there; it can
be pretty helpful.

 is it really enough just to have the file in classpath? (WEBINF/..)

WEB-INF is not the classpath; the validation file should be in the same
package as the action in question.

d.



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



Re: Struts 2.0.9 server side validation problem

2007-12-19 Thread Brian Relph
If you are building with maven2, you might make sure that you are adding the
xml files in your source directory to your compiled output directory.  I
know this was something that fooled me at first ...

build
  resources
!-- Include resources under src/main/java in WEB-INF/classes --
resource
  directorysrc/main/java/directory
  includes
include**/*.properties/include
include**/*.xml/include
  /includes
/resource
  /resources
/build


On 12/19/07, TuomoS [EMAIL PROTECTED] wrote:


 How can I confirm that the XML validator file is read? It seems that the
 actionName-validation.xml is not read. I have checked many times that the
 action java class matches with the xml file name.

 actionName.java
 actionName-validation.xml (when using execute method in submit)

 I overrided the validate() method in my action for debugging. I can add a
 fielderror manually with hasFieldError() method and it is then shown in
 the
 jsp.

 Is it mandatory to define doctype in the validation xml file? And is it
 really enough just to have the file in classpath? (WEBINF/..)

 clip from the validation file:

 validators
 field name=trader.address.name
 field-validator type=requiredstring
message key=errors.required.name/
 /field-validator
 /field

 .
 .
 .
 :clap:

 /validators
 --
 View this message in context:
 http://www.nabble.com/Struts-2.0.9-server-side-validation-problem-tp14419444p14419444.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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




Re: Problem with server side validation

2007-08-03 Thread Laurie Harper

Vamsi wrote:

Hi all,

  I am doing validations using struts2 validation framework.
Validations(Server-side validations) are working fine but my problem is
error messages are not getting displayed.when I am doing client-side
validations messages were getting displayed but the samething was not
working with server side validations

More Info on this : I am redirect the result it's a normal result (Not using
type=redirect or redirect-action)


I'm confused; are you redirecting, or not redirecting? If you are doing 
a redirect, then the behaviour you are seeing is expected. Validation 
error messages are stored in request scope and so are lost on a 
redirect. The easiest solution in that case would be to not redirect in 
this case. Alternatively, the Message Store Interceptor [1] may help.


If you are *not* redirecting, I don't know what's happening. You'll need 
to supply some more details, such as which theme you're using, what your 
JSP looks like, how your validation is configured, etc.


[1] http://struts.apache.org/2.x/docs/message-store-interceptor.html

L.


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



Problem with server side validation

2007-08-01 Thread Vamsi

Hi all,

  I am doing validations using struts2 validation framework.
Validations(Server-side validations) are working fine but my problem is
error messages are not getting displayed.when I am doing client-side
validations messages were getting displayed but the samething was not
working with server side validations

More Info on this : I am not redirecting the result it's a normal result
(Not using type=redirect or redirect-action)

All inputs are welcome and thankful to everyone 

regards
Vamsi Krishna

 
regards

Vamsi Krishna

-- 
View this message in context: 
http://www.nabble.com/Problem-with-server-side-validation-tf4204157.html#a11958534
Sent from the Struts - User mailing list archive at Nabble.com.


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



Server side validation not working

2006-07-12 Thread Pankaj Gupta

Hi All,

I am using server side validation in my application. The problem is that 
when validate() returns an ActionErrors object, the page displayed 
becomes blank. I have no clue as to why this is happening. There is no 
javascript error or exception thrown.


Pl Help.

regards,
Pankaj

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



RE: Server side validation not working

2006-07-12 Thread Krishna, Hari
did u put html:errors properly in jsp

-Original Message-
From: Pankaj Gupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 6:13 PM
To: Struts Users Mailing List
Subject: Server side validation not working


Hi All,

I am using server side validation in my application. The problem is that 
when validate() returns an ActionErrors object, the page displayed 
becomes blank. I have no clue as to why this is happening. There is no 
javascript error or exception thrown.

Pl Help.

regards,
Pankaj

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Notice:  All email and instant messages (including attachments) sent to
or from Franklin Templeton Investments (FTI) personnel may be retained,
monitored and/or reviewed by FTI and its agents, or authorized
law enforcement personnel, without further notice or consent.

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



Re: Server side validation not working

2006-07-12 Thread Pankaj Gupta

Yes I did.

Krishna, Hari wrote:

did u put html:errors properly in jsp

-Original Message-
From: Pankaj Gupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 6:13 PM
To: Struts Users Mailing List
Subject: Server side validation not working


Hi All,

I am using server side validation in my application. The problem is that 
when validate() returns an ActionErrors object, the page displayed 
becomes blank. I have no clue as to why this is happening. There is no 
javascript error or exception thrown.


Pl Help.

regards,
Pankaj

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Notice:  All email and instant messages (including attachments) sent to
or from Franklin Templeton Investments (FTI) personnel may be retained,
monitored and/or reviewed by FTI and its agents, or authorized
law enforcement personnel, without further notice or consent.

-
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: Server side validation not working

2006-07-12 Thread Samere, Adam J
Did you set the input attribute on your action mapping in
struts-config.xml ? 

-Original Message-
From: Pankaj Gupta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 8:55 AM
To: Struts Users Mailing List
Subject: Re: Server side validation not working

Yes I did.

Krishna, Hari wrote:
 did u put html:errors properly in jsp

 -Original Message-
 From: Pankaj Gupta [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 12, 2006 6:13 PM
 To: Struts Users Mailing List
 Subject: Server side validation not working


 Hi All,

 I am using server side validation in my application. The problem is 
 that when validate() returns an ActionErrors object, the page 
 displayed becomes blank. I have no clue as to why this is happening. 
 There is no javascript error or exception thrown.

 Pl Help.

 regards,
 Pankaj

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 Notice:  All email and instant messages (including attachments) sent 
 to or from Franklin Templeton Investments (FTI) personnel may be 
 retained, monitored and/or reviewed by FTI and its agents, or 
 authorized law enforcement personnel, without further notice or
consent.

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


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


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



Re: Server side validation not working

2006-07-12 Thread Pankaj Gupta

Yes

Samere, Adam J wrote:

Did you set the input attribute on your action mapping in
struts-config.xml ? 


-Original Message-
From: Pankaj Gupta [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 8:55 AM

To: Struts Users Mailing List
Subject: Re: Server side validation not working

Yes I did.

Krishna, Hari wrote:
  

did u put html:errors properly in jsp

-Original Message-
From: Pankaj Gupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 6:13 PM
To: Struts Users Mailing List
Subject: Server side validation not working


Hi All,

I am using server side validation in my application. The problem is 
that when validate() returns an ActionErrors object, the page 
displayed becomes blank. I have no clue as to why this is happening. 
There is no javascript error or exception thrown.


Pl Help.

regards,
Pankaj

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Notice:  All email and instant messages (including attachments) sent 
to or from Franklin Templeton Investments (FTI) personnel may be 
retained, monitored and/or reviewed by FTI and its agents, or 
authorized law enforcement personnel, without further notice or


consent.
  

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


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


-
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: Server side validation not working

2006-07-12 Thread Lance
1. Is validate=true?

2. Or are you explicitly calling ActionForm.validate() in your action?
If so you'll have to call Action.saveErrors().

-Original Message-
From: Pankaj Gupta [mailto:[EMAIL PROTECTED] 
Sent: 12 July 2006 14:05
To: Struts Users Mailing List
Subject: Re: Server side validation not working

Yes

Samere, Adam J wrote:
 Did you set the input attribute on your action mapping in
 struts-config.xml ? 

 -Original Message-
 From: Pankaj Gupta [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 12, 2006 8:55 AM
 To: Struts Users Mailing List
 Subject: Re: Server side validation not working

 Yes I did.

 Krishna, Hari wrote:
   
 did u put html:errors properly in jsp

 -Original Message-
 From: Pankaj Gupta [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 12, 2006 6:13 PM
 To: Struts Users Mailing List
 Subject: Server side validation not working


 Hi All,

 I am using server side validation in my application. The problem is 
 that when validate() returns an ActionErrors object, the page 
 displayed becomes blank. I have no clue as to why this is happening. 
 There is no javascript error or exception thrown.

 Pl Help.

 regards,
 Pankaj

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 Notice:  All email and instant messages (including attachments) sent 
 to or from Franklin Templeton Investments (FTI) personnel may be 
 retained, monitored and/or reviewed by FTI and its agents, or 
 authorized law enforcement personnel, without further notice or
 
 consent.
   
 -
 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]


 -
 The information contained in this message may be privileged,
 confidential, and protected from disclosure. If the reader of this
 message is not the intended recipient, or any employee or agent
 responsible for delivering this message to the intended recipient,
 you are hereby notified that any dissemination, distribution, or
 copying of this communication is strictly prohibited. If you have
 received this communication in error, please notify us immediately
 by replying to the message and deleting it from your computer.

 Thank you. Paychex, Inc.


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




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



Re: custom server side validation in shale

2006-01-02 Thread Wendy Smoak
On 12/26/05, Wendy Smoak [EMAIL PROTECTED] wrote:

 I'm going to open a couple of enhancement tickets ...

These were:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=38042
  http://issues.apache.org/bugzilla/show_bug.cgi?id=38044

The first one moves validator-rules.xml into shale-core.jar so that
you don't have to keep a copy of it in your webapp, and the second one
makes it easier to add custom validation by allowing you to configure
a list of validation rules files in web.xml.

The documentation lives here at the moment:
   http://wiki.wsmoak.net/cgi-bin/wiki.pl?ShaleValidator

--
Wendy

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



Re: custom server side validation in shale

2005-12-26 Thread Wendy Smoak
On 12/22/05, JEEVANATHAM P. /BPCRP/INFOTECH/VASHI
[EMAIL PROTECTED] wrote:

 Please let me know about how can we do server side validation in shale. Like
 user validation,

 when user enters some value that time we need to check with database whether
 that is correct one or not.

This is an interesting question because I have a custom validator in a
Struts app that does exactly that.  Here's what I came up with, though
I would advise waiting for Craig to comment on whether he intended for
this to happen. :)

I added another validator to validator-rules.xml:

   validator name=lenientDate
 classname=net.wsmoak.acctmtce.ValidationUtil
 method=isDate
 methodParams=java.lang.String
 msg=errors.lenientDate
   /validator

The ValidationUtil.isDate method takes a String and returns true/false
(boolean).

Left to its own devices, oas.validatorCommonsValidator uses the
(localized) messages.properties file in org.apache.struts.validator
(inside shale-core.jar).  Since I know the Servlet spec requires that
things in WEB-INF/classes be loaded before things in WEB-INF/lib, I
extracted the messages.properties file from shale-core.jar, to
WEB-INF/classes/org/apache/shale/validator/, and added my new message
to it.

In the JSP:

h:outputText value=#{messages['prompt.effectiveDate']}/
h:inputText id=effectiveDate
  value=#{effectiveDate}
  s:commonsValidator
   type=lenientDate
 server=true
 client=false/
/h:inputText
h:message   for=effectiveDate styleClass=errors/

At least for simple validations, it appears to work fine.  It has
advantages over all of  the 'pure JSF' methods that I investigated-- I
certainly don't want to write a custom Validator, and even a simple
method binding in the 'validator' attribute of a component means
you're responsible for formatting the error message.  But if you need
more/different parameters than the ones s:commonsValidator provides,
then I do think you'd need to write your own custom JSF Validator and
tag, or possibly extend the ones in Shale.

I'm going to open a couple of enhancement tickets for things like
including validator-rules.xml in shale-core.jar so that you don't have
to find and include a copy in your webapp to use the provided
validators, and making the the name and location of both the messages
and the validation rules file(s) configurable.  Other ideas and
suggestions are welcome!

HTH,
--
Wendy
http://wiki.wsmoak.net/cgi-bin/wiki.pl?ShaleValidator

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



Re: custom server side validation in shale

2005-12-26 Thread Craig McClanahan
On 12/26/05, Wendy Smoak [EMAIL PROTECTED] wrote:

 On 12/22/05, JEEVANATHAM P. /BPCRP/INFOTECH/VASHI
 [EMAIL PROTECTED] wrote:

  Please let me know about how can we do server side validation in shale.
 Like
  user validation,
 
  when user enters some value that time we need to check with database
 whether
  that is correct one or not.

 This is an interesting question because I have a custom validator in a
 Struts app that does exactly that.  Here's what I came up with, though
 I would advise waiting for Craig to comment on whether he intended for
 this to happen. :)

 I added another validator to validator-rules.xml:

validator name=lenientDate
  classname=net.wsmoak.acctmtce.ValidationUtil
  method=isDate
  methodParams=java.lang.String
  msg=errors.lenientDate
/validator

 The ValidationUtil.isDate method takes a String and returns true/false
 (boolean).

 Left to its own devices, oas.validatorCommonsValidator uses the
 (localized) messages.properties file in org.apache.struts.validator
 (inside shale-core.jar).  Since I know the Servlet spec requires that
 things in WEB-INF/classes be loaded before things in WEB-INF/lib, I
 extracted the messages.properties file from shale-core.jar, to
 WEB-INF/classes/org/apache/shale/validator/, and added my new message
 to it.

 In the JSP:

 h:outputText value=#{messages['prompt.effectiveDate']}/
 h:inputText id=effectiveDate
   value=#{effectiveDate}
   s:commonsValidator
type=lenientDate
  server=true
  client=false/
 /h:inputText
 h:message   for=effectiveDate styleClass=errors/

 At least for simple validations, it appears to work fine.  It has
 advantages over all of  the 'pure JSF' methods that I investigated-- I
 certainly don't want to write a custom Validator, and even a simple
 method binding in the 'validator' attribute of a component means
 you're responsible for formatting the error message.  But if you need
 more/different parameters than the ones s:commonsValidator provides,
 then I do think you'd need to write your own custom JSF Validator and
 tag, or possibly extend the ones in Shale.

 I'm going to open a couple of enhancement tickets for things like
 including validator-rules.xml in shale-core.jar so that you don't have
 to find and include a copy in your webapp to use the provided
 validators, and making the the name and location of both the messages
 and the validation rules file(s) configurable.  Other ideas and
 suggestions are welcome!


Wendy's technique works fine, although it would be nice if Commons Validator
would read more than one resource bundle file without needing to extract it
and add the file to WEB-INF/classes yourself (your reading of the ordering
requirements is correct).

As for doing things in pure JSF validators (either a separate Validator
implementation or as a validation method pointed to with a method binding),
Shale does offer some help for formatting the messages.  There are two
classes in the org.apache.shale.util package for this purpose:

* LoadBundle - Loads a resource bundle and exposes it as a Map (similar
  in spirit to what the f:loadBundle tag does in a page, but making the
  messages available programatically as well.

* Messages - Utillity for getting locale-specific messages from a set of
  resource bundles, including parameter substitution, similar to what
  Struts Action Framework provides with MessageResources.

Both of these classes are pure POJOs designed to be configured with setter
injection, so it is very easy to configure them as managed beans (normally
in application scope).  See the class level javadocs of these two classes
for examples.

HTH,
 --
 Wendy
 http://wiki.wsmoak.net/cgi-bin/wiki.pl?ShaleValidator


Craig


Re: custom server side validation in shale

2005-12-26 Thread Wendy Smoak
On 12/26/05, Craig McClanahan [EMAIL PROTECTED] wrote:

 it would be nice if Commons Validator
 would read more than one resource bundle file without needing to extract it
 and add the file to WEB-INF/classes yourself

I think it already does. :)  Looking at
CommonsValidator.getErrorMessage again, it first looks in the
application's message bundle, and then looks in
oas.validator/messages.properties.

Assuming you've defined your message bundle in faces-config.xml:
application
message-bundleApplicationResources/message-bundle
...
/application

You can add your custom messages to (in this case)
WEB-INF/classes/ApplicationResources.properties, and leave
messages.properties alone.

--
Wendy

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



custom server side validation in shale

2005-12-22 Thread JEEVANATHAM P. /BPCRP/INFOTECH/VASHI
Hi all,

Please let me know about how can we do server side validation in shale. Like
user validation, 

when user enters some value that time we need to check with database whether
that is correct one or not. 

If not that will through a alert not message on the screen.

 

 

Regards,

JEEVANANTHAM PARAMASAMY, 
Software Engineer, 
3i - INFOTECH Limited, 
Alwarpet, 
Chennai - 600018. 

Phone: 044 24678000 extn:418
Cell no: 09840933967

 

-- 
Greetings!

 


ICICI Infotech is now 3i Infotech.


The e-mail addresses of the company's employees have been changed to existing 
name@3i-infotech.com. You are requested to take note of this new e-mail ID and 
make use of the same in future

 
This e-mail message may contain confidential, proprietary or legally 
privileged information. It should not be used by anyone who is not the original 
intended recipient. If you have erroneously received this message, please 
delete it immediately and notify the sender. The recipient acknowledges that 3i 
Infotech or its subsidiaries and associated companies, (collectively 3i 
Infotech), are unable to exercise control or ensure or guarantee the integrity 
of/over the contents of the information contained in e-mail transmissions and 
further acknowledges that any views expressed in this message are those of the 
individual sender and no binding nature of the message shall be implied or 
assumed unless the sender does so expressly with due authority of 3i Infotech. 
Before opening any attachments please check them for viruses and defects.



Re: enabling server-side validation

2005-06-10 Thread croffman
In your code in action classes, call the form.validate(mapping, request)
method

Hope this helps.

- Original Message - 
From: EROL TEZCAN [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Friday, June 10, 2005 9:30 AM
Subject: enabling server-side validation


 Hi,

 How can I enable server-side validation, in struts applications?

 For client side validation, I am using html: errors / before html:form
 tag, and in html:form  tag onsubmit=return validateOrderFormBean(this)
, and applying
 html:javascript formName=orderFormBean/

 For server-side validation, which changes I need to do?

 Thanks for all.

 Erol


 -
 Discover Yahoo!
  Get on-the-go sports scores, stock quotes, news  more. Check it out!

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



ERROR: Server side validation using Validation framework

2005-05-10 Thread Arindam Samanta


Hi,

I am new in struts.  I am getting 'Page can not be displayed error when I 
click on 'SAVE' button. validation is working fine when I implemented 
client side validation to add following line 
  html:javascript staticJavascript=true dynamicJavascript=true 
formName=loginForm/
But when I removed above code from jsp I faced page not found error but it 
is not throwing any error into server. My Form class extends from 
ValidatorForm.  My xml are,

 struts-config.xml***
 form-bean name=loginForm type=com.ual.mars.form.LoginForm/
   !-- == Action Mapping Definitions 
== --
  action-mappings 
action
  path=/login
  type=com.ual.mars.action.LoginAction
  scope=request
  name=loginForm
  validate=true
  input=/login.jsp
  forward name=Success path=/jsp/employeedeatils.jsp 
redirect=true/
  forward name=Failure path=/jsp/loginform.jsp 
redirect=true/
/action 

validation.xm***
form-validation
global
constant
/constant
/global
  formset 
  form name=loginForm
   field 
  property=userName
  depends=required,mask
  arg0 key=userName.problem/ 
  var
var-namemask/var-name
var-value^[a-zA-Z]*$/var-value
  /var 
/field
 field 
  property=password
  depends=required,mask
  arg0 key=password.problem/ 
  var
var-namemask/var-name
var-value^[a-zA-Z]*$/var-value
  /var 
/field
   /form 
  /formset 
/form-validation

validator-rules.xml***
validator name=required
classname=org.apache.struts.validator.FieldChecks
   method=validateRequired
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionErrors,
   javax.servlet.http.HttpServletRequest
  msg=errors.required

 javascript![CDATA[
function validateRequired(form) {
var bValid = true;
. 


*

Please help me.




Thanks,
Arindam


RE: ERROR: Server side validation using Validation framework

2005-05-10 Thread David G. Friedman
Your input list /login.jsp but your other JSP's are listed under the /jsp
directory, SO, should your input be something different to get rid of the
page not found error BEFORE you mess with the Validator and claim it is the
source of all problems?

Instead of:
input=/login.jsp

Is the file here (like your other examples for Success and Failure):
input=/jsp/login.jsp

Also, are you sure your action is forwarding to the success forward using
the correct CASE-sensitive spelling (i.e. Success not success) ?

Regards,
David

-Original Message-
From: Arindam Samanta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 10, 2005 5:47 AM
To: Struts Users Mailing List
Subject: ERROR: Server side validation using Validation framework




Hi,

I am new in struts.  I am getting 'Page can not be displayed error when I
click on 'SAVE' button. validation is working fine when I implemented
client side validation to add following line
  html:javascript staticJavascript=true dynamicJavascript=true
formName=loginForm/
But when I removed above code from jsp I faced page not found error but it
is not throwing any error into server. My Form class extends from
ValidatorForm.  My xml are,

 struts-config.xml***
 form-bean name=loginForm type=com.ual.mars.form.LoginForm/
   !-- == Action Mapping Definitions
== --
  action-mappings
action
  path=/login
  type=com.ual.mars.action.LoginAction
  scope=request
  name=loginForm
  validate=true
  input=/login.jsp
  forward name=Success path=/jsp/employeedeatils.jsp
redirect=true/
  forward name=Failure path=/jsp/loginform.jsp
redirect=true/
/action

validation.xm***
form-validation
global
constant
/constant
/global
  formset
  form name=loginForm
   field
  property=userName
  depends=required,mask
  arg0 key=userName.problem/
  var
var-namemask/var-name
var-value^[a-zA-Z]*$/var-value
  /var
/field
 field
  property=password
  depends=required,mask
  arg0 key=password.problem/
  var
var-namemask/var-name
var-value^[a-zA-Z]*$/var-value
  /var
/field
   /form
  /formset
/form-validation

validator-rules.xml***
validator name=required
classname=org.apache.struts.validator.FieldChecks
   method=validateRequired
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionErrors,
   javax.servlet.http.HttpServletRequest
  msg=errors.required

 javascript![CDATA[
function validateRequired(form) {
var bValid = true;
.


*

Please help me.




Thanks,
Arindam


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



RE: ERROR: Server side validation using Validation framework

2005-05-10 Thread Arindam Samanta


Thank you David. Yaa, I have done mistake with input attribute. It is 
working fine now.

Thanks,
Arindam




David G. Friedman [EMAIL PROTECTED] 
05/11/2005 04:07 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
RE: ERROR: Server side validation using Validation framework










Your input list /login.jsp but your other JSP's are listed under the 
/jsp
directory, SO, should your input be something different to get rid of the
page not found error BEFORE you mess with the Validator and claim it is 
the
source of all problems?

Instead of:
input=/login.jsp

Is the file here (like your other examples for Success and Failure):
input=/jsp/login.jsp

Also, are you sure your action is forwarding to the success forward 
using
the correct CASE-sensitive spelling (i.e. Success not success) ?

Regards,
David

-Original Message-
From: Arindam Samanta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 10, 2005 5:47 AM
To: Struts Users Mailing List
Subject: ERROR: Server side validation using Validation framework




Hi,

I am new in struts.  I am getting 'Page can not be displayed error when I
click on 'SAVE' button. validation is working fine when I implemented
client side validation to add following line
  html:javascript staticJavascript=true dynamicJavascript=true
formName=loginForm/
But when I removed above code from jsp I faced page not found error but it
is not throwing any error into server. My Form class extends from
ValidatorForm.  My xml are,

 struts-config.xml***
 form-bean name=loginForm type=com.ual.mars.form.LoginForm/
   !-- == Action Mapping Definitions
== --
  action-mappings
action
  path=/login
  type=com.ual.mars.action.LoginAction
  scope=request
  name=loginForm
  validate=true
  input=/login.jsp
  forward name=Success path=/jsp/employeedeatils.jsp
redirect=true/
  forward name=Failure path=/jsp/loginform.jsp
redirect=true/
/action

validation.xm***
form-validation
global
constant
/constant
/global
  formset
  form name=loginForm
   field
  property=userName
  depends=required,mask
  arg0 key=userName.problem/
  var
var-namemask/var-name
var-value^[a-zA-Z]*$/var-value
  /var
/field
 field
  property=password
  depends=required,mask
  arg0 key=password.problem/
  var
var-namemask/var-name
var-value^[a-zA-Z]*$/var-value
  /var
/field
   /form
  /formset
/form-validation

validator-rules.xml***
validator name=required
classname=org.apache.struts.validator.FieldChecks
   method=validateRequired
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionErrors,
   javax.servlet.http.HttpServletRequest
  msg=errors.required

 javascript![CDATA[
function validateRequired(form) {
var bValid = true;
.


*

Please help me.




Thanks,
Arindam


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



Re: Cancel button doesn't cancel server side validation

2005-03-22 Thread Bing Qiao
Thanks for your reply.

That property is required by LookupDispatchAction.
The action is defined as the following:

action path=/submit202 type=SubmitFormAction parameter=action
name=202Form scope=request validate=true
input=/sitemplates/form202.jsp
forward name=refresh path=/templates/form202.jsp/
/action

If I don't have that property, I got errors like:
Request[/submit202] does not contain handler parameter named 'action'.
This may be caused by whitespace in the label text.

Thanks

Bqiao

On Mon, 21 Mar 2005 10:18:57 -0800, K.C. Baltz [EMAIL PROTECTED] wrote:
 I've never needed a property attribute with the html:cancel control.
 Perhaps that's the problem?  Make sure you have a cancel() method in
 your DispatchAction
 
 K.C.
 
 Bing Qiao wrote:
 
 Hi,
 
 I am using Struts Validator for a LookupDispatchAction.
 
 I'm using both client and server sides validation.
 
 The problem is I can only disable the client side validation by using
 html:cancel tag.
 
 html:cancel styleClass=button style=width: 100px property=action
 bean:message key=sibutton.cancel/
 /html:cancel
 
 I doubt if the property is the problem but can't be sure. Besides it
 is required by LookupDispatchAction.
 
 Is there limitation for this tag to be used for LookupDispatchAction?
 
 Thanks a lot!
 
 
 Bqiao
 
 -
 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]
 


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



Cancel button doesn't cancel server side validation

2005-03-21 Thread Bing Qiao
Hi,

I am using Struts Validator for a LookupDispatchAction.

I'm using both client and server sides validation.

The problem is I can only disable the client side validation by using
html:cancel tag.

html:cancel styleClass=button style=width: 100px property=action
bean:message key=sibutton.cancel/
/html:cancel

I doubt if the property is the problem but can't be sure. Besides it
is required by LookupDispatchAction.

Is there limitation for this tag to be used for LookupDispatchAction?

Thanks a lot!


Bqiao

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



Re: Cancel button doesn't cancel server side validation

2005-03-21 Thread K.C. Baltz
I've never needed a property attribute with the html:cancel control.  
Perhaps that's the problem?  Make sure you have a cancel() method in 
your DispatchAction

K.C.
Bing Qiao wrote:
Hi,
I am using Struts Validator for a LookupDispatchAction.
I'm using both client and server sides validation.
The problem is I can only disable the client side validation by using
html:cancel tag.
html:cancel styleClass=button style=width: 100px property=action
   bean:message key=sibutton.cancel/
/html:cancel
I doubt if the property is the problem but can't be sure. Besides it
is required by LookupDispatchAction.
Is there limitation for this tag to be used for LookupDispatchAction?
Thanks a lot!
Bqiao
-
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: Disable struts server side validation

2005-03-18 Thread Bing Qiao
Hi,

Thanks for your reply.

I felt it not a good design to disable server side validation as well.
The struts application (intranet application) I am adding validation
to was not properly designed. A lot of jsps need beans passed from
actions to display correctly. Since those beans are defined as request
attributes, they will be lost when validation fails and the jsp is
reloaded. So to use server side validation I have to do preparation
for loading all those jsps in custom validator classes.

At the beginning I started learning struts, I was thinking if the
struts validator could reload the submission page correctly and
automatically, keeping all objects and states needed.

I am very new to struts, so forgive me if that is a stupid idea.

But thank you very much for your reply!

Bqiao



On Thu, 17 Mar 2005 14:26:22 -0500, Joe Hertz [EMAIL PROTECTED] wrote:
 Why do you want to trust the browser validation to be authoritative...?
 
 What happens if the client disables javascript or uses a browser you didn't
 anticipate? Who's to say the http request was generated by a browser at
 all??
 
 I often only have back-end validation, but never do I use client-side alone.
 
 The only exception I've given in on is an Are You Sure? popup.
 
  -Original Message-
  From: Bing Qiao [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 17, 2005 12:46 PM
  To: user@struts.apache.org
  Subject: Disable struts server side validation
 
  Hi,
 
  I've got a questions about struts validator.
 
  When defining custom validation rules, is it possible to only define
  the client side javascript without building classes?
 
  Many thanks
 
  Bqiao
 
  -
  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]



Disable struts server side validation

2005-03-17 Thread Bing Qiao
Hi,

I've got a questions about struts validator.

When defining custom validation rules, is it possible to only define
the client side javascript without building classes?

Many thanks

Bqiao

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



Help : Server Side Validation + Client Side using Struts Validator Framework (beginner)

2004-08-27 Thread Ronald B

Hello,
  I has been quite some time that I have been
introduced to STRUTS. (beginner)

Could any help write server side code.


Thank U


Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

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



Re: Help : Server Side Validation + Client Side using Struts Validator Framework (beginner)

2004-08-27 Thread Erik Weber
You might find the examples on Rick Reumann's site helpful.
http://www.reumann.net/do/struts/main

Erik

Ronald B wrote:
Hello,
 I has been quite some time that I have been
introduced to STRUTS. (beginner)
Could any help write server side code.
Thank U

Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
-
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: Server side validation

2004-05-18 Thread Nicholas L Mohler





Hi Samuel,

I'm not sure why the input couldn't accept pages and forwards within one
application.  That's probably a good question for the major contributors to
the framework.  For the struts-config.xml file Ted Husted's book, Struts
in Action, is a good reference that I have used .  The book has a chapter
completely dedicated to the struts-config API.  The chapter really just has
the dtd information formatted in a more readable layout.  In terms of
examples, I have looked at the examples included with the struts downloads
and other random learning opportunities, like this mailing list.  Sorry I
don't really have a good answer for either question.

Nick




|-+--
| |   Samuel Rochas  |
| |   [EMAIL PROTECTED]|
| |   nasoft.com|
| |  |
| |   05/17/2004 03:33 PM|
| |   Please respond to  |
| |   Struts Users  |
| |   Mailing List  |
| |  |
|-+--
  
--|
  |
  |
  |   To:   Struts Users Mailing List [EMAIL PROTECTED]  
 |
  |   cc:  
  |
  |   Subject:  Re: Server side validation 
  |
  
--|




Hello Nicholas,

Ok, thank you very much for the explanation, it makes the things a bit
clearer and less magical to me.

I have two questions:
-Why making that difference once for all? I mean, why not just accept
everything here (page, action, forward)?
-Where is a good and complete documentation with examples about
config-struts.xml to find (except struts-config_1_1.dtd)?

Sincerly
Samuel

---  andinasoft SA - Software y Consulting  ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18  Cel. +593 9 946 4046
-  http://www.andinasoft.com  -


-
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: Server side validation

2004-05-17 Thread Nicholas L Mohler





Samuel,

If you look in the struts-config.xml file, within the Controller/ tags,
there is a statement  - inputForward=true - that indicates the type of
value that will be specified in you input tags.  If true is specified,
then your input tags must refer to a forward name.  If false is specified
or if the statement is omitted, then the input value can refer to a page or
an action mapping.  In the example, true is specified and there is also a
global logon mapping.  When you specify a jsp page, there is no such
mapping, so you get the blank page.  Hopefully this helps you understand
why adding the global forward helped resolved the problem.

Our inputForward is set to false, so all of our input values refer to
ActionMappings (action/), but we could refer to global forwards.


Sorry I wasn't able to post to your thread last week.  I didn't have the
time.
Nick




|-+--
| |   Samuel Rochas  |
| |   [EMAIL PROTECTED]|
| |   nasoft.com|
| |  |
| |   05/14/2004 06:40 PM|
| |   Please respond to  |
| |   Struts Users  |
| |   Mailing List  |
| |  |
|-+--
  
--|
  |
  |
  |   To:   Struts Users Mailing List [EMAIL PROTECTED]  
 |
  |   cc:  
  |
  |   Subject:  Re: Server side validation 
  |
  
--|




Hello Geeta,

I've solved the problem, still don't really understand the reason.

I've defined a global forward for the input of my reluctant form, and
now, in case of validation error, I am forwarded to the desired page,
not to the blank one.

Thanks for you help.
Samuel

-
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: Server side validation

2004-05-17 Thread Samuel Rochas
Hello Nicholas,
Ok, thank you very much for the explanation, it makes the things a bit 
clearer and less magical to me.

I have two questions:
-Why making that difference once for all? I mean, why not just accept 
everything here (page, action, forward)?
-Where is a good and complete documentation with examples about 
config-struts.xml to find (except struts-config_1_1.dtd)?

Sincerly
Samuel
---  andinasoft SA - Software y Consulting  ---
Mariano Aguilera 276 y Almagro - Quito, Ecuador
Tel. +593 2 290 55 18  Cel. +593 9 946 4046
-  http://www.andinasoft.com  -
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Server side validation

2004-05-14 Thread Geeta Ramani
Hmm.. Ok, look at the source code of the page you get.. anything there?
Geeta

 -Original Message-
 From: Samuel Rochas [mailto:[EMAIL PROTECTED]
 Sent: Thursday, May 13, 2004 6:42 PM
 To: Struts Users Mailing List
 Subject: Re: Server side validation
 
 
 Hello Geeta,
 
  login must have been defined as a global-forward ..?
 You are right, I am quite new here, I did no notice.
 
  No reason. So just take it out..:)
 Ok, it's gone.
 
 But I still get an empty page when I make a validation error :-(
 
 The validation code is going thru, maybe another hint?
 
 Samuel
 
 -
 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: Server side validation

2004-05-13 Thread Samuel Rochas
Hello Geeta,

Thanks again for your answer.

Geeta Ramani wrote:
The input field is the path to the jsp where your form resides, something like: 

	input=/myDir/myForm.jsp
If the page is under /web (root of the application), then a /page.jsp 
is ok?
Why in the login example there is only a input=login without a page name?

..and you may want to check on the scope=session bit. 
 Are you using session scope?
For what? What should be in the session?
Samuel

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


RE: Server side validation

2004-05-13 Thread Geeta Ramani
Samuel:

  input=/myDir/myForm.jsp
 If the page is under /web (root of the application), then a 
 /page.jsp 
 is ok?

Yes, that should be ok.

 Why in the login example there is only a input=login 
 without a page name?

login must have been defined as a global-forward ..?

 
  ..and you may want to check on the scope=session bit. 
   Are you using session scope?
 For what? What should be in the session?

No reason. So just take it out..:)

 
 Samuel


regards,
Geeta 

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



Re: Server side validation

2004-05-13 Thread Samuel Rochas
Hello Geeta,

login must have been defined as a global-forward ..?
You are right, I am quite new here, I did no notice.

No reason. So just take it out..:)
Ok, it's gone.

But I still get an empty page when I make a validation error :-(

The validation code is going thru, maybe another hint?

Samuel

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