struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francisco Exposito Aguilera" <fcoexpos...@hotmail.com>
Subject Re: html:optionsCollection problem
Date Thu, 03 Aug 2006 07:47:05 GMT
Thanks a lot for you help!!!!! I've got it!!! At the end my problem was that 
the info didn't arrive to the session.
First I've checked if info came to the jsp with c:out and then I've use the 
html:select...




>From: Aiping <apkirsty@yahoo.com>
>Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
>To: Struts Users Mailing List <user@struts.apache.org>
>Subject: Re: html:optionsCollection problem
>Date: Tue, 1 Aug 2006 18:12:02 -0700 (PDT)
>
>Hi,
>
>   I also got the same problem, but this site offer some insights:
>
>   
>http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=58&t=008283
>
>Romu <romu31@gmail.com> wrote:
>
>
>
>
>
>
>where pays is the property of your form
>
>
>2006/8/1, Francisco Exposito Aguilera :
> >
> > I´ve added it into a but I obtain the
> > error
> >
> > Cannot create iterator for project.struts.General.Prueba@3fc47c
> >
> > I´ve modified some code because I want to obtain a select with all info 
>of
> > a
> > table which is placed in a database when the page is loaded; and this 
>page
> > only comes from a link, not from another page with an associated action
> > (therefore, nothing has been saved in session).
> >
> > public class Prueba implements Serializable
> > {
> > private Collection empresas=new ArrayList();
> > DTOEmpresa empresa = new DTOEmpresa();
> >
> > public Collection getEmpresas()
> > {
> > empresa.setNifEmpresa("A11111111");
> > empresas.add(empresa);
> > return(empresas);
> > }
> > public void setEmpresas(String empresa)
> > {
> > empresas.add(empresa);
> > }
> > }
> >
> >
> >
> >
> >
> >
> >
> > I don´t know if I have explained my issue as I should.
> >
> > Thanks a lot.
> >
> >
> >
> > >From: Monkeyden
> > >Reply-To: "Struts Users Mailing List"
> > >To: "Struts Users Mailing List"
> > >Subject: Re: html:optionsCollection problem
> > >Date: Tue, 1 Aug 2006 11:13:36 -0400
> > >
> > >Looks like it may not be wrapped in a tag in your JSP. You
> > >probably also want a field named "toSelect", with accessor and mutators
> > in
> > >your form bean, to hold the selected value.
> > >
> > >On 8/1/06, Francisco Exposito Aguilera wrote:
> > >>
> > >>Hi,
> > >>
> > >>I have a Bean:
> > >>
> > >>package project.struts.General;
> > >>import java.util.ArrayList;
> > >>import java.util.Collection;
> > >>import java.io.*;
> > >>
> > >>public class Prueba implements Serializable
> > >>{
> > >> private Collection empresas=new ArrayList();
> > >>
> > >> public Collection getEmpresas()
> > >> {
> > >> empresas.add("string1");
> > >> empresas.add("string2");
> > >> return(empresas);
> > >> }
> > >>}
> > >>
> > >>and a jsp where I write:
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>But it doesn't work. I receive the error
> > >>javax.servlet.ServletException: Cannot find bean under name
> > >>org.apache.struts.taglib.html.BEAN
> > >>
> > >>How can I solve this issue? Or what is the correct way to generate 
>this?
> > >>
> > >>Thanks in advance
> > >>
> > >>_________________________________________________________________
> > >>Un amor, una aventura, compañía para un viaje. Regístrate gratis en 
>MSN
> > >>Amor
> > >>& Amistad. http://match.msn.es/match/mt.cfm?pg=channel&tcid=162349
> > >>
> > >>
> > >>---------------------------------------------------------------------
> > >>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > >>For additional commands, e-mail: user-help@struts.apache.org
> > >>
> > >>
> >
> > _________________________________________________________________
> > Horóscopo, tarot, numerología... Escucha lo que te dicen los astros.
> > http://astrocentro.msn.es/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>
>AiPing
>
>"The greatest regrets in our lives are the risks we did not take.
>
>If you think something will make you, HAPPY, GO FOR IT.
>Remember that we pass this way only once."
>
>
>
>
>
>---------------------------------
>Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
>countries) for 2¢/min or less.

_________________________________________________________________
Descarga gratis la Barra de Herramientas de MSN 
http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message