Looking for How-to on self-populating bean from Oracle table
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kiana_Zimmerman
Posted On:   Thursday, February 12, 2004 02:05 PM

Can someone give me a web address or something? I am trying to create a javabean to hold a list of agency names and ids from an Oracle table. I then want to use the bean to fill a select on a web page. How do I create a "bunch" of beans to represent all the table records? I want to replace the following with a reference to javabean that contains all the database records for a listing of state agencies. EnterInfo.jsp Department or Agency: <%= fltReqInfo.getDepName().equals(ag_num) ? "selected":"" %> value="<%= ag_num%>"><%= ag_name%> AgencyInfo.java    More>>

Can someone give me a web address or something? I am trying to create a javabean to hold a list of agency names and ids from an Oracle table. I then want to use the bean to fill a select on a web page.


How do I create a "bunch" of beans to represent all the table records?


I want to replace the following with a reference to javabean that contains all the database records for a listing of state agencies.


EnterInfo.jsp

			

Department or Agency:





AgencyInfo.java

package us.wy.state.dot.aero.beans;

public class AgencyInfo
{
// Properties
private int agency_numid;
private String agency_charid;
private String agency_name;

public AgencyInfo()
{
this.agency_numid = 0;
this.agency_charid = "";
this.agency_name = "";
}

public int getAgency_numid()
{
return this.agency_numid;
}

public void setAgency_numid(int newAgency_numid)
{
this.agency_numid = newAgency_numid;
}

public String getAgency_charid()
{
return this.agency_charid;
}

public void setAgency_charid(String newAgency_charid)
{
this.agency_charid = newAgency_charid;
}

public String getAgency_name()
{
return this.agency_name;
}

public void setAgency_name(String newAgency_name)
{
this.agency_name = newAgency_name;
}
}

   <<Less
About | Sitemap | Contact