Re: Help please -- How to provide a "Back" button?

2003-10-29 Thread ishmael riles

Another solution if you don't want to use javascript, is to rely on the
fact that the name and value atrributes of the submit button that was
pressed are passed through the http request. The values for the other
submit buttons aren't sent. So in your action you check for the existance
of each submit buttons name to figure out which button the user pushed.

So if you have the following submit buttons in your jsp file

 SAVE
 CANCEL

Then in your action you can do something like this:

 String saveAction = request.getParameter("save");
 String cancelAction = request.getParameter("cancel");

 if (saveAction != null) {
 doSave();
 } else if (cancelAction != null) {
 doCancel();
 }

On Wed, 29 Oct 2003 14:24:54 -0600, [EMAIL PROTECTED] said:
> for ur question 2:
> 
> you can use javascript function to call two different action:
> 
> function faddpurpose() {
> document.editform.methodtocall.value = "addpurpose";
> document.editform.forwardpage.value = "totalsuccess";
> document.editform.target="_self";
> document.editform.submit();
> }
> 
> function fcalculatepaypd() {
> document.editform.methodtocall.value = "calculatepaypd";
> document.editform.forwardpage.value = "totalsuccess";
> document.editform.target="_self";
> document.editform.submit();
> }
>  type="aaa.ers.struts.forms.RecordsForm">
> 
> so U can create a dispatch action and call two different action changing 
> value for methodtocall.If you are not using dispatch action then just set 
> your forms action to whatever action U want to go to..
> 
> 
> 
> 
> "ZYD" <[EMAIL PROTECTED]>
> 10/29/2003 01:18 AM
> Please respond to "Struts Users Mailing List"
> 
>  
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> cc: 
> Subject:Help please -- How to provide a "Back" button?
> 
> 
> Dear all,
> 
> Question 1:
> 
> How to provide a Back button on a page?
> 
> Is there a html tag like the one for Cancel button:  ?
> 
> Question 2:
> 
> How to provide two submit buttons on one JSP page,
> when click on the 1st button, the page is submitted to 1st action,
> when click on the 2nd button, it's submitted to 2nd action?
> 
> Any response will be appreciated.
> Thanks.
> 
> bruce
> 
 
 -o- -o- -o- -o- -o-
  ishmael.riles  
  brnr.tech
  510.543.6109
 -o- -o- -o- -o- -o-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



trouble with TLD in struts 1.1

2003-10-28 Thread Ishmael Riles

I'm upgrading an app from strtuts 1.0.2 to 1.1 and I keep getting the
following or similar errors on JSP pages that include TLD's

It seems like there's a miss match between the struts.jar and the *.tld
files, So I downloaded the files again and replaced them all. And of course
I moved all the *.tld files in to the /WEB-INF directory. I also deleted the
struts-legacy.jar just to be sure that wasn't getting loaded. But it still
doesn't work.

Does anyone have any ideas about what might be happening?

---ERROR MESSAGE---

 Parsing of JSP File '/index.jsp' failed:




 /index.jsp(3): Error in using tag library uri='/WEB-INF/struts-html.tld'
prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag' has no
setter method corresponding to TLD declared attribute 'server', (JSP 1.1
spec, 5.4.1)
probably occurred due to an error in /index.jsp line 3:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>




Tue Oct 28 18:10:33 PST 2003



my jsp page-

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>



...


Thanks, Ishmael



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]