Client Side Email Validation

I want to give a client side email validation in a insert screen.

This sounds like a generic ADF question that is not related to JHeadstart. Can you please ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ?
Thanks,
Sandra Muller
JHeadstart Team
Oracle Consulting

Similar Messages

  • Client Side Javascript Validation not Working in Struts 1.x version

    hi,
    I'm following the steps provioded in the below link for Javascript Client side validation but still it is not working.I'm struggling to get this work.
    [http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/|http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/]
    "The framework automatically generates the browser specific JavaScript and validate the data only at the client side."From the above statement i undertstand that framework itself generates the javascript function for validating the field mentioned in validations.xml file so that we dont have to explicitly write a javascript function for
    validating the fields
    (or)
    Do we need to call an explicit function
    Please need help on this.
    I have followed all the steps mentioned on the above link but Client Side Javascript Validation not Working in Struts 1.x version....
    Thanks and Regards,
    Deepak

    Hi,
    Please find my steps below....still getting an error.
    2> which version of commons-validation.jar needs to be downloaded ...Link please
        downloaded the latest commons-validation.jar and placed in lib.refreshed the project,and did a build.
        3> which DTD name to be specified in "validator-rules.xml" which is in accordance to commons-validator.jar file.
    validator-rules.xml ::
    <!DOCTYPE form-validation PUBLIC
              "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
              "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">validation.xml:
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    i did as u said and im gettiong the below errorNov 5, 2009 4:33:08 PM org.apache.struts.validator.ValidatorPlugIn initResources
    SEVERE: Invalid byte 2 of 2-byte UTF-8 sequence.
    org.apache.commons.digester.xmlrules.XmlLoadException: Invalid byte 2 of 2-byte UTF-8 sequence.
         at org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:139)
         at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1610)
         at org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(DigesterLoader.java:89)
         at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:122)
         at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:238)
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:181)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1036)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
         at javax.servlet.GenericServlet.init(GenericServlet.java:212)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Need help forum members.....
    Please reply to my question 1  which has been asked before as belowDo i need to write explicit javascript function for validation in Struts (or) struts generates the javascript function by itself.??? Please explain with an example....
    Edited by: Deepak_A_L on Nov 5, 2009 4:37 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Client-side form validation fails

    Hi guys,
    Below is a very simple form with some client side validation.
    on submission it takes me to the results page with out popping an
    error. I checked it in both IE and Firefox. I checked the source
    after displaying the page and there are javascript elements built.
    I am testing this on my local box, with coldfusion mx 7 on
    apache.
    Is there anything special I have to do with the server
    settings, or browser settings or there something else.
    Thanks,
    Frank
    <cfform action="save.cfm">
    <p>
    <cfinput type="text" name="first_name" required="yes"
    message="enter your first name" validateat="onsubmit">
    : First Name<br />
    <cfinput type="text" name="last_name" required="yes"
    message="enter your last name" validateat="onsubmit">
    : Last Name<br />
    <br />
    Do you love me?<br /><br />
    <cfinput type="radio" name="love" value="yes">
    Yes<br />
    <cfinput type="radio" name="love" value="no">
    No<br />
    <cfinput type="radio" name="love" value="Maybe">
    Maybe<br />
    <br />
    How should we contact you?<br /><br />
    <cfinput type="checkbox" name="contact" value="email">
    Email?<br />
    <cfinput type="checkbox" name="contact" value="paper
    airplane">
    Paper Airplane?<br />
    <cfinput type="checkbox" name="contact" value="can
    phone">
    Can Phone?<br />
    <br />
    <cfquery name="temp" datasource="hrp">
    SELECT distinct department.department_name
    FROM department
    </cfquery>
    What department do you work for?<br /><br />
    <cfselect name="dept" size="1" query="temp"
    value="department_name" display="department_name">
    </cfselect>
    <br /><br />
    <cfinput type="submit" name="submit" value="submit">
    </p>
    </cfform>

    Odd, indeed. The validation Javascript works on my PC,
    showing an alert. I only replaced your query with mine. There might
    be something wrong with your installation of the Coldfusion system
    folder, /CFIDE/scripts/.

  • Client Side Date Validation

    I want to do a client side validation of a date field. Date which is coming from a calendar should not be greater than the system date.and shows a alert message at the time of form submit.

    You will need to write a custom JSF converter to achieve this, see this link for more info:
    http://download-east.oracle.com/docs/html/B25947_01/web_val006.htm
    Steven Davelaar,
    JHeadstart Team.

  • Plz Solve this Error in    " Client Side Address Validation in Struts "

    Hi,
    i have created struts project and foll code is written as foll :
    plz find out error in code :
    struts-config.xml code
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <data-sources />
    <form-beans >
    <form-bean name="AddressForm" type="com.projectvalidator.form.AddressForm" />
    </form-beans>
    <global-exceptions />
    <global-forwards />
    <action-mappings >
    <action
    input="/validateaddress.jsp"
    name="AddressForm"
    path="/address"
    scope="request"
    validate="true"
    type="com.projectvalidator.action.AddressAction">
    <forward name="success" path="/success.jsp"/>
    <forward name="failure" path="/validateaddress.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="MessageResources" />
    <!-- Validator plugin -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    MessageResources.properties file code
    AddressForm.name=Name      
    AddressForm.address=Address
    AddressForm.email=EmailAddress
    validation.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <form-validation>
    <formset>
    <!-- Address form Validation-->
    <form name="AddressForm">
    <field property="name"
    depends="required" >
    <arg key="AddressForm.name"/>
    </field>
    <field property="address"
    depends="required" >
    <arg key="AddressForm.address"/>
    </field>
    <field property="email"
    depends="required" >
    <arg key="AddressForm.email"/>
    </field>
    </form>
    </formset>
    </form-validation>
    validationaddress.jsp
    <%@ page language="java" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html:html locale="true">
    <head>
    <html:base />
    <title>validateaddress.jsp</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    </head>
    <body bgcolor=#fdffca>
    <html:form action="/address" method="post" onsubmit="return validateAddressForm(this);">
    <p>
    <html:errors/><p>
    name : <html:text property="name" size="30" maxlength="30" />
    address : <html:text property="address" size="30" maxlength="30" />
    emailaddress : <html:text property="email" size="30" maxlength="30" />
    <html:submit>Submit</html:submit>
    <html:cancel>Cancel</html:cancel>
    <!-- Begin Validator Javascript Function-->
    <html:javascript formName="AddressForm"/>
    <!-- End of Validator Javascript Function-->
              </html:form>
         </body>
    </html:html>
    AddressForm.java
    //Created by MyEclipse Struts
    // XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.9.210/xslt/JavaClass.xsl
    package com.projectvalidator.form;
    import org.apache.struts.validator.ValidatorForm;
    * MyEclipse Struts
    * Creation date: 02-23-2006
    * XDoclet definition:
    * @struts:form name="AddressForm"
    public class AddressForm extends ValidatorForm {
         // --------------------------------------------------------- Instance Variables
         /** address property */
         private String address;
         /** emailaddress property */
         private String email;
         /** name property */
         private String name;
         // --------------------------------------------------------- Methods
         * Returns the address.
         * @return String
         public String getAddress() {
              return address;
         * Set the address.
         * @param address The address to set
         public void setAddress(String address) {
              this.address = address;
         * Returns the emailaddress.
         * @return String
         public String getEmail() {
              return email;
         * Set the emailaddress.
         * @param emailaddress The emailaddress to set
         public void setEmail(String email) {
              this.email = email;
         * Returns the name.
         * @return String
         public String getName() {
              return name;
         * Set the name.
         * @param name The name to set
         public void setName(String name) {
              this.name = name;
    AddressAction.java
    //Created by MyEclipse Struts
    // XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.9.210/xslt/JavaClass.xsl
    package com.projectvalidator.action;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import com.projectvalidator.form.AddressForm;
    * MyEclipse Struts
    * Creation date: 02-23-2006
    * XDoclet definition:
    * @struts:action path="/address" name="AddressForm" input="/validateaddress.jsp" scope="request" validate="true"
    * @struts:action-forward name="success" path="success.jsp" redirect="true"
    * @struts:action-forward name="failure" path="validateaddress.jsp" redirect="true"
    public class AddressAction extends Action {
         // --------------------------------------------------------- Instance Variables
         // --------------------------------------------------------- Methods
         * Method execute
         * @param mapping
         * @param form
         * @param request
         * @param response
         * @return ActionForward
         public ActionForward execute(
              ActionMapping mapping,
              ActionForm form,
              HttpServletRequest request,
              HttpServletResponse response) {
              AddressForm AddressForm = (AddressForm) form;
              // TODO Auto-generated method stub
              //String forward="";
              //if (AddressForm.getName().equalsIgnoreCase("admin"));
              //return mapping.findForward(forward);
              return null;
    ==========================================
    PLZ REPLY ME ANYONE , I AM NOT GETTING OUTPUT , i am using jboss application server, i am getting a pop-up window as below:
    null is required
    null is required
    null is required
    i hope any one replies me

    Hi,
    i have created struts project and foll code is written as foll :
    plz find out error in code :
    struts-config.xml code
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <data-sources />
    <form-beans >
    <form-bean name="AddressForm" type="com.projectvalidator.form.AddressForm" />
    </form-beans>
    <global-exceptions />
    <global-forwards />
    <action-mappings >
    <action
    input="/validateaddress.jsp"
    name="AddressForm"
    path="/address"
    scope="request"
    validate="true"
    type="com.projectvalidator.action.AddressAction">
    <forward name="success" path="/success.jsp"/>
    <forward name="failure" path="/validateaddress.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="MessageResources" />
    <!-- Validator plugin -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    MessageResources.properties file code
    AddressForm.name=Name      
    AddressForm.address=Address
    AddressForm.email=EmailAddress
    validation.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <form-validation>
    <formset>
    <!-- Address form Validation-->
    <form name="AddressForm">
    <field property="name"
    depends="required" >
    <arg key="AddressForm.name"/>
    </field>
    <field property="address"
    depends="required" >
    <arg key="AddressForm.address"/>
    </field>
    <field property="email"
    depends="required" >
    <arg key="AddressForm.email"/>
    </field>
    </form>
    </formset>
    </form-validation>
    validationaddress.jsp
    <%@ page language="java" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html:html locale="true">
    <head>
    <html:base />
    <title>validateaddress.jsp</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    </head>
    <body bgcolor=#fdffca>
    <html:form action="/address" method="post" onsubmit="return validateAddressForm(this);">
    <p>
    <html:errors/><p>
    name : <html:text property="name" size="30" maxlength="30" />
    address : <html:text property="address" size="30" maxlength="30" />
    emailaddress : <html:text property="email" size="30" maxlength="30" />
    <html:submit>Submit</html:submit>
    <html:cancel>Cancel</html:cancel>
    <!-- Begin Validator Javascript Function-->
    <html:javascript formName="AddressForm"/>
    <!-- End of Validator Javascript Function-->
              </html:form>
         </body>
    </html:html>
    AddressForm.java
    //Created by MyEclipse Struts
    // XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.9.210/xslt/JavaClass.xsl
    package com.projectvalidator.form;
    import org.apache.struts.validator.ValidatorForm;
    * MyEclipse Struts
    * Creation date: 02-23-2006
    * XDoclet definition:
    * @struts:form name="AddressForm"
    public class AddressForm extends ValidatorForm {
         // --------------------------------------------------------- Instance Variables
         /** address property */
         private String address;
         /** emailaddress property */
         private String email;
         /** name property */
         private String name;
         // --------------------------------------------------------- Methods
         * Returns the address.
         * @return String
         public String getAddress() {
              return address;
         * Set the address.
         * @param address The address to set
         public void setAddress(String address) {
              this.address = address;
         * Returns the emailaddress.
         * @return String
         public String getEmail() {
              return email;
         * Set the emailaddress.
         * @param emailaddress The emailaddress to set
         public void setEmail(String email) {
              this.email = email;
         * Returns the name.
         * @return String
         public String getName() {
              return name;
         * Set the name.
         * @param name The name to set
         public void setName(String name) {
              this.name = name;
    AddressAction.java
    //Created by MyEclipse Struts
    // XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.9.210/xslt/JavaClass.xsl
    package com.projectvalidator.action;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import com.projectvalidator.form.AddressForm;
    * MyEclipse Struts
    * Creation date: 02-23-2006
    * XDoclet definition:
    * @struts:action path="/address" name="AddressForm" input="/validateaddress.jsp" scope="request" validate="true"
    * @struts:action-forward name="success" path="success.jsp" redirect="true"
    * @struts:action-forward name="failure" path="validateaddress.jsp" redirect="true"
    public class AddressAction extends Action {
         // --------------------------------------------------------- Instance Variables
         // --------------------------------------------------------- Methods
         * Method execute
         * @param mapping
         * @param form
         * @param request
         * @param response
         * @return ActionForward
         public ActionForward execute(
              ActionMapping mapping,
              ActionForm form,
              HttpServletRequest request,
              HttpServletResponse response) {
              AddressForm AddressForm = (AddressForm) form;
              // TODO Auto-generated method stub
              //String forward="";
              //if (AddressForm.getName().equalsIgnoreCase("admin"));
              //return mapping.findForward(forward);
              return null;
    ==========================================
    PLZ REPLY ME ANYONE , I AM NOT GETTING OUTPUT , i am using jboss application server, i am getting a pop-up window as below:
    null is required
    null is required
    null is required
    i hope any one replies me

  • Submitting form through server  instead of client side email(outlook,Yahoo,  ...)

    What exactly I need, in order my clients submit a dynamic form posted on our web site to our sever?
    Thank you for your help

    Hi mmgiath,
    This is fairly simple. All you need to have a HttpSubmitButton. Drag a HttpSubmitButton from the StandardObjectLibrary. Specify the URL you want to submit. Specify which type you want to submit. That's all.
    Hope this helps.
    Thanks,
    Bibhu.

  • How to make client side validations using NWDS

    Hi Frndz..
                   Am creating UIs using NWDS ,i made tthe validations @ servr side n i have 2 made this validations @ clinet side ,but am not aware how it is????
    can anyone help me in this regard.
    THANKS & REGARDS
    Rajesh Kumar

    chk it
    /people/martin.kellermann2/blog/2006/12/17/client-side-input-validation-with-htmlb--the-basics
    http://help.sap.com/saphelp_nw04/helpdata/en/43/067941a51a1a09e10000000a155106/frameset.htm
    /people/kirupanand.venkatapathi2/blog/2005/12/18/client-side-validation-in-dynpage
    http://help.sap.com/saphelp_nw04s/helpdata/en/8e/e3a942ad920c31e10000000a1550b0/frameset.htm
    /thread/86123 [original link is broken]
    https://media.sdn.sap.com/html/submitted_docs/dotnet/Programming%20with%20PDK%20for%20.NET/SAP%20NetWeaver%20.NET%20Controls/Event%20Handling/Client%20Side%20Event%20Handling.htm

  • Struts 2 Client side validation getting skipped.

    I am doing a simple program using struts 2. Usually in struts2 bean class will be combined with action class unlike in struts 1.2. But for enhancing readability I made a seperate bean class and I reference it in my action class. But after seperating bean from action class Client side validation using xml is not happening. It is getting skipped. But server side validation inside execute() is happening. Will anyone please help me to find a solution to make client side validation run.
    here are the different files.
    1) JSP File - SEmail.jsp
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <html>
    <s:head theme="ajax" />
    <title>SEmail </title>
    <body>
    <center><font color="blue" size="5" face="bold">
    <s:label     value="Secure Email - Non Registered User" /> </font></center>
    <br>
    <font color="red" size="3"> <s:label
         value="Want to contact us?."></s:label>
    </font>
    <center><s:form action="/Semail.action" method="POST"
         validate="true">
         <s:actionerror />
         <s:select label="Topic" name="user.topic" headerKey="-1" required="true"
              list="#{'Plan Coverage':'Plan Coverage','Sales':'Sales','Others':'Others'}">
         </s:select>
         <s:textarea name="user.message" label="Message" rows="4" cols="50"
              required="true" />
         <br>
         <s:label value="Contact Information" />
         <br>
         <table align="center" width="500">
              <tr align="left">
                   <td align="left"><s:select label="Title" name="user.title"
                        headerKey="-1" required="true"
                        list="#{'-- Select One --':'-- Select One --','Mr.':'Mr.','Ms.':'Ms.','Mrs.':'Mrs.'}">
                   </s:select></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="First Name"
                        name="user.firstname" size="20" maxlength="35" required="true" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Family Name"
                        name="user.familyname" size="20" maxlength="35" required="true" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Profession"
                        name="user.profession" size="20" maxlength="20" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Address" name="user.address"
                        size="20" maxlength="100" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Telephone Number"
                        name="user.telnumber" size="20" maxlength="20" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="P.O. Box" name="user.pobox"
                        size="20" maxlength="8" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="City"
                        name="user.emirate" size="20" maxlength="35" required="true" /></td>
              </tr align="left">
              <tr>
                   <td align="left"><s:textfield label="Region and Country"
                        name="user.country" size="20" maxlength="35" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="E-mail Address"
                        name="user.email" size="20" maxlength="70" required="true" /></td>
              </tr>
         </table>
         <br>
         <s:file name="user.uploadFile" label="Upload Document" />
         <br>
         <br>
         <s:submit value="Submit" align="center"></s:submit>
    </s:form></center>
    <font color="red" size="3"> <s:label
         value="All fields marked (*) are mandatory."></s:label>
    </body>
    </html>
    2) struts.xml
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
         <package name="semail" extends="struts-default">
              <action name="Semail" class="semail.NonregUser">
                   <result name="input">/SEmail.jsp</result>
                   <result name="error">/SEmail.jsp</result>
                   <result>/SEmail.jsp</result>
              </action>          
         </package>     
    </struts>
    3) Bean Class - User.java
    package semail;
    public class User {
         private String topic;
         private String message;
         private String title;
         private String firstname;
         private String familyname;
         private String profession;
         private String address;
         private int telnumber;
         private String pobox;
         private String city;
         private String country;
         private String email;
         private String uploadFile;
         private String testing;
         public String getTopic() {
              return topic;
         public void setTopic(String topic) {
              this.topic = topic;
         public String getMessage() {
              return message;
         public void setMessage(String message) {
              this.message = message;
         public String getTitle() {
              return title;
         public void setTitle(String title) {
              this.title = title;
         public String getFirstname() {
              return firstname;
         public void setFirstname(String firstname) {
              this.firstname = firstname;
         public String getFamilyname() {
              return familyname;
         public void setFamilyname(String familyname) {
              this.familyname = familyname;
         public String getProfession() {
              return profession;
         public void setProfession(String profession) {
              this.profession = profession;
         public String getAddress() {
              return address;
         public void setAddress(String address) {
              this.address = address;
         public int getTelnumber() {
              return telnumber;
         public void setTelnumber(int telnumber) {
              this.telnumber = telnumber;
         public String getPobox() {
              return pobox;
         public void setPobox(String pobox) {
              this.pobox = pobox;
         public String getCity() {
              return city;
         public void setCity(String city) {
              this.city= city;
         public String getCountry() {
              return country;
         public void setCountry(String country) {
              this.country = country;
         public String getEmail() {
              return email;
         public void setEmail(String email) {
              this.email = email;
         public String getUploadFile() {
              return uploadFile;
         public void setUploadFile(String uploadFile) {
              this.uploadFile = uploadFile;
         public String getTesting() {
              return testing;
         public void setTesting(String testing) {
              this.testing = testing;
    This is my bean class. Instead of putting it with action class NonregUser.java , I have seperated it out for readability. And I am referencing it in the action class.
    4) Action Class - NonregUser.java
    package semail;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts2.interceptor.ServletRequestAware;
    import org.apache.struts2.interceptor.ServletResponseAware;
    import com.opensymphony.xwork2.ActionSupport;
    public class NonregUser extends ActionSupport implements ServletRequestAware,
              ServletResponseAware {
         private static final long serialVersionUID = 2451855813074437309L;
         HttpServletRequest request = null;
         HttpServletResponse response = null;
         private User user = null;
    /* I am referencing my bean class here instead of writing all the getters and setters here.*/
         public User getUser() {
              return user;
         public void setUser(User user) {
              this.user = user;
         public String execute() throws Exception {
              System.out.println("Validating login");
              if(user!=null){
                   System.out.println(user.getFirstname());
                   System.out.println(user.getEmail());
                   System.out.println(user.getTopic());
                   System.out.println(user.getTitle());
    // this server side validation is happening
                   if (user.getTitle().trim().equals("-- Select One --")) {
                        addActionError("Please select Title");
                        return ERROR;
                   } else {
                        return SUCCESS;
              }else{
                   return SUCCESS;
         public void setServletRequest(HttpServletRequest arg0) {
              System.out
                        .println("HttpServletRequest : " + NonregUser.this.getClass());
              request = arg0;
         public void setServletResponse(HttpServletResponse arg0) {
              System.out.println("HttpServletResponse : "
                        + NonregUser.this.getClass());
              response = arg0;
    This is my acation class. Here I am referencing my bean class User.java.
    5) xml validation file - NonregUser-validation.xml
    /*This client validatin is not working*/
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE validators PUBLIC
              "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
              "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
    <validators>
         <field name="topic">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please select the Topic</message>
              </field-validator>
         </field>
         <field name="message">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Message</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">8000</param>
    <message>Message cannot contain more than 8000 characters</message>
              </field-validator>
         </field>
         <field name="title">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please select the Title</message>
              </field-validator>
         </field>
         <field name="firstname">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter First name</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">35</param>
    <message>First Name cannot contain more than 35 characters</message>
              </field-validator>
         </field>
         <field name="familyname">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Family name</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">35</param>
    <message>Family Name cannot contain more than 35 characters</message>
              </field-validator>
         </field>
         <field name="emirate">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Emirate/City</message>
              </field-validator>
         </field>
         <field name="email">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Email address</message>
              </field-validator>
              <field-validator type="email">               
                   <message>Please enter a valid Email address</message>
              </field-validator>
         </field>
    </validators>
    6) web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app>
         <filter>
         <filter-name>struts2</filter-name>
         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
         </filter>
         <filter-mapping>
         <filter-name>struts2</filter-name>
         <url-pattern>/*</url-pattern>
         </filter-mapping>
         <welcome-file-list>          
              <welcome-file>/SEmail.jsp</welcome-file>
         </welcome-file-list>     
         <error-page>
    <error-code>404</error-code>
    <location>/pagenotfound.jsp</location>
    </error-page>
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error.jsp</location>
    </error-page>
    </web-app>
    Edited by: L-J-K on Jul 22, 2008 5:22 AM

    I was trying to do it through creating a new validators.xml where I would redefine all struts built in validations and add de definition for my custom Validation (<validator name="checkUser" class="com.custom.CustomUserValidator"/>). Then I define the ActionClassName-action-validation.xml refering to my custom validator (checkUser). The com.custom.CustomUserValidator Class has to extend FieldValidatorSupport or ValidatorSupoort (depending on what kind of validation).
    Ok that's it, this is the theory, now the custom validator (checkUser) is executed before my action but I don't know how to do it so that if the validation fails i return to the same page showing the error message to the user without having to execute the target action. Does anyone know how to do this????

  • Struts client side validation....

    Hello all,
    I am using struts client and server validation but only the server validation works. I tired looking around the forum but wouldnt find any similar problem.
    I am getting value from the previous action class and i am able to successfully retrieve and display the value. I inserted the value in a object and pass over to my jsp. When i try inserting the validation, the server side works fine but i get nth on the client side. I viewed the source code of my jsp and the JAVASCRIPT is successfully inserted but no pop up when i leave the fill blank. Please advise mi..
    1)update.jsp will retrieve data from a object and display them in text box
    struts config file**
    <form-bean name="UpdateMarks" type="fypms.form.UpdateMarksForm" />
    <action name="UpdateMarks"
    path="/updateMarks"
    type="fypms.action.UpdateStudentMarks"
    scope="request"
    validate="true"
    input="/pages/UpdateStudentMarks.jsp" >
    <forward name="successfulUpdate" path="/pages/successfulUpdate.jsp" />
    <forward name="wrongHelloId" path="/pages/wrongHelloWorld.jsp" />
    </action>
    <message-resources parameter="MessageResources"/>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property
    property="pathnames"
    value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
    </plug-in>
    validation.xml**
    <!-- javascript validation for Update Presentation marks page -->
    <form name="UpdateMarks">
    <field property="first_Present"
    depends="creditCard">
    <arg key="prompt.firstPresent" />
    </field>
    <field property="final_Present"
    depends="creditCard">
    <arg key="prompt.finalPresent" />
    </field>
    </form>
    updatemarksform.java**
    private String adminNo[];
         private String first_Present[];
         private String final_Present[];
         private String batchNumber;
         //private String batchNumber;
         public ActionErrors validate( ActionMapping mapping, HttpServletRequest request)
              ActionErrors errors = new ActionErrors();
              List testing = new ArrayList();
              System.out.println("out");
              for(int x=0; x < first_Present.length;x++)
                   System.out.println("firsT" + first_Present[x].length());
                   if (first_Present[x].length()<1)
                        System.out.println("a");
                        //userId not entered
                        errors.add("marks.firstPresentation", new ActionMessage("marks.firstPresentation"));
                   if (final_Present[x].length()<1)
                        //password not entered
                        errors.add("marks.finalPresentation", new ActionMessage("marks.finalPresentation"));
              request.setAttribute("StudentList", testing);
              return errors;
    update.jsp**
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ page import="fypms.model.*" %>
    <link href="/FYPMS/css/style.css" rel="stylesheet" type="text/css">
    <!--Can contains: JSP -->
    <html:html locale="true">
    <html:form action="/updateMarks" method="post" onsubmit="return validateUpdateMarks(this);">
    <html:errors/>
         <table>
    <tr>
    <td>Name</td>
    <td>Admin Number</td>
    <td>First Presentation</td>
    <td>Final Presentation</td>
    </tr>
    <logic:iterate id="myCollectionElement" name="StudentList">
    <tr>
    <td> <bean:write name="myCollectionElement" property="name"/><html:hidden name="hiddenBatch" property="batchNumber"/></td>
    <td> <bean:write name="myCollectionElement" property="adminNo"/><html:hidden name="myCollectionElement" property="adminNo"/></td>
    <td> <html:text name="myCollectionElement" property="first_Present" /></td>
    <td> <html:text name="myCollectionElement" property="final_Present" /> </td>
    </tr>
    </logic:iterate>
    >
    <tr><td colspan="4"><html:submit value="enter"/></td></tr>
         </table>
    <!-- Begin Validator Javascript Function-->
    <html:javascript formName="UpdateMarks" staticJavascript="true" />
    <!-- End of Validator Javascript Function-->
    </html:form>
    </html:html>
    thank in advance

    # -- validation text(display text) for login page --
    valid.title=Simple Validation Test Form
    prompt.username=Username
    prompt.password=Password
    prompt.phone=Phone Number
    prompt.email=E-Mail Address
    prompt.url=URL (Website Address)
    login.userid = Username is required
    login.password = Password is required
    #-- validation text(display text) for Update presentation marks page --
    prompt.firstPresent=first_Present
    prompt.finalPresent=final_Present
    marks.firstPresentation=First Presentation marks is required
    marks.finalPresentation=Final Presentation marks is required
    thx for ur help ^^
    Message was edited by:
    fatmond

  • Client Side Validation Problems

    Hi,
    When I use .Net validation controls on my aspx pages, the validation always executes server-side, even on IE clients, regardless of the EnableClientScript property on the validators.
    If i hit the remote server directly, the validators work correctly - ie Client-side for IE and server side for all others.
    So I assume that the remote server is unable to correctly identify the client browser as it's gatewayed via the portal. Does anyone know a way around this please?
    Cheers,
    Simon

    Hi Jonathan,
    Thanks for your reply.
    I'm a .Net developer who's new to Plumtree development, so my appologies if i'm missing something obvious.
    We're using the Broadcast Listener pattern, Portal Server v 5.0.3, Web Controls 2.1 and .Net Framework 1_1_4322_2032. We've generated the client script to support this version of .Net and installed in onto the ImageServer.
    We have a menu portlet, which broadcasts a 'linkSelected' event on click of a menu item. Our main portlet is the listener and has an event handler that invokes a PTGetHTTPRequest call to one of a number of page for processing (depending on the menu item selected etc). This 3rd page contains all of the form fields, the validators and the validation summary.
    When this aspx page has finished processing, there is an event handler in the 2nd page which scrapes the content of Response.ResponseText into a container <DIV> element on page 2 - ie dynamically building the html content with client script.
    I've built a routine that can scrape this dynamically generated content of the <body> of the Listener portlet at this stage and when I examine this output, the validation js file and the inline __doPostback functions are all present.
    I've done some debugging of the WebUIValidation.js file and although each individual validator is firing ok, it appears that the problem is manifesting itself in the ValidationSummaryOnSubmit_1_1_4322_2032()function. This function is called correctly, but it can't evaluate the Page_ValidationSummaries object.
    This Page_ValidationSummaries object is defined and set within the inline script as follows :
    var Page_ValidationSummaries;
    function PTSetValidationSummaries_490()
    { [/b]
    [b] var valsInput = document.getElementById('PT_VALIDATORS_SUM_490');
    if(valsInput)
    Page_ValidationSummaries = eval(valsInput.value);
    else Page_ValidationSummaries = new Array();
    and the PT_VALIDATORS_SUM_490 element is defined as :
    <INPUT id=PT_VALIDATORS_SUM_490 type=hidden value="new Array(document.all['vsAll'])">
    and the vsAll element is defined as :
    <DIV id=vsAll style="DISPLAY: none; COLOR: red" showmessagebox="True"></DIV>
    If I debug the WebUIValidation.js file, I can successfully evaluate document.getElementById('PT_VALIDATORS_SUM_490'), so I believe that the error occurs when the PTSetValidationSummaries_490()function executes (or perhaps PTSetValidators_490isn't actually calling it??).
    I can't really debug this any further as I've now traced the error back to the inline script that's appended at runtime by the Plumtree environment.
    Would it be possible for me to email this source code to you for inspection and comment please?
    Cheers,
    Simon

  • How to Disable client side validation for the message text input

    Hi,
    I have scenario where i need to by pass the client side validation for a message text input
    Scenario is
    I have a message text input field(say XYZ), i set the max length for the item as 20
    Now when im trying to enter the greek characters into it, it is allowing me to enter till 20 characters
    But when i try to submit the form ..my client side validation is firing..
    The Error says the XYZ is too long
    The problem is, in greek each character takes two bytes.(In english it is only 1).While entering the content it allowing 20 characters and when validating it is checking for bytes(if we enter in greek the length will be 40 bytes not 20)
    I cannot increase the max length .coz i have restrict the character length to 20 only.(english or Greek).
    Please help me in this regard.
    Regards
    Sandeep.

    Thanks for the information.But we dont have any option either declaratively or programatically to disable the client side validation for the message text input..I referred java docs ..i dint find any method which does..
    Correct me if im wrong

  • Af:query client side validation

    Hello,
    I have an application with 2 ViewObjects (based on SQL), each with its own ViewCriteria. I have 2 pages, each containing 1 of the ViewCriteria as af:query with results table. Each ViewCriteria has a number of fields, all f which are selectively required.
    Now, when I go to page A, leave all fields empty and hit 'search', my fields get marked immediately as 'you need to enter at least one of the criteria'. No server request, just pure client validation, as you'd expect. Now we go to page B, doing exactly the same (empty fields, search). I see a lot of activity now, a server request, a query executed, and then a stacktrace saying 'at least 1 attribute is required'. In the front end, I also get a popup saying I have to enter at least 1 value.
    Does anyone have any idea why the validation for both af:query components is different? Both ViewObject look the same to me, with same properties and attributes set.
    Thanks in advance,
    Stijn.

    Thanks for the reply, Vinod.
    The problem still persists, though. We're working with version 11.1.3 (where the issue should be fixed), and it doesn't happen every time. 8 out of 10 af:query-components we use go to the server before validating the input, resulting in a popup. The other 2 do client-side validation and immediately tell you to fill in the blanks (which is the behaviour we want)...

  • STRUTS: client-side validation in jsp using  DynaValidatorForm

    I am supposed to work on struts on as project and it is like learning a crash course and work the next day.
    In Struts 1.1 enviroment, I am using DynaValidatorForm to create a bean form and then perform validation.
    1. I write a DynaValidatorForm definition in struts-config.xml
    2. I write xml for action so that when /getQuotes.do in invoked by a jsp form, the form data is put into the QuoteDetailsBean.
    3. add the plugin script for ValidatorPlugIn
    xml fragment from struts-config:
    //form bean
    <form-beans>
    <form-bean name="QuoteDetailsBean" type="org.apache.struts.validator.DynaValidatorForm">
        <form-property name="forename" type="java.lang.String"/>
       <form-property name="surname" type="java.lang.String"/>
    <form-bean>
    </form-beans>
    <action
            path="/getQuotes"
            type="com.kainos.quickquotes.struts.QQGetQuotesAction"
            validate="true"
            name="QuoteDetailsBean"
            input="/userform1.do"
            parameter="save"
            scope="session">
            <forward name="success" path="/pages/jsp/result.jsp"/>
            <forward name="back" path="/userform1.do"/>
    </action>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
         <set-property
             property="pathnames"
             value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
      </plug-in>Now I write a validation code for getQuotes.do. note that I can write the validation code with
    <form name="QuoteDetailsBean"> but this form bean is shared by many jsp, so i am using the name of the action
    (getQuotes) as the name of the form in the validation.xml.
    So far this looks okay, as I am going by some example.
    xml fragment from validation.xml:
    <formset>
              <form name="/getQuotes">
                 <field property="forename" depends="required,minlength">
                    <arg0 key="QuoteDetailsBean.forename" />
                    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                    <var>
                       <var-name>minlength</var-name>
                       <var-value>2</var-value>
                    </var>
                 </field>
                 <field property="surname" depends="required,minlength">
                <arg0 key="QuoteDetailsBean.surname" />
                <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                <var>
                   <var-name>minlength</var-name>
                   <var-value>2</var-value>
                </var>
                 </field>
    </formset>Now I write the JSP. I use the <html:javascript> tag to allow front-end validation based on the xml in validation.xml.
    The jsp code:
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <html:html locale="true">
    <head>
    <title><bean:message key="welcome.title"/></title>
    <html:base/>
    <html:javascript formName="/getQuotes"
                method="validateForm"
                dynamicJavascript="true"
                staticJavascript="false"
                cdata="false" />
    </head>
    <body bgcolor="#FFCC9F">
    <html:errors />
    <html:form action="getQuotes.do" onsubmit="return validateForm(this);" >
    Forename:</td> <td>���<html:text property="forename"/></td></tr>
    <tr> <td>Surname:</td> <td>���<html:text property="surname"/></td></tr>
    <html:submit value="Quotes" /></td></tr>
    </html:form>
    </body>
    </html:html>Does this looks okay. I wrote so far based on some tutorials n help online.
    Now when I open the JSP and then do a submit, there is no validation (I tried by submitting with empty forename and surname. I mean i could invoke the action class and the invoke class
    redirects(forwards) to the appropriate path. so the code works fine except validation is not done
    Q1. So what should i do more to get client-side validation?
    What actually happens in client-side validation? does a pop up alert appears?
    nothing happens so far in my case.
    Q2. What should I do more for server side validation. Since the form is incomplete, what happens?
    I thought the same form returns and the error messages are printed in the jsp page since i have the <html:errors />
    tag just below the <body> tag.
    The action class is pretty simple so far:
    public class QQGetQuotesAction extends Action {
        public QQGetQuotesAction(){
    public ActionForward execute(ActionMapping mapping,
                 ActionForm form,
                 HttpServletRequest request,
                 HttpServletResponse response)
        throws Exception {
            DynaValidatorForm dynaform = (DynaValidatorForm)form;
            System.out.println("forename:"+dynaform.get("forename");
            System.out.println("surname:"+dynaform.get("surname");
            return forward=mapping.findForward("back");
    }Please help me out. I think I am missing something which i need to do
    thanks
    Tanveer

    I think the validations are to be declared on the form
    name and not the action path.
    Your formName is QuoteDetailsBean but your are using
    the action path(/getQuotes) both in the validation
    rules and the jsp tags. Use the formName on both the
    places.
    Also your html:javascript tag will not generate the
    static javascript to validate the fields. For this you
    will have to add code like below.
    <html:javascript dynamicJavascript="false"
    staticJavascript="true"/>
    Other options is to set the attribute
    staticJavascript="true" in your html:javascript tag.
    Hope it helps.hi
    staticJavascript="true" did the trick. :)
    I think the validations are to be declared on the form name and not the action path.It is not necessary. You can declare the validation on the action class. This is essential if a form bean is shared by several JSPs having its own action class. This is as per as I read in a tutorial and it works.

  • Client side validation in struts using validation framework

    Hi ,
    am new to struts.....
    I want to validate a simple login page using struts validation framework...
    For that i created,
    login.jsp ( contains html:errors and html:javascript and onsubmit)
    LoginForm extends ValidatorForm
    LoginAction
    resource bundles
    validation.xml ( required, minlength and maxlength rules for both fields)
    struts-config.xml ( configured action mapping and form beans)
    whats my problem is....
    i will get error messages through server side validation...
    i cant able to get the error messages using javascript i.e alert messages.
    i seen the page resource in that all javascript functins are inserted.
    on seeing the javascript error console... it shows
    formName has no properties...............
    exactly at this line
    oRequired = eval('new ' + formName.value + '_required()'); //function validateRequired(form)

    Thanks for your valuable reply.....
    Ya of course what you said was correct....
    I got error messages while submitting the form without any value....
    error messages are displayed using the <html:errors/> tag (server side validation ).
    But it fails to show the alert messages for those errors ( client side validation).
    i inserted the <html:javascript formName="form bean name" /> tag in the bottom of my login jsp.....
    on seeing the error console, it shows formName has no properties.
    Could anybody help me to sort out this problem........

  • Client side validations in web dynpro

    Hi experts,
    can anybody tell me How we perform client side validations in web dynpro ?
    Thanks,
    Prasad.

    Hi Prasad,
    Validations are generally required during some events or calls to a functions. So there are bascially two ways:
    1) You do the validation is the onActionEvent of the UI element. However this is some time time is not a right approach (depends upon your scenario).
    2) There is another method called wdDoBeforeAction(). Do all you validations for the actions in this method. read the java doc for the same functions, here:
       * Hook method called for additional validation of user input. <p>
       * @param validation Interface for reporting validation errors
    You can catch the particualr action in this emthod and then can write you validation code before the action is called.
    For gettiong the action use this code:
    if(validation.getCurrentAction().equals(IPrivate<Your_View_Name>.WDActionEventHandler.<ACTION_NAME>)){
    // write your validation code here.           
    I hope this will help you. Please revert back in case you have further issues.
    Thanks and Regards,
    Pravesh

Maybe you are looking for

  • Problem installing Windows 8.1 on MBP

    Ok so I was having bluetooth issue in Windows 7, which is a different issue, so I decided to try Windows 8.1 Pro X64 Using boot camp I get to the part where Windows is asking where to install. I choose Drive 0 Partition 4: Boot Camp and format it. On

  • I can no longer see the address field in safari, can anyone help?

    I can no longer see the address field in safari, can anyone help?

  • Installing from Single User Mode

    I had to wipe my internal hard drive on my iMac G5 (the model just prior to the Intel Macs). I did this from another Mac using FireWire mode.... anyway... I can boot in Single User mode, but how can I tell it to install from the Tiger Installer in th

  • Fire walls between servers..

    Hi All, 1. Is there any way to find firewalls (i.e. number of firewalls and their name or any other identification) between two servers. 2. How to find ports whether the are opened in the fire wall. Telnet is disabled for our servers. Is there any wa

  • Help needed on multi-level photo folders on iPhone

    In trying to figure out how to create sub-folders for photographs on an iPhone, the bottom line seems to be that it's not possible.  You can synce to ONE folder on a PC, and that folder can contain many folders, which will appear on the iPhone, but y