Hello Martin

Thanks for your help,

I found out the code for ImageButtonDispatchAction and it would be useful for me.

Regards,
Shashank S. Dixit
Associate Software Consultant.
Datamatics Ltd. 
SDF-1, SEEPZ, 
Andheri,Mumbai


  ----- Original Message ----- 
  From: Martin Naskovski 
  To: Shashank Dixit 
  Cc: Struts Users Mailing List 
  Sent: Thursday, July 24, 2003 12:51 PM
  Subject: Re: Need Help : DispatchAction and <html:image> without javascript.


  Shashank,

  look for ImageButtonDispatchAction.java in the archives of
  'struts-user'. The image buttons get submitted as property.x and
  property.y.

  Even if you didn't use the above named file that one of struts' users
  created, you can easily extend the DispatchAction (look at the
  source code for Struts on how to do this properly) to look through the
  HTTP ParameterMap, and look for parameters named *.x or *.y, either
  using regex or just parse them using the java tokenizer. You only need
  to find one, either .x or .y, to confirm a button push on the form.
  ImageButtonDispatchAction (already existing in the archives) already
  does this, except through the ActionMapping in struts-config.xml you
  specify what the button names on the form are in the 'parameter'
  attribute. Doing that, cuts down the time it'll take you to look
  through the HTTP parameter map.

  Hope this helps.
  Martin

  Wednesday, July 23, 2003, 11:59:23 PM, you wrote:

  SD> Hello All,

  SD> I request you to suggest solution for the following problem.

  SD> I want to use LookupDispatchAction or DispatchAction class so that the framework 
can call my action class methods when user preses any button in the JSP page. If I use 
<html:submit> buttons the
  SD> value (which is equal to method name) with it gets submitted and used to call 
appropriate method in the action class. I am using <html:image> for buttons. The 
problem with it is the value for
  SD> these buttons doesn't get submitted and framework cannot understand the method 
name. Does that mean if I use <html:image> then I cannot use DispatchAction or 
LookupDispatchAction Class. Or If I
  SD> want to use these classes then I cannot use graphical buttons? can anybody tell 
me how can I use these classes with <html:image> ?

  SD> The main thing is, We don't want to use any peace of javascript code.

  SD> Thanks in advance.


  SD> Shashank S. Dixit
  SD> Associate Software Consultant.
  SD> Datamatics Ltd. 
  SD> SDF-1, SEEPZ, 
  SD> Andheri,Mumbai




  -- 


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to