🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #426

Re: amigos del foro saludos, MI PROBLEMA ES CON JSPs + beans + menus HTML

#426
From: GRUPOS DE JAVA
Date: Fri, 07 Sep 2007 01:14
36 lines
2419 bytes
OK, RESOLVI EL PROBLEMA, AQUI ESTA MI SOLUCION, NO ES LA MEJOR NI
BONITA, PERO ME SALIO LO QUE QUERIA:

EN EL BEAN:
.......
    public Vector getDEPARTAMENTOS() throws SQLException {
     try {
        Dep = MovEnBD.consultar("SELECT idDepto, nombre FROM
Departamento");
        while(Dep.next()) {
           String Val = "";
           Val = "<option VALUE =\""+Dep.getString("idDepto")+
                        "\">"+Dep.getString("idDepto")+" "+"\""+
                        Dep.getString("nombre")+"\""+"</option>";
           lista.add(Val);
        }
     }
     catch (SQLException exp) {
        System.out.println("Error en consulta de tabla vacia SQL: "
                           +exp.toString());
     }
     catch (Exception e) {
        System.out.println("Excepcion en consulta de tabla vacia de
BD: "
                           +e.toString());
     }
     return lista;
    }
.......

EN EL JSP:
   <PRE>  Selecciona el Departamento del que es responsable:
        <select name="DEPA" size="3" multiple>
           <jsp:getProperty name="ARD" property="LISTA" />
        </select>
   </PRE>
Technical Details
Message-ID: <1189127696.711184.268390@d55g2000hsg.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!d55g2000hsg.googlegroups.com!not-for-mail
References: <1189047182.619045.47340@g4g2000hsf.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1116f3,341d8999bba6d4af
X-Google-Attributes: gid1116f3,public,usenet
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!d55g2000hsg.googlegroups.com!not-for-mail
From:  GRUPOS DE JAVA <omm1979@gmail.com>
Newsgroups: es.comp.lenguajes.java
Subject: Re: amigos del foro saludos, MI PROBLEMA ES CON JSPs + beans + menus HTML
Date: Fri, 07 Sep 2007 01:14:56 -0000
Organization: http://groups.google.com
Lines: 37
Message-ID: <1189127696.711184.268390@d55g2000hsg.googlegroups.com>
References: <1189047182.619045.47340@g4g2000hsf.googlegroups.com>
NNTP-Posting-Host: 189.131.92.227
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1189127696 19053 127.0.0.1 (7 Sep 2007 01:14:56 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 7 Sep 2007 01:14:56 +0000 (UTC)
In-Reply-To: <1189047182.619045.47340@g4g2000hsf.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: d55g2000hsg.googlegroups.com; posting-host=189.131.92.227;
   posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0