| Author |
problem in field validation
|
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
|
|
hi,
in my application..i m using server side validation....the field is not getting validated...can any one help me out..here is the code...
|
 |
ravindar dayachand
Greenhorn
Joined: May 08, 2009
Posts: 14
|
|
I think this is a validation on the client side.For this to work you need to declare the tag <html:javascript> in your jsp page
For serverside validation we have to define the validate method in my form class.
Please try this, it may work
|
 |
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
|
|
hi,
here is my jsp code
|
 |
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
|
|
any help regarding my post...i had declared error method in class..here is the code
|
 |
Armin Vetek
Greenhorn
Joined: Aug 21, 2010
Posts: 29
|
|
Hi,
I thing that the field is validated but you do not see the validation because you use simple theme.
Change the simple theme to xhtml theme for the beginning regardless of layout.
You should add fielderror to simple theme if the validation will work.
Best regards,
Javanus
|
http://www.javanus.com/blogs
|
 |
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
|
|
hi,
i had used theme="simple" in all my application..for upload it is working..but not for "manage" page ..changed the code..as follows
|
 |
ravindar dayachand
Greenhorn
Joined: May 08, 2009
Posts: 14
|
|
Use
<html:javascript formName="your form name"/> before the beginning of your table tag
<s:form action="manage" namespace="/audiocontent" method="POST" theme="simple">
<html:javascript formName="your form name"/>
<table>
|
 |
madhuri kunchala
Ranch Hand
Joined: Mar 30, 2010
Posts: 350
|
|
hi ravindar,
i got what you suggested...but i didnt used any javascript in my application..i used interceptors and here is my configuration file...
|
 |
Anbarasu Aladiyan
Ranch Hand
Joined: Jun 02, 2009
Posts: 182
|
|
I think when add/change the interceptor stack; the default interceptor stack will get removed.
Try adding after the <interceptor-ref name="uploadContent"> tag.
|
A.A.Anbarasu
|
 |
Raza Mohd
Ranch Hand
Joined: Jan 20, 2010
Posts: 247
|
|
hi madhuri.
Try putting required.....in place of requiredstring.
How are you showing your error in span.?
|
Good luck!!
A small leak can sink a Gigantic ship.>
|
 |
Rajkumar Kathiresan
Greenhorn
Joined: Dec 30, 2008
Posts: 8
|
|
1. Your validation file name must be <actionclass>-<validation>.xml
2. your action should have getters and setters for the field against you are validating.
3. In interceptor basicStack must be above the validation & workflow interceptor in struts.xml.
4. <S:fielderror> is doesnot have a property "fieldName"
use like this
|
 |
 |
|
|
subject: problem in field validation
|
|
|