I saw a thread talking about how to find out which
'input' image was clicked by doing the following in
your Action class:

String image1 = request.getParameter("imgName1.x");
if ( image1!=null ) {
  // then this image was clicked!

I would like this info to be available from my
ActionForm via something like:

if ( myFormInstance.getImgName() ) {
  // then this image was clicked!

The '.x' (or '.y') seem to present a problem to
whatever reflection/bean-type stuff goes on inside
Struts -> i.e. Struts can't find an appropriate method
to call when presented with the field name
'imgName.x'.

I've tried several method names like 
'setImgName_X()', 'setImgName()', etc.  Am I doing
something stupid?  Is there a way I can get around
this using a BeanInfo class for my ActionForm?

I've also thought about writing a 'HTTP request
parameter preprocessor' to hack-off the '.x' and '.y'
from any parameter that has them (all done before my
action class is passed the HttpRequest object, of
course).  Bad idea?

Thanks much!

--Peter--




__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to