This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes How to validate custom tage through struts validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to validate custom tage through struts validator" Watch "How to validate custom tage through struts validator" New topic
Author

How to validate custom tage through struts validator

Rajeev roushan sharma
Ranch Hand

Joined: Jan 28, 2010
Posts: 50
How to validate custom tags through struts validators.. any helpful web link please. Thanks in advance!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If the custom tag creates normal HTML input elements there's no difference.
Rajeev roushan sharma
Ranch Hand

Joined: Jan 28, 2010
Posts: 50
David Newton wrote:If the custom tag creates normal HTML input elements there's no difference.


Hi David!

I did not get what do you mean by "normal HTML input elements there's no difference" ?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Struts validates against the name of the input element. It doesn't matter how the input element was created.
Rajeev roushan sharma
Ranch Hand

Joined: Jan 28, 2010
Posts: 50
David Newton wrote:Struts validates against the name of the input element. It doesn't matter how the input element was created.



Do you mean to say, it will validate input element that is created through javascript in runtime (assume setter-getter method is available in the bean class) ?
Thanks in advance!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Struts validates based on the name of the submitted parameter. It does not matter how the input element was created. I don't know how to make it any clearer.
Rajeev roushan sharma
Ranch Hand

Joined: Jan 28, 2010
Posts: 50
David Newton wrote:Struts validates based on the name of the submitted parameter. It does not matter how the input element was created. I don't know how to make it any clearer.


Thanks David :) i will try it and will post if required.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to validate custom tage through struts validator
 
Similar Threads
Custom Validation
Validation against DTD using SAX
Server side validation - not working.
validation Extended Ascii chars
Combobox Valdation