Display records in JSP

I am completely stuck at this point and need urgent help.
here is what i have done till now:
i have one jsp page called first.jsp which displays records in RowsetBrowser from View Object A.
The attributes are ID,name,Location.
in View Object A i have added a transient attribute to which i have given an expression
as: ''| |ID| |'', i want to make the id as a link to the edit page,
i do not want an additional column to show up as link,hence i am not using addTextUrlColumn method.
now on clicking on this id,edit.jsp page is called and the parameter p which is the id is passed to
edit.jsp page.
The edit.jsp page is based on another View Object B.
the code is as follows:
String param=request.getParameter("p");
oracle.jbo.html.databeans.RowsetNavigator rsn;
rsn=(oracle.jbo.html.databeans.RowsetNavigator) new oracle.jbo.html.databeans.RowsetNavigator();
rsn.initialize(application,session,request,response,out,"NTS_NTS_NTSModule.LogPanelView");
rsn.getRowSet().getViewObject().setWhereClause("ncc_log_id="+param);
rsn.getRowSet().getViewObject().executeQuery();
The results of above query is only one record,which is right.
my job is now to display all the attributes of the above record,in text fields or
combo boxes.

Hi Monali,
If I understand your attribute Number1 (and Number 2) is one string value (varchar2 type, long type etc. in Entity) which include in self more different values (other strings or numbers). Right? You can do this if you parse string with an method which analyse that string and give you all the values in an array. Then you can display all the values just like you display other attributes. Off course between the values within attributes value must exist an sign (;, |, ^ etc.) which separate one value from another.
Format is:
SignValue(1)SignValue(2)SignValue(3)SignSignValue(maxData)Sign
(e. g.)
Format 1:
|Ad45gt63e4|34f5t55B4|3d563H6a2|5G67sE3h7||d45fgh5|
First sign (|) in the string is separator between the values
Format 2:
;Friday;September 07;2001;Baker Street 21b;LONDON;Europe;;JSP;12345678;EJB;
First sign (;) in the string is separator between the values
I write one demo application (Parse) which you can see in listing 1: Parse.java (see below). Maybe isnt the best solution for this problem but working :-)(compile and run from java console)
In your case code maybe look like in listing 2: BrowserBean.java (see below)
I hope this help you...
Veso
Note: Sample code in listing 2 I write from my head (without testing), so maybe has errors.
Parse.java
public class Parse {
public static String CheckValue(String strValue){
int strEnd;
char strSign = strValue.charAt(0);
strEnd = strValue.indexOf(strSign,1);
strValue = strValue.substring(1, strEnd);
return strValue;
public static void main(String[] args) {
final int maxData = 100;
int sAllValues;
String sEmpty = "";
String[] sAllValuesNumber1 = new String[maxData];
String sValueNumber1 = ";Friday;September 07;2001;Baker Street 21b;LONDON;Europe;";
try {
sAllValues = 0;
while (sValueNumber1 != null && !sValueNumber1.equalsIgnoreCase(sEmpty) && !sValueNumber1.equalsIgnoreCase(sValueNumber1.substring(0,1))) {
sAllValues++;
sAllValuesNumber1[sAllValues-1] = CheckValue(sValueNumber1);
System.out.println(sAllValuesNumber1[sAllValues-1] + "\n");
sValueNumber1 = sValueNumber1.substring(sAllValuesNumber1[sAllValues-1].length() + 1);
} catch(Exception ex) {
throw new RuntimeException(ex.getMessage());
BrowserBean.java
package demobeans;
import java.io.PrintWriter;
import java.io.OutputStream;
import oracle.jbo.*;
import oracle.jbo.html.databeans.*;
public class BrowserBean extends oracle.jdeveloper.html.DataWebBeanImpl {
public static String CheckValue(String strValue){
int strEnd;
char strSign = strValue.charAt(0);
strEnd = strValue.indexOf(strSign,1);
strValue = strValue.substring(1, strEnd);
return strValue;
public void render() throws Exception {
final int maxData = 100; // number of values for attributes (Number1 or Number2)
int sAllValues1;
int sAllValues2;
String sData = null;
String sEmpty = "";
String sQuery = request.getParameter("id");
String sValueID = null; // if is ID column1 in ViewObject
String sValueName = null; // if is name column2 in ViewObject
String sValueNumber1 = null; // if is name column3 in ViewObject
String sValueNumber2 = null; // if is name column4 in ViewObject
String[] sAllValuesNumber1 = new String[maxValues];
String[] sAllValuesNumber2 = new String[maxValues];
Row[] drows = qView.getAllRowsInRange();
AttributeDef[] dattrs = getDisplayAttributeDefs();
for (int rowno = 0; rowno < drows.length; rowno++) {
for (int j = 0; j < dattrs.length; j++) {
if (!shouldDisplayAttribute(dattrs[j]))
continue;
if (drows[rowno] != null) {
Object attrObj = drows[rowno].getAttribute(dattrs[j].getIndex());
if (attrObj != null) {
sValue = attrObj.toString();
switch (dattrs[j].getIndex()) {
case 0 : sValueID = sValue; break;
case 1 : sValueName = sValue; break;
case 2 : sValueNumber1 = sValue; break;
case 3 : sValueNumber2 = sValue; break;
sAllValues1 = 0;
while (sValueNumber1 != null && !sValueNumber1.equalsIgnoreCase(sEmpty) && !sValueNumb er1.equalsIgnoreCase(sValueNumber1.substring(0,1))) {
sAllValues1++;
sAllValuesNumber1[sAllValues1-1] = CheckValue(sValueNumber1); // put values from Number1 in an array
sValueNumber1 = sValueNumber1.substring(sAllValuesNumber1[sAllValues1-1].length() + 1);
sAllValues2 = 0;
while (sValueNumber2 != null && !sValueNumber2.equalsIgnoreCase(sEmpty) && !sValueNumber2.equalsIgnoreCase(sValueNumber2.substring(0,1))) {
sAllValues2++;
sAllValuesNumber2[sAllValues2-1] = CheckValue(sValueNumber2);
sValueNumber2 = sValueNumber2.substring(sAllValuesNumber2[sAllValues2-1].length() + 1);
sData = "<!-- html -->Name:" + sValueName + "<!-- html code (table tags or other) -->";
sData += "<!-- html -->Number1[1]:" + sAllValuesNumber1[0] + " Number1[2]:" + sAllValuesNumber1[1] + ... + " Number2[sAllValues1]:" + sAllValuesNumber1[sAllValues1-1] + "<!-- html code (table tags or other) -->";
sData += "<!-- html -->Number2[1]:" + sAllValuesNumber2[0] + " Number2[2]:" + sAllValuesNumber2[1] + ... + " Number2[sAllValues2]:" + sAllValuesNumber2[sAllValues2-1] + "<!-- html code (table tags or other) -->";
out.print("Other HTML code...") // other elements for your look and feel
out.print(sData);
out.print("Other HTML code...") // other elements for your look and feel
releaseApplicationResources();
null

Similar Messages

  • How to display records in jsp

    i have 100 records can anybody tell me how i display records 10 at atime in jsp & by clicking the next button another 10 records displays in the same jsp. How i can do that thing.

    You have to implement a page breake yourself.
    Simple scenario would be to store a page number into a session:
    session.setAttribute("page", selectedPage)
    every time user clicks on a next page link
    When displaying the record read the page and display only those which should be on the page
    Integer selectedPage = session.getAttribute("page")
    if (selectedPage == null) selectedPage = 1;
    //display code goes here

  • Jsp, servlet & bean: trying to display records in a jsp

    Hello i'm trying to display records from my MYSQL database into particular fields allready designed in a jsp. Via servlets and beans i want the records in a jsp.
    I can get the resultset of the record, but can't get the resultset in de fields of the jsp.
    Here are my files:
    SERVLET
    package ...;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class Zoekklantactie extends HttpServlet {
         ZoekklantBean ZoekklantBean = new ZoekklantBean();
         ZoekklantactieBean ZoekklantactieBean = new ZoekklantactieBean();
         DbBean db = new DbBean();
         public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
              verwerk(request, response);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
         verwerk(request, response);
    public void verwerk(HttpServletRequest request, HttpServletResponse response) throws IOException {
         response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              String hachternaam = request.getParameter("hachternaam");
              String zoekklantnieuw = "SELECT hachternaam FROM klantgegevens WHERE hachternaam = ";
              String zoekklantnieuw2 = zoekklantnieuw + " '"+hachternaam+"' ";
              ResultSet rs = null;
                   //     out.println("debug 1<br>");
         /*     try {
                   //     Statement s;
                        db.connect();
                   //     s = db.getS();
                        rs = db.execSQL("SELECT hachternaam FROM klantgegevens WHERE hachternaam = 'Opgelder'");
                   //          out.println(rs.getString(1)+"hoi");
                        while (rs.next()) {
                   //                retrieve and print the values for the current row
                   //          out.println("debug1a --> "+rs.toString()+"<br>");
                             String str = rs.getString(1);
                   //          out.println("ROW = " + str );
                        } catch (SQLException e) {
                   //                TODO Auto-generated catch block
                   //          out.println("debug2 <br>"+e.toString());
                             e.printStackTrace();
                        } catch (ClassNotFoundException e) {
                   //                TODO Auto-generated catch block
                   //          out.println("debug3 <br>");
                             e.printStackTrace();
         /* ResultSet rs = null;
         out.println("debug 1<br>");
              try {
                   //     Statement s;
                   db.connect();
                   //     s = db.getS();
                   rs = db.execSQL("select * from klantgegevens where hachternaam = 'Opgelder'");
                   //          out.println(rs.getString(1)+"hoi");
                   while (rs.next()) {
                        rs.first();
                   //           retrieve and print the values for the current row
                        out.println("debug1a<br>");
                        String str = rs.getString(1);
                        System.out.println("ROW = " + str );
                   rs = (ResultSet) db.execSQL(zoekklantnieuw2);
                   out.print(rs.getString("hwoonplaats"));
                   out.print(zoekklantnieuw2);
              } catch (SQLException e) {
                   //                TODO Auto-generated catch block
                   out.println("debug2 <br>"+e.toString());
                   e.printStackTrace();
              } catch (ClassNotFoundException e) {
                   //                TODO Auto-generated catch block
                   out.println("debug3 <br>");
                   e.printStackTrace();
              if( hachternaam == "" ){
                   request.setAttribute("jesper",ZoekklantBean);
                   //          Get dispatcher with a relative URL
                   RequestDispatcher dis = request.getRequestDispatcher("Zoekklant.jsp");
                   //           include
                   try {
                        dis.include(request, response);
                   } catch (ServletException e) {
                        e.printStackTrace();
                   } catch (IOException e) {
                        e.printStackTrace();
                   //          or forward
                   try {
                        dis.forward(request, response);
                   } catch (ServletException e) {
                        e.printStackTrace();
                   } catch (IOException e) {
                        e.printStackTrace();
              else{
                   try {
                   //     Statement s;
                        db.connect();
                   //     s = db.getS();
                        rs = db.execSQL(zoekklantnieuw2.toString());
                   //          out.println(rs.getString(1)+"hoi");
                        while (rs.next()) {
                   //           retrieve and print the values for the current row
                   //          out.println("debug1a --> "+rs.toString()+"<br>");
                             String str = rs.getString(1);
                   //          out.println("ROW = " + str );
                   //          out.print(rs);
                        } catch (SQLException e) {
                   //                TODO Auto-generated catch block
                   //          out.println("debug2 <br>"+e.toString());
                             e.printStackTrace();
                        } catch (ClassNotFoundException e) {
                   //                TODO Auto-generated catch block
                   //          out.println("debug3 <br>");
                             e.printStackTrace();
                   request.setAttribute("jesper",ZoekklantactieBean);
                   //          Get dispatcher with a relative URL
                   RequestDispatcher dis = request.getRequestDispatcher("Zoekresultaatklant.jsp");
                   //          include
                   try {
                        dis.include(request, response);
                        } catch (ServletException e) {
                        e.printStackTrace();
                        } catch (IOException e) {
                        e.printStackTrace();
                   //          or forward
                   try {
                        dis.forward(request, response);
                        } catch (ServletException e) {
                        e.printStackTrace();
                        } catch (IOException e) {
                        e.printStackTrace();
    BEAN
    package ...;
    public class ZoekklantactieBean {
         private String hachternaam;
         private String hvoorletters;
         private String hgeslachtMan;
         private String hgeslachtVrouw;
         private String hgeboortePlaats;
         private String hgeboorteDatum;
         private String hnationaliteit;
         private String hsofinummer;
         private String hadres;
         private String hwoonplaats;
         private String hpostcode;
         private String htelefoonnummerPrive;
         private String htelefoonnummerMobiel;
         private String htelefoonnummerWerk;
         private String hemail;
         private String hburgelijkeStaat;
         private String hallimentatie;
         private String hrestduurAllimentatie;
         private Boolean hbetreftOversluiting;
         private String pachternaam;
         private String pvoorletters;
         private String pgeslachtMan;
         private String pgeslachtVrouw;
         private String pgeboortePlaats;
         private String pgeboorteDatum;
         private String pnationaliteit;
         private String psofinummer;
         private String padres;
         private String pwoonplaats;
         private String ppostcode;
         private String ptelefoonnummerPrive;
         private String ptelefoonnummerMobiel;
         private String ptelefoonnummerWerk;
         private String pemail;
         private String pburgelijkeStaat;
         private String pallimentatie;
         private String prestduurAllimentatie;
         private Boolean poversluiting;
         public void setHachternaam( String name )
         hachternaam = name;
         public String getHachternaam()
         return hachternaam;
         public void setHvoorletters( String name )
         hvoorletters = name;
         public String getHvoorletters()
         return hvoorletters;
         public void setHgeslachtMan( String gender )
         hgeslachtMan = gender;
         public String getHgeslachtMan()
         return hgeslachtMan;
         public void setHgeslachtVrouw( String gender )
         hgeslachtVrouw = gender;
         public String getHgeslachtVrouw()
         return hgeslachtVrouw;
         public void setHgeboortePlaats( String name )
         hgeboortePlaats = name;
         public String getHgeboortePlaats()
         return hgeboortePlaats;
         public void setHgeboorteDatum( String date )
         hgeboorteDatum = date;
         public String getHgeboorteDatum()
         return hgeboorteDatum;
         public void setHnationaliteit( String name )
         hnationaliteit = name;
         public String getHnationaliteit()
         return hnationaliteit;
         public void setHsofinummer( String number )
         hsofinummer = number;
         public String getHsofinummer()
         return hsofinummer;
         public void setHadres( String name )
         hadres = name;
         public String getHadres()
         return hadres;
         public void setHwoonplaats( String name )
         hwoonplaats = name;
         public String getHwoonplaats()
         return hwoonplaats;
         public void setHpostcode( String name )
         hpostcode = name;
         public String getHpostcode()
         return hpostcode;
         public void setHtelefoonnummerPrive( String number )
         htelefoonnummerPrive = number;
         public String getHtelefoonnummerPrive()
         return htelefoonnummerPrive;
         public void setHtelefoonnummerMobiel( String number )
         htelefoonnummerMobiel = number;
         public String getHtelefoonnummerMobiel()
         return htelefoonnummerMobiel;
         public void setHtelefoonnummerWerk( String number )
         htelefoonnummerWerk = number;
         public String getHtelefoonnummerWerk()
         return htelefoonnummerWerk;
         public void setHemail( String adress )
         hemail = adress;
         public String getHemail()
         return hemail;
         public void setHburgelijkeStaat( String name )
         hburgelijkeStaat = name;
         public String getHburgelijkeStaat()
         return hburgelijkeStaat;
         public void setHallimentatie( String number )
         hallimentatie = number;
         public String getHallimentatie()
         return hallimentatie;
         public void setHrestduurAllimentatie( String number )
         hrestduurAllimentatie = number;
         public String getHrestduurAllimentatie()
         return hrestduurAllimentatie;
         public void setHbetreftOversluiting( Boolean choise )
         hbetreftOversluiting = choise;
         public Boolean getHbetreftOversluiting()
         return hbetreftOversluiting;
         public void setPachternaam( String name )
         pachternaam = name;
         public String getPachternaam()
         return pachternaam;
         public void setPvoorletters( String name )
         pvoorletters = name;
         public String getPvoorletters()
         return pvoorletters;
         public void setPgeslachtMan( String gender )
         pgeslachtMan = gender;
         public String getPgeslachtMan()
         return pgeslachtMan;
         public void setPgeslachtVrouw( String gender )
         pgeslachtVrouw = gender;
         public String getPgeslachtVrouw()
         return pgeslachtVrouw;
         public void setPgeboortePlaats( String name )
         pgeboortePlaats = name;
         public String getPgeboortePlaats()
         return pgeboortePlaats;
         public void setPgeboorteDatum( String date )
         pgeboorteDatum = date;
         public String getPgeboorteDatum()
         return pgeboorteDatum;
         public void setPnationaliteit( String name )
         pnationaliteit = name;
         public String getPnationaliteit()
         return pnationaliteit;
         public void setPsofinummer( String number )
         psofinummer = number;
         public String getPsofinummer()
         return psofinummer;
         public void setPadres( String name )
         padres = name;
         public String getPadres()
         return padres;
         public void setPwoonplaats( String name )
         pwoonplaats = name;
         public String getPwoonplaats()
         return pwoonplaats;
         public void setPpostcode( String name )
         ppostcode = name;
         public String getPpostcode()
         return ppostcode;
         public void setPtelefoonnummerPrive( String number )
         ptelefoonnummerPrive = number;
         public String getPtelefoonnummerPrive()
         return ptelefoonnummerPrive;
         public void setPtelefoonnummerMobiel( String number )
         ptelefoonnummerMobiel = number;
         public String getPtelefoonnummerMobiel()
         return ptelefoonnummerMobiel;
         public void setPtelefoonnummerWerk( String number )
         ptelefoonnummerWerk = number;
         public String getPtelefoonnummerWerk()
         return ptelefoonnummerWerk;
         public void setPemail( String adress )
         pemail = adress;
         public String getPemail()
         return pemail;
         public void setPburgelijkeStaat( String name )
         pburgelijkeStaat = name;
         public String getPburgelijkeStaat()
         return pburgelijkeStaat;
         public void setPallimentatie( String number )
         pallimentatie = number;
         public String getPallimentatie()
         return pallimentatie;
         public void setPrestduurAllimentatie( String number )
         prestduurAllimentatie = number;
         public String getPrestduurAllimentatie()
         return prestduurAllimentatie;
         public void setPoversluiting( Boolean choise )
         poversluiting = choise;
         public Boolean getPoversluiting()
              return poversluiting;
    JSP
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="ErrorPage.jsp" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <jsp:useBean id = "db" scope = "request" class = "jesper.DbBean" />
    <jsp:useBean id = "ZoekklantactieBean" scope = "request" class = "jesper.ZoekklantactieBean" />
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Klantinvoer</title>
    <style type="text/css">
    <!--
    .style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
    .style3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; }
    -->
    </style></head>
    <body>
    <form id="Zoekklantactie" name="Zoekklantactie" method="post" action="Zoekklantactie">
    <table width="71%" height="447" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="20%"><span class="style1">Zoek klant </span></td>
    <td width="20%"><select name="select">
    <option>H. Patat</option>
    <option>B. Opgelder</option>
    <option>Y. de Koning</option>
    </select> </td>
    <td width="8%"> </td>
    <td width="18%"> </td>
    <td width="20%"> </td>
    <td width="14%"> </td>
    </tr>
    <tr>
    <td><span class="style3">Hoofdaanvrager</span></td>
    <td> </td>
    <td> </td>
    <td><span class="style3">Partner</span></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Naam</span></td>
    <td><input type="text" name="hachternaam" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hachternaam" />"/></td>
    <td> </td>
    <td><span class="style1">Naam</span></td>
    <td><input type="text" name="pachternaam" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="pachternaam" />"/></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Voorletters</span></td>
    <td><input type="text" name="hvoorletters" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hvoorletters" />"/></td>
    <td> </td>
    <td><span class="style1">Voorletters</span></td>
    <td><input type="text" name="pvoorletters" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="pvoorletters" />"/></td>
    <td> </td>
    </tr>
         <tr>
    <td><span class="style1">Geslacht</span></td>
    <td><span class="style1">
    <label>
    <input name="hgeslachtMan" type="radio" value="<jsp:getProperty name ="ZoekklantactieBean" property ="hgeslachtMan"/>Man" />
    Man
    <input name="hgeslachtMan" type="radio" value="<jsp:getProperty name ="ZoekklantactieBean" property ="hgeslachtVrouw"/>Vrouw" />
    Vrouw </label>
    </span></td>
    <td><span class="style1"></span></td>
    <td><span class="style1">Geslacht</span></td>
    <td><span class="style1">
    <label>
    <input name="pgeslachtMan" type="radio" value="<jsp:getProperty name ="ZoekklantactieBean" property ="pgeslachtMan" />Man" />
              Man
              <input name="pgeslachtMan" type="radio" value="<jsp:getProperty name ="ZoekklantactieBean" property ="pgeslachtVrouw" />Vrouw" />
              Vrouw </label></span></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Geboortedatum</span></td>
    <td><input type="text" name="hgeboorteDatum" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hgeboorteDatum" />"/></td>
    <td> </td>
    <td><span class="style1">Geboortedatum</span></td>
    <td><input type="text" name="pgeboorteDatum" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="pgeboorteDatum" />"/></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Geboorteplaats</span></td>
    <td><input type="text" name="hgeboortePlaats" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hgeboortePlaats" />"/></td>
    <td> </td>
    <td><span class="style1">Geboorteplaats
    </span></td>
    <td><span class="style1">
    <input type="text" name="pgeboortePlaats" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="pgeboortePlaats" />"/>
    </span></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Nationaliteit</span></td>
    <td><input type="text" name="hnationaliteit" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hnationaliteit" />"/></td>
    <td> </td>
    <td><span class="style1">Nationaliteit</span></td>
    <td><input type="text" name="pnationaliteit" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="pnationaliteit" />"/></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Sofinummer</span></td>
    <td><input type="text" name="hsofinummer" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hsofinummer" />"/></td>
    <td> </td>
    <td><span class="style1">Sofinummer</span></td>
    <td><input type="text" name="psofinummer" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="psofinummer" />"/></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Postcode</span></td>
    <td><input type="text" name="hpostcode" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hpostcode" />"/></td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Adres</span></td>
    <td><input type="text" name="hadres" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hadres" />"/></td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Woonplaats</span></td>
    <td><input type="text" name="hwoonplaats" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hwoonplaats" />"/></td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Telefoon prive</span></td>
    <td><span class="style1">
    <input type="text" name="htelefoonnummerPrive" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="htelefoonnummerPrive" />"/></span></td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Telefoon mobiel </span></td>
    <td><span class="style1">
    <input type="text" name="htelefoonnummerMobiel" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="htelefoonnummerMobiel" />"/></span></td>
    <td> </td>
    <td><span class="style1">Telefoon mobiel</span></td>
    <td><span class="style1">
    <input type="text" name="ptelefoonnummerMobiel" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="ptelefoonnummerMobiel" />"/></span></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Telefoon werk </span></td>
    <td><span class="style1">
    <input type="text" name="htelefoonnummerWerk" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="htelefoonnummerWerk" />"/></span></td>
    <td> </td>
    <td><span class="style1">Telefoon werk</span></td>
    <td><span class="style1">
    <input type="text" name="ptelefoonnummerWerk" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="ptelefoonnummerWerk" />"/></span></td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">E-mail</span></td>
    <td><input type="text" name="hemail" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hemail" />"/></td>
    <td> </td>
    <td><span class="style1">E-mail</span></td>
    <td><input type="text" name="pemail" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="pemail" />"/></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Burgelijke staat </span></td>
    <td><select name="hburgelijkeStaat" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hburgelijkeStaat" />">
    <option selected="selected">gehuwd</option>
    <option>ongehuwd</option>
    <option>gescheiden</option>
    </select> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Allimentatie</span></td>
    <td><input type="text" name="hallimentatie" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hallimentatie" />"/></td>
    <td> </td>
    <td><span class="style1">Allimentatie</span></td>
    <td><input type="text" name="pallimentatie" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="pallimentatie" />"/></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Restduur allimentatie </span></td>
    <td><input type="text" name="hrestduurAllimentatie" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hrestduurAllimentatie" />"/></td>
    <td> </td>
    <td><span class="style1">Restduur allimentatie </span></td>
    <td><input type="text" name="prestduurAllimentatie" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="prestduurAllimentatie" />"/></td>
    <td> </td>
    </tr>
    <tr>
    <td><span class="style1">Betreft een oversluiting? </span></td>
    <td><input type="checkbox" name="hbetreftOversluiting" value ="<jsp:getProperty name ="ZoekklantactieBean" property ="hbetreftOversluiting" />Betreft oversluiting" /></td>
    <td> </td>
    </tr>
    </table>
    </form>
    <form name="Terug" method="post" action="Menu.jsp"><input name="Terug" type="submit" value="Terug naar hoofdmenu" /></form>
    </body>
    </html>
    Package everywhere the same.
    Have commented some of the code, because i was trying to debug, but just couldn't figure it out.
    Tnx in advance.
    gr. bopgelder

    put your bean in a different package from servlet and include this
    package in your servlet like
    import yourbeanpackage.yourbean
    and then create object of bean and use it

  • Reg dynamically displaying records from database into a jsp page

    I am working in a project which is using struts and hibernate.In a class I gave code for retrieving data from a table and I put it in a list.
    List retrieveList;
    public List getRetrieveList() {
    String SQL_QUERY ="from student s";
    Query query = session.createQuery(SQL_QUERY);
    retrieveList = query.list();
    return retrieveList;
    public void setRetrieveList(List retrieveList) {
    this.retrieveList = retrieveList;
    And this list value I want to be displayed in a jsp page.What I have given is :
    <jsp:useBean id="records" class="StudentImpl" scope="session" />
    <bean:define id="list" name="records" property="retrieveList" />
    <table align="center" bordercolor="black" cellpadding="10" cellspacing="10">
    <logic:iterate id="data" name="list" type="pojo.student" indexId="index">
    <tr>
    <td><html:multibox property="checked" value=""></html:multibox></td>
    <td><bean:write name="data" property="studentname" /></td>
    <td><bean:write name="data" property="age" /></td>
    </tr>
    </logic:iterate>
    </table>
    When I run my jsp page its showing an error
    org.apache.jasper.JasperException: [Ljava.lang.Object; cannot be cast to pojo.Student
    can anyone resolve this problem?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    ya i got through criteria query.
    Transaction tx = session.beginTransaction();
              try{
                   Criteria query = session.createCriteria(Student.class);
                   list = (ArrayList)query.list();
                   tx.commit();
                   setRetrieveList(list);
                   session.close();
              catch(Exception e){
                   System.out.println(e);
              }

  • JSP, DataWebBean: How to dynamically set the where clause of query and display record

    Hi,
    I am reposting this question as per suggestions made by Mr. Dwight.
    I have used ViewCurrentRecord web bean to display records from EMP table. I have to use the Dept_Id_FK from the current
    record of the EMP table to display corresponding records of Dept table. I have a view object called DeptView in my Business
    Components which selects all the records from the Dept table.
    How do I get the value of Dept_Id_FK and use it to display the required records of the Dept table?
    I tried to declare a variable and get the value of Dept_Id_FK but it did not work. My code is as follows:
    <%! String m_DeptId = null; %>
    <jsp:useBean id="RowViewer" class="oracle.jbo.html.databeans.ViewCurrentRecord" scope="request">
    <%
    RowViewer.initialize(pageContext, "EMPApp_EMP_EMPAppModule.EMPView1");
    RowViewer.setReleaseApplicationResources(false);
    RowViewer.getRowSet().next();
    m_DeptId = (String)RowViewer.getRowSet().getCurrentRow().getAttribute("DeptIdFk");
    %>
    </jsp:useBean>
    Thanks.
    null

    First of all, Thank you very much for making use of the new topic format. It is very much appreciated.
    As for your question, I think there are several different ways to accomplish what I think you want to do.
    1. Create a view object that includes both Emp and Dept entities and join them there. In this case, your query would look something like this:
    Select e.empno,e.name,...,d.dname,d.loc from emp e, dept d
    where e.deptno = d.deptno
    You should be able to create a JSP off of this view object that contains both the employee and department information. In this case, BC4J takes care of the foreign key to primary key coordination.
    2. In order to set a dynamic where clause for a view, you need to do the following in your usebean tag:
    rsn.initialize(application,session, request,response,out,"DeptView");
    rsn.getRowSet().getViewObject().setWhereClause("deptno=" &#0124; &#0124; m_DeptId);
    rsn.getRowSet().getViewObject().executeQuery();
    rsn.getRowSet().first();
    You will need to do this in a separate usebean tag from the EmpView, since the usebean can only initialize one view object.
    In other words, you would have your ViewCurrentRecord bean tag for the EmpView, then a separate one for the DeptView where you use the above code to set the where clause to display just the information for the department you want.
    Another option, but one I'm not sure would work as well, is to create a master-detail JSP to do this for you. Usually a master-detail is a one-to-many (one department to many employees). Your request appears to be the reverse, but might still be doable using the same mechanism.
    You set up relationships between views in your BC4J project using View Links. If you used the BC4J project wizard and created default views, some of these links may have been created for you. They are created when BC4J detects a foreign key to primary key relationship in the database.
    You can create your own View Links using the View Link wizard. Select your BC4J project node and choose Create View Link... from the context menu. You will be asked to select a source view (Emp), and a target view (Dept), then select the attribute in each view that related the two of them (deptno).
    Next, you need to reflect this new relationship setting in your application module. Select your app module and choose Edit from the context menu. On the data model page, select the EmpView node in the Selected list. Now select the DeptView node in the available list and shuttle it over. You should see DeptView1 via yourlink appear indented under the EmpView node. Save and rebuild your BC4J project to reflect the changes.
    In your JSP project, you can now have the wizard create a master-detail form for you based on DeptView1.
    Let me know if the above answers your question, or if I have misunderstood what it is you wanted to do.
    null

  • Display records along with checkbox

    im trying to do the following
    get the records from database and display in jsp along with a checkbox for each record
    ive done the database retrival and displayed in the jsp page as a tables.
    but ive tried to create checkboxes for each record rows and at the end ive to send the hidden variable as the checkbox value . how could i do this.

    Hi,
    While creating the checkbox u have to write variables in the checkbox's value atrribute.
    When ur submiting the form u can also pass these check box variable values.
    <input type=checkbox value = <%= value %> name=chk>Reagrds
    Madhu

  • Display image in JSP Portlet

    I create a JSP portlet. But The portlet can't display image(gif file, jpg file). I have modified the provider.xml and the following line is added:
    <imageURL>URL_Path</imageURL>
    But, the image still cannot be displayed.
    How can I display image in JSP portlet?

    Leo Cheung,
    You could try the following :
    1. Add a virtual directory path Alias 'imgf' in the Apache configuration file httpd.conf to load the image file. Add the following line under the alias section :
    Alias /imgf/ "<your directory>\images/"
    2. Place your gif/jpg files (eg., work.gif) in the images directory.
    3. Use the IMG tag of HTML :
    <IMG src="/imgf/work.gif" border=0 width=80 height=80> in the JSP file at the location where you need to display the image.
    Hope this helps
    Pushkala

  • Filter on a Report to display  records only  from last 12 months

    Hi Folks,
    I have a requirement where I have to display Records for last 12 months. Following is the Filter that I am using
    Opportunity."Close Date" >= TIMESTAMPADD(SQL_TSI_MONTH, 0, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE)) AND Opportunity."Close Date" <= TIMESTAMPADD(SQL_TSI_MONTH, 12, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)), CURRENT_DATE))
    But this is showing me records for next 12 months.
    How can I solve this Issue??
    Thanks and Regards,
    Amit Koul

    Dinesh,
    The filter that you suggested works for last 365days, if you try to create a simple report with just Date field in it, you will come to know the difference.
    Using the filter suggested by you it will show me records from 27th Jan 2008 since today the date is 27th Jan 2009.
    I want it to filter records for last 12 months including Jan 2009.(so the interval comes to be Feb 2008 to Jan 2009)
    Hope I made sense!!
    Thanks and Regards,
    Amit koul
    Edited by: Amit Koul on Jan 27, 2009 7:27 PM

  • How can I display records quickly in order, using set_block_property

    Hi all,
    I want to display records in order when I click on button corresponding to that filed.I'm getting result by using set_block_property..but it is displaying records slowly,if number of records are more then it's taking more time to sort the records.
    I have written the following code in when-button-pressed trigger:
    begin
    if get_block_property('block_name',default_where) = 'column_name ASC' then
    set_block_property('block_name', default_where,'column_name DESC');
    else
    set_block_property('block_name',default_where, 'column_name ASC');
    end if;
    end;
    How can I get the result quickly can anyone please give me an idea to solve this.
    Thanks in advance.

    Hi user;
    I want to display records in order when I click on button corresponding to that filed.I'm getting result by using set_block_property..but it is displaying records slowly,if number of records are more then it's taking more time to sort the records.
    I have written the following code in when-button-pressed trigger:
    begin
    if get_block_property('block_name',default_where) = 'column_name ASC' then
    set_block_property('block_name', default_where,'column_name DESC');
    else
    set_block_property('block_name',default_where, 'column_name ASC');
    end if;
    end;
    How can I get the result quickly can anyone please give me an idea to solve this.Did you try to use index for related column? Also did you try to use order_by instead of default_where
    If its not help, I also suggest post your issue on :Forum Home » Developer Tools » Forms
    Hope it helps
    Regard
    Helios

  • Display records according month

    hi all.
    i want to display records according months.
    i created view something like this.
    create or replace view month_timer (item1, amount,item_date) as
    select item1,sum(amount),item_date
    from table
    where trunc(item_date) between to_date('01-jan-2010') and trunc(sysdate)
    AND item_TYPE!=4
    group by item1,item_date
    ORDER BY item_dateany suggestions?
    sarah

    create or replace view month_timer (item1, amount,item_date) as here in this statement you are using item1 and only tree columns.
    select pcd_plt_id,pcd_cbr_id ,sum(amount),item_date And here in this statement there are four columns. So which column is for item1
    group by item1,item_dateHere you can use only selected columns in group by. But you are using item1 which you used above for view.
    And in select there are three columns without aggregate function. And you are using only two here.
    If you could post the table data and desired output. Then it will be easier to find better way.
    -Ammad

  • I'm looking for a display recorder app for my iPod touch, is there one available on the App Store?

    Hi,
    I've been wanting to make videos and tutorials on how to use some of Apple's apps, and also some games on my iPod touch (5th gen), and I've seen loads of videos taken from iOS within an app. I don't want to jailbreak my iPod, so that means that the display recorder by Cydia is off the list. Are there any screen recorders for iPod that have unlimited filming, and will let me access filmed videos so I can post them to YouTube?
    Thanks!
    SnappingScroll2

    Use Reflector:
    http://www.airsquirrels.com/reflector/
    to display the iPod on your computer's screen. You can then use screen capture software to make a recording of your actions. No need to jailbreak.
    Regards.

  • How to display records into a non table base block..

    Hi,
    Can anybody help me how to display records into a non table base block....
    Find below is my coding but it only display the last record in the first line
    in the block.
    PROCEDURE CREATE_CARTON_QUESTION IS
    CURSOR car_c IS
    select /*+ rule */ question_id, question_description
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
    v_found VARCHAR2(10);
    v_status boolean;
    v_error      varchar2(150);
    v_count number;
    car_r car_c%rowtype;
    begin
    begin
    select count(*) into v_count
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
         exception
         when no_data_found then
         v_count := 0;
    end;
    if v_count > 0 then
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id     := car_r.question_id;
    :la_carton.carton_question_answer     := 'N';
    :la_carton.carton_error_details     := null;
    :la_carton.attribute2          := car_r.question_description;
    end loop;
    end if;
    end;
    Thanks in advance.
    Regards,
    Jun

    Hi SNatapov,
    Thanks for you reply but still I get this error...
    FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
    Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
    Find below is the code....
    begin
    go_block('la_carton');
    first_record;
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id := car_r.question_id;
    :la_carton.carton_question_answer := 'N';
    :la_carton.carton_error_details := null;
    :la_carton.attribute2 := car_r.question_description;
    next_record;
    end loop;
    end;
    Hoping you can help me this problem...
    Thanks in advance.
    Regards,
    Jun

  • Junk characters like" � � "displayed in the jsp page please help.

    Hi,
    I am getting junk characters like � � displayed in the jsp page.
    In the JSP page i used javascript "& nbsp" for appending spaces to a string "CCR" to get "CCR " .
    Now the Resultant string "CCR " has three spaces appended to its right.
    This String is set in session in that JSP page.
    In the next JSP page i am getting that string from session.
    After getting the string the "substring" function is performed to get only the first 5 charcters of the string. Now the result is displayed as " CCR� � " with has last 2 characters as junk values � � insteed of displaying as "CCR ". Please help me in solving this issue.
    Please note that initially the sting "CCR" is got from the Oracle database in Solaris Machine.
    Regards,
    Vijay

    have you tried:
    strenuously inspecting the string that is coming from the db? do an actual loop over the string, character by character, dumping to System.out to make sure the characters are EXACT coming out of the db.
    note you have to append " " not just "& nbsp"
    post the code that is doing the output. the relevant bean code, the jsp, everything relevant - WITH COMMENTS discussing where things are happening.
    Also, is it "weird characters" in the browser only? have you done a view source on the actual html source that the browser is rendering (right click in IE and click view source). browsers can act odd if you don't feed then exactly what they want, and it looks like you're feeding it escaped characters that it is rendering as something else.

  • Getting present display records  or Row Id's information in ALV grid?

    Hi,
    I am using REUSE_ALV_GRID_DISPLAY for ALV display.
    I need to get the row id's when user filter the records with any conditions  - or any other ways if he selected particular records - I need to process my logic only for those present displaying records in ALV grid.
    So How do I can get preset display records in ALV grid or Present display records row id's ?
    Please let me know .
    And also I  am using 
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_repid = i_repid
          e_grid  = lt_grid
    In lt_grid there is a table MT_ROID  this table is having selected row id's information but I could not read this table. I think this will work only OO ABAP and also method - get_selected_rows is also not working.
    I highly appreciate your answers.
    Thanks
    Kevin

    Hallo,
    Any ideas?
    Thanks.

  • Problem in displaying records in multi record block

    Hi all,
    I have a problem in displaying records in a multi record block in a form.
    I have 1 control block and 1 data block(multi-record block).
    Control block has one item CUSTOMER-ID. Data block has many other items related to customer.
    when a value is entered in customer-id text item, all the relavant details should be displayed in the data block.
    but, the records are overlapping in the same line in the data block, actually they have to be displayed one record per one line.
    The code is,
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    END LOOP;
    Please help me out..
    Thanks in advance!
    Suman

    Hi Suman
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    first_record;
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    next_record;
    END LOOP;
    Try this. you are trying to show all the records in same line. so its overlapping.
    Thankyou
    [email protected]

Maybe you are looking for

  • Usb devices no longer work - after itunes 8 uninstall as well.

    Have uninstalled itunes 8 as outlined in various posts on internet. However, now none of my devices such as camera and printer are recognized by my computer. Hope someone has solved this problem. Thanks.

  • How to create custom(or) user defined component in SAPTAO

    Hi,    Please provide me some document or steps on how to create custom component in sap tao. Thanks a lot in advance. Regards, Sudha

  • Pdf reads in black and white

    When I download an attachment fro my client and try to view or downlad in apple mail the images on the layout are in black and white. When I pull the pdf up through say Gmail images are fine but once downloaded to Mac are saved as black and white

  • Excel 2003 Macros do not Work After Updates

    After a number of updates, Microsoft Office 2003 can not run macros. The Microsoft updates are  KB2956107, KB890830, KB2956106, and KB2984939. Installed on the machines is the compatibility pack for Office 2007. Most of the updates were applied to th

  • Quicktime conversion to Windows media player

    Hi Does anyone know if there is a way to convert quicktime to windows media player. I need to run both files on a web site. I am on a macintosh so let me know if there is a way