Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Struts
DynaValidatorActionForm usage?
ken amy
Greenhorn
Posts: 7
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I use
struts
1.1 DynaValidatorActionForm to boudle validation to action. the vlidation seems work but there are no prompt information as expected. I am not sure the problem. can anyone help me?
jsp
file:
<html:javascript formName="/input"/> ..... <html:form action="/input" onsubmit="return validateInputForm(this)">
struts-config.xml
<form-beans > <form-bean name="inputForm" type="org.apache.struts.validator.DynaValidatorActionForm"> <form-property name="name" type="java.lang.String" /> </form-bean>
validation.xml
<form name="/input"> <field property="name" depends="required"> <arg0 position="0" key="prompt.name" /> </field> </form>
ApplicationResources.xml
prompt.name=name errors.required={0} is required.
Sagar Rohankar
Ranch Hand
Posts: 2908
1
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In first glance, i recommend few changes ,
1.
<html:javascript formName="[B]inputForm[/B]"/> ..... <html:form action="/input" onsubmit="return validateInputForm(this)[B];[/B]">
2.
validation.xml
<form name="[B]inputForm[/B]"> <field property="name" depends="required"> [B]<arg0 key="prompt.name" />[/B] </field> </form>
Changes are in bold format !
Try this,
[LEARNING bLOG]
|
[Freelance Web Designer]
|
[and "Rohan" is part of my surname]
straws are for suckers. tiny ads are for attractive people.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Errors are not getting displayed on JSP when DynaValidatorActionForm is used.
Retrieving strings using getStrings() - DynaValidatorActionForm
Still not working - DynaValidatorActionForm and checkboxes
DynaValidatorActionForm not working
DynaValidatorActionForm - Cannot find bean...
More...