struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Park, Dongwon" <Dongwon.P...@Nextel.com>
Subject RE: [Q] Using html:image tag for submit button
Date Mon, 01 Apr 2002 16:15:52 GMT
Thanks, John.

I found when it is not working for me.

If we use the following one, it is working as submit button.
<html:image page="/images/btn_continue.gif"/>

When we need to pass some value, we need to add more like this.
<html:submit property="action" value="Next" onclick="this.action=Next"/>
When it submitted, it called setAction() method in Form class.

This is <html:image> version.
<html:image page="/images/btn_continue.gif" property="action" value="Next"
onclick="this.action=Next"/>
When it submitted, struts "called" getAction() method in Form class. 

It seems like a bug. I am using Struts 1.0.2 with Tiles.

Regards,

Dongwon Park


 
-----Original Message-----
From: John Kroubalkian [mailto:John@Kroubalkian.com]
Sent: Saturday, March 30, 2002 10:11 PM
To: Struts Users Mailing List
Subject: Re: [Q] Using html:image tag for submit button


Dongwon,

There are at least a couple of ways to do this in Struts.  Here are two:

Ex 1: To pull the image from a url relative to the base url
<html:form action="/someAction.do" method="POST">
  User Name: <html:text property="username" size="15" />
   <p>
  <html:image page="/images/submit_button.gif" />
</html:form>

Ex 1: To pull the image path a key
[my.submit.button=/myapp/images/submit_button.gif]in the
ApplicationResources.properties:
<html:form action="/someAction.do" method="POST">
  User Name: <html:text property="username" size="15" />
   <p>
  <html:image srcKey="my.submit.button" />
</html:form>

Regards,
John

----- Original Message -----
From: "Park, Dongwon" <Dongwon.Park@Nextel.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, March 29, 2002 3:06 PM
Subject: [Q] Using html:image tag for submit button


> All,
>
> I am trying to use <html:image> for submit button but it is not working
for
> me.
> Anybody has some simple example or know better way to make submit button
> with image ?
>
> Dongwon Park
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


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

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


Mime
View raw message