struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramachandran" <ramachand...@summitworks.com>
Subject RE: Regarding Client side Validations
Date Tue, 03 Feb 2004 10:26:28 GMT
Hi,

        That is i know, now i am performing like that, but when the cancel
is working means after enterting all the values only it is working, but for
me even with out entering any values it has to work. What i have to do for
that one.....


-----Original Message-----
From: hgosper@csc.com.au [mailto:hgosper@csc.com.au]
Sent: Tuesday, February 03, 2004 12:06 PM
To: Struts Users Mailing List
Subject: Re: Regarding Client side Validations


The cancel button's value will be placed on the request iff it was
clicked... so you will test for its presence with something like:

if(request.getParameterValues("cancel") != null)
{
        // set your cancel forward mapping eg. clear the form.
}
else
{
        // set your submit forward mapping.
}

Hope that helps you.

Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779
----------------------------------------------------------------------------
------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
----------------------------------------------------------------------------
------------





"Ramachandran" <ramachandran@summitworks.com>
03/02/2004 05:30 PM
Please respond to "Struts Users Mailing List"


        To:     "Struts Users Mailing List" <struts-user@jakarta.apache.org>
        cc:
        Subject:        Regarding Client side Validations


Hi All,

         I am performing Cleint side validation in an Add Employee form.
Here if i click the cancel button it should goes to the previous page
which
list employees.

         Here on click of sumbit button, i am calling my java script. But
even when i am clicking the cancel button, it is asking me the validations
that i am performed. For example if i give the text field for no it asks
to
enter.

         But i want to goes to the list employees page with out performing
the validation by clicking the Cancel button.

Here I am Callin the Script:

<html:form action="AddEmployeeAction"
      name="EmployeeForm"
      type="com.summit.EmployeeForm" onsubmit="return FinalCheck();" >

<html:cancel/> button is also inside this form.

In My Action:

if ( isCancelled(request) ) {

      // Cancel pressed back to employee list
      return (mapping.findForward("cancelemp"));
    }

What i have to do for this one.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message