You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul McCulloch <pa...@axiossystems.com> on 2004/07/28 19:56:57 UTC

RE: Re: Re: Re: Why does work differently than ?

Michael,

The approach you outline is fine when buttons are an option. 

But what about when a hyperlink is neccessary (for whatever reason - be it
to conserve screen space or customer requirements). Is it possible to use
CSS to make a button look like a hyperlink (I have very limited CSS myself)?

cheers,

Paul

> -----Original Message-----
> From: Michael McGrady [mailto:mike@michaelmcgrady.com]
> Sent: 28 July 2004 18:43
> To: Struts Users Mailing List
> Subject: Re: Re: Re: Re: Why does <html:submit> work differently than
> <html:link action="">?
> 
> 
> At 10:16 AM 7/28/2004, you wrote:
> >i'm a Struts newbie.  and while playing around with this situation i
> >wasn't seeing my values getting populated in my actionform.  
> i figured
> >it had to do with the way i set up my Struts tags, <html:link>, and
> >their parameters.
> >so in the Struts world, is there a way to submit a form using a
> >hyperlink without using javascript?
> >
> >i know this comes down to poor design and basic web application
> >functionality.  so i apologize that this has been drawn out.
> >thank you all for being patient and helpful.
> 
> 
> No problem, Andy.  This is easily solved without links and without 
> javascript.  And, this comes up so often that I have provided 
> a standard 
> solution in the Struts wiki.  The solution is at 
> http://wiki.apache.org/struts/StrutsCatalogMultipleImageButton
sWithNoJavaScript. 
Notice the title?  ///;-)

The solution I actually use is a lot more sophisticated than the one shown 
on the wiki pages.  Mine also generates and caches the buttons as gifs, 
pnms, pngs,  or jpegs or  in 14 languages with various fonts, sizes, 
colors, textures, etc.  But your problem, if you have the button, is really 
easy to solve.  You can, for example, have three Operation classes in the 
fields of your Button class representing the three choices.  Then, in your 
Action class you have:

if([ActionForm].getButton().getFirstChoice().pressed()) {
   // do whatever
} else if ([ActionForm].getButton().getSecondChoice().pressed()) {
   // do whatever
} else if([ActionForm].getButton().getSecondChoice().pressed()) {
   // do whatever
} else {
   // throw exceptions galore
}

If you have any questions about this, please ask away.

Michael




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


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code.  You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused.
**********************************************************************


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


RE: Re: Re: Re: Why does work differently than ?

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
At 10:56 AM 7/28/2004, you wrote:
>Is it possible to use
>CSS to make a button look like a hyperlink (I have very limited CSS myself)?

Heck, Paul, you can use the struts tag to make the button "look like a 
hyperlink".  There is nothing special about this.  Check out the Struts 
HTML image tag which extends the Struts HTML submit tag. The key is that 
there is a separation between the name of the button and the source of the 
button.  You can have the same name with multiple sources creating the 
standard hyperlink look.

Michael




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