>At first sight, u miss the name of the collection in "
><html:optionsCollection property="aBean" value="code"
>label="descr"/>"
Do you mean i have to specify the attribute name="aBean"instead of
property="aBean" ?

>second u forgot the dot in myBeanCode , it's myBean.code , Struts will
do myBean.getCode().
myBeanCode is only a name for the current bean in the select tag

>third : your form property "aBean" is an array & u use a select ( which
a single property)
Do you mean i have to specify the attribute name="aBean"instead of
property="aBean" ?

Thanks for your attention



2007/4/11, Marcello Savino <[EMAIL PROTECTED]>:
>
> Please excuse me but i try again ... (hope will never die)
>
> Hi all, i've the following problem using the tag 
> <html:optionsCollection, the jsp give the following error:
> org.apache.jasper.JasperException: No bean specified
>
> Let's say this is my code (actionForm, jsp, bean class)
>
> public class MyForm extends ActionForm {
>         private myBean[] arrayOfMyBean;
>         public void reset(ActionMapping mapping, HttpServletRequest 
> request){
>                 arrayOfMyBean=someClass.getMyBeanArray();
>                 request.setAttribute("aBean", arrayOfMyBean);
>                 super.reset( mapping,  request);
>         }
>         public myBean[] getABean(return arrayOfMyBean); // i forgot 
> this on my previous post, not on my code!
> }
> ______________________________________________________
>
> The jsp:
>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <html:xhtml

> /> <html:html locale="true"> <body> <html:form action="/MyAction">
>         <html:select property="myBeanCode" >
>                 <html:optionsCollection property="aBean" value="code"
> label="descr"/>
>         </html:select>
> </html:form>
> </body>
> </html:html>
> ________________________________________________________
>
> myBean Class:
>
> public class myBean implements java.io.Serializable{
>         private Integer code;
>         private String descr;
>
>         public Integer getCode(){return code;}
>         public String getDescr(){return descr;}
>
>         public void setCode(Integer val){ code=val;}
>         public void setDescr(String val){ descr=val;} }
>
> _________________________________________________________
>
>
> Could anyone help me?
> Any help will be greatly appreciated.
> Thanks in advance
> Marcello
>
> ---------------------------------------------------------------------
> 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