Date: 2004-08-10T22:05:14 Editor: MichaelMcGrady <[EMAIL PROTECTED]> Wiki: Apache Struts Wiki Page: StrutsCatalogMultipleImageButtonsWithNoJavaScript URL: http://wiki.apache.org/struts/StrutsCatalogMultipleImageButtonsWithNoJavaScript
no comment Change Log: ------------------------------------------------------------------------------ @@ -25,13 +25,44 @@ I use this with the following simple logic in a processing class called by my Action class. You can do whatever you like to use the results of the !ButtonCommand class. You don't, of course, have to have a Struts solution to use this. +Assume that you have code like: + +{{{ +<input type='image' name='submit'> +}}} + +Or: + +{{{ +<html:image property='submit'/> +}}} + +or whatever else you may have going on. Actually I automatically generate and cache buttons of the right size, color, background, etc. on the fly in 15 languages as follows: + +{{{ +<crackwillow:image + button='HOSTS.gif' + mapBean='host_container' + bgClr='ffffff' + txtClrCode='banMddlBgClr' + font='Eurostile' + italic='false' + bold='true' + size='20' + property='hostsOptions'/> +}}} + +The point is that the preceding solution is not tied to other decisions but merely to utilizing what we need to get the job done with <input type='image>. We use the class as follows. + {{{ if ("submit".equals(ButtonCommand.getCommand(request))) { // do whatever } -}}} +}}} + +This solution is very, very simple and very, very effective. I think it is the best out there. -Most importantly, there is very, very little overhead either in footprint or in calculations with this solution. A vastly inferior, but more typical solution follows. +Most importantly, there is very, very little overhead either in footprint or in calculations with this solution. A vastly inferior, I think, but more typical solution follows. SOLUTION TWO: THE TYPICAL BUT INFERIOR SOLUTION TYPE. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]