Great!  Thanks for the help.

John

-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 4:07 PM
To: Struts Users Mailing List
Subject: RE: html taglib usage


John,

The name="" attribute works with many of the text fields.  Forget using
html:form, just type those in the old fashion tag way.  Then, for most of
your tags, at the name="..." attribute so the bean by that name will be
obtained from scope (should check request then session automatically) and
pull the property you listed.  The docs show it should work on 1.2.4+ for
html:select, html:options, and html:optionsCollection but NOT html:button.
See the Struts site's User Guide for the HTML Tags,
http://struts.apache.org/userGuide/dev_html.html, section "HTML Taglib API
Reference."  Various fields show a name=".." attribute for using other
beans, which should include POJOs since it just needs the bean name and a
property to retrieve.  I've used it for form beans saved in Session scope
from inside other forms and from OUTSIDE a form.  I think it will work with
POJO's since there should be no struts-specific calls, just that
name.property lookup.

Regards,
David

-----Original Message-----
From: Thorhauer, John (Contractor) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 4:02 PM
To: 'Struts Users Mailing List'
Subject: RE: html taglib usage


Yes.  I am trying to use the html taglib.  Here is a sample of what I am
trying to do.  The form is stored in the session with a name of
"PreferencesForm":

---------------------------------------------------
<html:form name="PreferencesForm"
           type="com.tool.manager.DCMTPreferencesForm"
           method="Post"
           action="ActionPage.jsp">

    <html:select
     property="selectedColumns"
     multiple="true"
     size="5">
       <html:options name="selectedColumns"/>
    </html:select>

    <br/>

    <html:button property="ProcessNewParameters" value="Set New
Parameters"/>

</html:form>
----------------------------------------------

So it sounds like you are saying that this _should_ work?  NOTE:  I am not
extending the ActionForm bean.  It is just a POJO bean.

Thanks,
John

-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 3:51 PM
To: Struts Users Mailing List
Subject: RE: html taglib usage


John,

Which tags are you using?  Have you added the name="..." attribute so it can
lookup a bean in any scope by that name instead of trying to use an
ActionForm bean?

Regards,
David

-----Original Message-----
From: Thorhauer, John (Contractor) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 26, 2005 3:02 PM
To: 'user@struts.apache.org'
Subject: html taglib usage


Hi,

Is it possible to use the struts html taglib from version 1.1 without using
Struts?  I would like to use it in conjunction with my own beans that I am
using but can not use all of struts at this point.  So I would like to
simply put a bean into the session and then make it available to the form
and use the struts html taglib to match the bean values to the form.
However, when I try this I get the following error on my JSP page:

javax.servlet.jsp.JspException: Cannot find ActionMappings or
ActionFormBeans collection

Any ideas if this is possible and if so what I am doing wrong?

Thanks,
John



---------------------------------------------------------------------
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]



---------------------------------------------------------------------
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]



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

Reply via email to