tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <paul.ma...@sdc-dsc.gc.ca>
Subject RE: Submit Button
Date Tue, 07 Sep 2004 14:47:58 GMT
Using struts here, but I didn't think it would make a difference...

Here's our jsp:
              <html:submit property="buttonEdit" value="Edit" />
              <html:submit property="buttonDelete" value="Delete" />
              <html:submit property="buttonQAResource" value="QA Resource" />
              <html:submit property="buttonPreview" value="Preview" />


Here's the action class that is forwarded upon submit:
  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest
request, HttpServletResponse response) throws IOException, ServletException
  {
    if(request.getParameter("buttonEdit")!=null)
    {
    }
    else if(request.getParameter("buttonDelete")!=null)
    {
    }
    else if(request.getParameter("buttonQAResource")!=null)
    {
    }
    else if(request.getParameter("buttonPreview")!=null)
    {
    }
    return mapping.findForward("success");
  }


-----Original Message-----
From: David Schwartz [mailto:ds@arrayone.com] 
Sent: 2004-09-07 10:32 AM
To: Tag Libraries Users List
Subject: Re: Submit Button


Looking for JSTL - not Struts.

Quoting "Michael G. McGrady" <michael@michaelmcgrady.com>:

>> Karl Coleman wrote:
>>
>> >I believe the name of the button is passed in the request under the name
>> Submit.
>> >
>> >page.jsp?Submit=<name of your button>
>> >
>> >Karl
>> >
>>
>> Oh, if this is all you wanted to know, and not how to use images, blah,
>> blah, then you can use <html:submit> and the property attribute will
>> pass along the value to the ActionForm.  I assumed you wanted to know
>> more than this, since this is just how the submit tag works and I
>> assumed you looked at that.
>>
>> Michael
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

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


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


Mime
View raw message