I have dine something similar that works. I configure an action in the
struts config file that defines the formbean to use. Then the onclick
method of the link uses javascript to fill in the form and then calls
document.getElementById("myForm").submit() ;

The form bean arrives filled and ready to the correct action....

Fotis

-----Original Message-----
From: Woodchuck [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 03, 2005 9:16 PM
To: Struts Users Mailing List; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Html:link with DynaActionForm

hihi,

clicking on links (even on a page with a form) does *not* submit the
form at all.  do not confuse this with the common <input type='submit'>
or using javascript to submit forms via document.forms[0].submit().

when you click on a link such as 
<a href="http://www.mywebsite.com/myAction.do";>Click this link!</a>
no extra information is submitted to that Action even if there's an
associated ActionForm.

if you want to populate the ActionForm associated to the Action that is
to be 'triggered' from a link you can use query string parameters.  not
very elegant but it works, and not recommended if you have a lot of
info to populate.  using this method your final renedered link should
look something like this:

<a
href="http://www.mywebsite.com/myAction.do?personId='12345'&firstName='J
ohn'&lastName='Smith'">Click
this link!</a>

how you create this link is another matter but when you click the above
link an attempt to populate personId, firstName, lastName values into
the corresponding ActionForm for myAction will be made (using the
JavaBean convention).

hth,
woodchuck


--- Amol Yadwadkar <[EMAIL PROTECTED]> wrote:

> Hi List,
> 
> I have a form where all the action are provided by link.
> 
> I am using DynaActionform so when I click on html:link .... I do not
> get
> the Dynaform populated for the next page
> 
> But
> 
> If I use use html:submit then it happens as expected.
> 
>  
> 
> Can any one have solution for the above issue.
> 
> Thankx
> 
> best regds, 
> AMOL 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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




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

Reply via email to