Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JSP Interest »

Re: populating list boxes

vtr

2003-10-09

Replies:

I have a similar requirement too.

Choose the product -> then the corresponding assembly ->
Component ->process -> etc.,
At present i have used a file which i include everytime with a parameter
this file just gives a select box

some what like this

String prod=request.getParameter("prod");
String asem=request.getParameter("asem");
String comp=request.getParameter("comp");

if (prod==null)
{
%>
<%@(protected)" %>
<%
}
else
{
if (asem==null)
  {
  %>
  <%@(protected)" %>
  <%
  }
  else
  {
  ..............
  }
}

************
The chooseProd.jsp
has a simple code somewhat like

<select name=prod>
<%
String sql="select prod,des from .....";
rs=stmt......;
while(rs.next())
{%>
<option value=<%=rs.getString("prod")%>><%=rs.getString("des")%>
<%}
%>
</select>


V.T.R.Ravi Kumar, Engg.(CCX), BHEL Phone Office +91 1334285260 Mobile +91
1353114861

Woolsey-Swanson Rule:
People would rather live with a problem they cannot solve rather than
accept a solution they cannot understand.

----- Original Message -----
From: "Raju BSN" <satyanarayanarb@(protected)>
To: <JSP-INTEREST@(protected)>
Sent: Thursday, October 09, 2003 7:13 PM
Subject: populating list boxes


> Hi,
> I have a problem like this the fields i used is co-related with each
other..
>
Country->Year->University->Region->Center->Qualification->Industry->Course->
Subject->Student
> first i will authenticate the user after that i will populate all the
university names in the select box, after selecting the country, i again
connect to DB and retrieve all the fields of the year, like that it goes
on... till student.
> What will be the best solution?
>
> Thanks in Advance
>
> Regards
> Raju
>
>
>
>
===========================================================================
> To unsubscribe: mailto listserv@(protected)
JSP-INTEREST".
> For digest: mailto listserv@(protected)
DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
> http://java.sun.com/products/jsp
> http://archives.java.sun.com/jsp-interest.html
> http://forums.java.sun.com
> http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com


©2008 junlu.com - Jax Systems, LLC, U.S.A.