struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michael <mich...@michaelmcgrady.com>
Subject Referencing Forms from Dual Actions
Date Tue, 29 Jun 2004 09:21:18 GMT
I have some code where an action is called in an <html:form> and in an 
<html:image> as a value for the src attribute of the <html:image> 
tag.  Also, I have extended the ImageTag class or <html:image> to mine some 
other values regarding the image, color, font, etc., because I intend to 
use the action which is the value of the src attribute to build the button 
on the fly to match whatever the name of the Button is, e.g. 
"Submit.gif".  My only question is:

Is there any reason why the action which gets the image as the value of the 
src attribute cannot access the values of the form needed to build the 
button if it does not already exist?

Thanks!  The code will look something like the following:

<html:form
   name="buttonForm"
   type="com.crackwillow.struts.form.CrackWillowButtonForm"
   method="get"
   action='/logOn.do'>

   <input type="text" name="firstName" value=""> FIRST NAME<BR>
   <input type="text" name="lastName" value="">LAST NAME<BR>
   <input type="text" name="email" value="">EMAIL<BR>

   <crackwillow:image property="button.submit" align="left" color="000000"
       font="Broadway" size="16" button="true" 
src="resource.do?file_type=gif&file_name=SUBMIT.gif"/><BR>
   <crackwillow:image property="button.clear" align="left" color="000000"
       font="Broadway" size="16" button="true" 
src="resource.do?file_type=gif&file_name=CLEAR.gif"/><BR>
   <crackwillow:image property="button.cancel" align="left" color="000000"
       font="Broadway" size="16" button="true" 
src="resource.do?file_type=gif&file_name=CANCEL.gif"/><BR>
   <crackwillow:image property="button.reset" align="left" color="000000"
       font="Broadway" size="16" button="true" 
src="resource.do?file_type=gif&file_name=RESET.gif"/>

</html:form>

So, I want the resource.do action class to mine the buttonFrom action 
form.  One thing is for sure, the logON.do action must precede the 
resource.do action, because it creates the text the browser uses to call 
the second action.  Seems like it should work fine to me.  It involves 
enough work that I thought I would run it by you chiefs and indians 
first.  Thanks for any pointers.

Michael



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


Mime
View raw message