You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anthony Xin Chen <xi...@tbcommerce.com> on 2001/07/30 19:39:43 UTC

Newbie questions

Hello there,

I  am  new  to  Struts and I have a couple of questions after studying
user guides and example.

1)  Is  it  possible  to  assigne  more than one form bean to the same
action mapping?

If it is not possible, is it possible to map one form bean to multiple
html forms on on web page.

Any example avaiable?
  
2) I am also looking for example on how to use Javascript with Struts.

Thanks in advance.


-- 
Best regards, Anthony



Re: Newbie questions

Posted by Ted Husted <hu...@apache.org>.
Anthony Xin Chen wrote:
> 1)  Is  it  possible  to  assigne  more than one form bean to the same
> action mapping?

No. As it stands, perform() takes a single ActionForm in its signature.

> If it is not possible, is it possible to map one form bean to multiple
> html forms on web page.

Yes. They would either use the same Action path, or different mappings
could all specify the same ActionForm. 

> 2) I am also looking for example on how to use Javascript with Struts.

In what sense? The html tags expose all the Javascript event handlers.
Otherwise, it's the same as using Javascript with any JSP or HTML file.
See also 

< http://husted.com/about/struts/FAQ/view-js.htm >

-Ted.