How to display items from database using catagorylookupdroplet

Hi everyone,
i want to know how to display items from database using catagorylookup droplet. if anybody have any code snippet please share it.
Thanks in advance,

<dsp:droplet name=".................../CategoryLookup">
     <dsp:param name="id" param="itemId"/>
     <dsp:oparam name="output">
          <dsp:valueof param="element.displayName"/>
               <%-- This is show the Child Category --%>
               <dsp:droplet name="......................./ForEach">
               <dsp:param name="array" param="element.childCategories"/>
               <dsp:oparam name="outputStart">Child Categories</dsp:oparam>
               <dsp:oparam name="output">
                    <dsp:a href="">//bydefault it will take its own file's name
                         <dsp:param name="itemId" param="element.repositoryId"/>                                                                                          <dsp:valueof param="element.displayName"/>
                    </dsp:a>
               </dsp:oparam>                                             
               </dsp:droplet>
               <%-- This is show the Child Product --%>          
               <dsp:droplet name=".............../ForEach">
                    <dsp:param name="array" param="element.childProducts"/>
                    <dsp:oparam name="outputStart">Child Products</dsp:oparam>
                              <dsp:oparam name="output">
                                   <dsp:droplet name="................/ProductLookup">
                                        <dsp:param name="id" param="itemId"/>
                                        <dsp:param name="elementName" value="Prod"/>
                                        <dsp:oparam name="output">
                                             <dsp:getvalueof id="img102" param="Prod.smallImage.url" idtype="java.lang.String">
                                                  <dsp:img height="250" width="250" src="<%=img102%>"/>
                                             </dsp:getvalueof>
                                        </dsp:oparam>
                                   </dsp:droplet>
                                   <dsp:a href="productView.jsp">
                                        <dsp:param name="itemId" param="element.repositoryId"/>
                                        <dsp:valueof param="element.displayName"/>
                                   </dsp:a>
Hope this helps.
-RMishra

Similar Messages

  • How to display information from database using drop down list in JSP?

    Hi all.
    Like the tile above suggest, I'm having difficulty in obtaining the data as well as displaying them in a drop down list.
    For example: If i were to have the following in my database:
    SerialNo Food
    1 Bread
    2 Milk
    3 Butter
    The drop down list should look like the following:
    [Bread][\/]
    [Milk]
    [Butter]
    How do i go around coding it in JSP?
    Thanks in advance.
    C.K

    Hai Please try the following code
    You have to make some changes according to your system i am using
    MSSqlserver Driver change the class name and the connection string
    for your need
    <HTML>
    <HEAD>
    <%@ page language="java" import="java.sql.*"%>
    <LINK href="../theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>ListDrop.jsp</TITLE>
    <%!Connection con;
         %>
    </HEAD>
    <BODY>
    <select>
         <%
              try {
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");\\Here you specify the Class Nale
                   con = DriverManager
                             .getConnection(
                                       "jdbc:microsoft:sqlserver://javaserver:1433;DatabaseName=karthi",
                                       "sa", "sa");\\here Connection string
                   ResultSet rs;
                   Statement st = con.createStatement();
                   rs = st.executeQuery("select SerialNo,Food from Foods");
                   while (rs.next()) {
    %>
         <option value='<%= rs.getString("SerialNo") %>'><%= rs.getString("Food")%></option>
         <%
              } catch (Exception e) {
                   e.printStackTrace();
    %>
    </select>
    </BODY>
    </HTML>

  • How to display data from Database individually??? Anyone can help ?

    HI,
    i i had select a row of data from database using ,
    /* Query * From Table RESOURCEORDER where po = selected no and project = selected project */
         public ResultSet getAllData() throws SQLException
         getConnection();
         Statement stmt = conn.createStatement();
         ResultSet rs = stmt.executeQuery("SELECT * FROM RESOURCEORDER WHERE PROJECT = '" + getSelProject() + "' and PURCHASEORDERNO = '" + getPo() + "'" );
         return rs;
    After that , how do i display the data individually ?
    Eg select data is ('projectA','7891203-1', '10-4-2005','lcd',2000,'121-45217-8','electrical','pending','donwong')
    i want to display them individually, like this in a page
    Projectname: /* should display the Project A*/
    P.O no:
    Date:
    Order:
    Cost:
    Acc no:
    Type:
    status:
    Orderedby:
    Can anyone help ? cos i'm new to JSP ......Thanks alot!!!!!
    Regards,
    khim

    I assume PO being a unique key, will always return 1 row from db.
    public String[] getAllData() throws Exception
    getConnection();
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM RESOURCEORDER WHERE PROJECT = '" + getSelProject() + "' and PURCHASEORDERNO = '" + getPo() + "'" );
    String [] returnValue = new String[9];
    while(rs.next())
    returnValue[1] = rs.getString("colname");
    returnValue[2] = rs.getString("colname");
    ///and so on
    return returnValue;
    }Once you get that you could individually view it by setting a loop to run through the returned array.
    Hope it helps

  • How to fetch data from Database using SUP MBOs

    I'm learning to develop blackberry apps using SUP.I am new to both blackberry api and SUP.
    I need to make a login page for a Student and then validate the username and password entered using data from a database.
    I need to check the database for the username and password entered. What should be my next step? How do i get this data from the database. Using findAll() method is not working . Do i need to connect to SCC or unwired server first. If yes , then someone please provide a sample code for it.

    Hi!, I see your code and I see that you have a fee errors, try to use this:
    import java.text.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.OutputStream;
    * NOTE: You must put the try-catch and your sql code into the get method
    /** Servlet program to take fetchdata from database and display that on the broswer*/
    public class Fetchdata
        extends HttpServlet {
      String query = new String();
      String uid = "ashvini";
      String pwd = "******";
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws
          ServletException, Exception {
        try {
          Connection con = null;
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          String url = "jdbc:odbc:Testing";
          con = DriverManager.getConnection(url, uid, pwd);
          Statement s = con.createStatement();
          query = "select * from gowri.msllst1";
          ResultSet rs = s.executeQuery(query);
          response.setContentType("text/html");
          ServletOutputStream out = response.getOutputStream();
          out.println("<HTML>" + "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                      "<H1 ALIGN=CENTER>" + title + "</H1>\n" +
                      "<table>" + " <th>ITEM Code</th>");
          while (rs.next()) {
            out.println("<tr><td>" + rs.getString(1).trim() + "</td></tr>");//I change </tr></td> for </td></tr>
          } //end of while
          out.println("</table></BODY></HTML>");
        catch (Exception e) {
          System.out.println(e);
      } //end of doGet method
    }I hope this help you :)

  • Help , How to get data from database using recordset with UI API

    I want to get a data from database
    when I want to create recordset i notice that UI API didn't has record set
    so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
    ======================================================
    Dim oCompanyUI As SAPbouiCOM.Company <<UI API
    Dim oRecSet As New SAPbobsCOM.Recordset << DI API
    Dim oCompanyDI As New SAPbobsCOM.Company << DI API
    '=====================================================
    oCompanyDI.Connect
    Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
    oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
    SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
    ======================================================
    but I got an error it said "you are not connected to company"
    I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
    can someone help me please, I really need it
    Thanks

    you need a single sign on
            Dim oDICompany As SAPbobsCOM.Company
            Dim sCookie As String
            Dim sConnStr As String
            Dim ret As Integer
            oDICompany = New SAPbobsCOM.Company
            sCookie = oDICompany.GetContextCookie
            sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
            If oDICompany.Connected Then
                oDICompany.Disconnect()
            End If
            ret = oDICompany.SetSboLoginContext(sConnStr)
            If Not ret = 0 Then
                SBO_Application.MessageBox("set Login Context failed!")
                Exit Sub
            End If
            ret = oDICompany.Connect()
            If Not ret = 0 Then
                SBO_Application.MessageBox("Company Connect failed!")
            End If

  • Displaying data from database using AJAX

    Hi,
    I have a table that holds data from a database, on each row I have a hyperlink.
    When the user presses the hyperlink the table drops down and displays some additional data,I am trying to display another table of data based on the ID of the row selected. As the second table holds a lot of data I was hoping to use AJAX. Does anybody know of any good tutorials or how to retrieve data from a database based on the ID of the row for .jspx pages.
    Regards
    Steve

    Hi Steve,
    Follow the steps below to achieve what you want:
    a. Specify actionListener for the commandlink component, when the user clicks it invokes the actionListener method in the backing bean(in which you can get the id of the selected row from the ActionEvent), perform the call to your database and fetch the data required for the second table
    b. Set PartialTriggers property of second table to the id of the command link
    Hope this helps.
    Sireesha

  • How to display image in database using html or php

    i've try already to work this thing but i can't do it. anyone that can help me or give me any example or reference to resolve my problem to retrieve or display image(blob) from database. hope that all of you help me

    Using JHeadstart, you can display a BLOB column from the database in HTML, by way of ADF. Check out the JHeadstart Tutorial at http://www.oracle.com/technology/products/jdev/tips/muench/jhstutorial/index.html to get started, then do the same for your own database tables that include the BLOB column. JHeadstart will take care of rendering it as a file upload or image, depending on the display type you set at the attribute level.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • How to display image in database using php

    i've try search all hope that you all can give me some guidance how to display data that is in image or BLOB using PHP. just a query and php code that will make display of the image. hope that you all show me the example or give me reference that i need to solve my problem.

    Hi,
    Have a check on these Google results, you might find something there...
    http://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&q=%22display%20image%22%2Boracle%20%2Bphp

  • How save & retrive data from database using flex, coldfusion, sql server

    hi , i am very new in flex, i am trying to insert data in
    database using flex2, coldfusion, sql server. any one can help me
    please. or give me any example.

    Hi try to goto the following sites, you will get some
    direction to think
    http://weblogs.macromedia.com/pent/archives/2006/11/example_of_flex.cfm
    http://pdxphp.org/node/258
    Good Luck

  • How to fetch data from DataBase using Servlet ?

    Hi all,
    Till now, i was just sending values from web page and receive the data in excel format using servlets.
    But, now, i want to fetch data from data base. I will be giving inputs in the web page(for the query)....ON click of submit button,
    Servlet should be called.
    Depending on the input, query has to be executed, and response should be sent to the user.
    How to do it?
    Code
    import java.text.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.OutputStream;
    /** Simple servlet that reads three parameters from the html
    form
    public class Fetchdata extends HttpServlet
              String query=new String();
              String uid="ashvini";
              String pwd="******";
              try
                   Connection con=null;
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");     
                   String url = "jdbc:odbc:Testing";     
                   con = DriverManager.getConnection(url, uid, pwd);
                   Statement s = con.createStatement();
                   query = "select * from gowri.msllst1";
                   ResultSet rs = s.executeQuery(query);
              public void doGet(HttpServletRequest request,HttpServletResponse response)
              throws ServletException, IOException
                        response.setContentType("application/vnd.ms-excel");
                        ServletOutputStream out=response.getOutputStream();
                        out.println("<HTML>" +"<BODY BGCOLOR=\"#FDF5E6\">\n" +
                        "<H1 ALIGN=CENTER>" + title + "</H1>\n" +
                        "<table>" +" <th>ITEM Code</th>");
                        while(rs.next())
                        out.println("<tr><td>" rs.getString(1).trim()"</tr></td>");
                        }//end of while
                        out.println("</table></BODY></HTML>");
                   }//end of doGet method
         }catch(Exception e)
                        System.out.println(e);
    It is giving error message as:
    C:\Program Files\Apache Tomcat 4.0\webapps\general\srvlt>javac Fetchdata.java
    Fetchdata.java:17: illegal start of type
    try
    ^
    Fetchdata.java:48: <identifier> expected
    ^
    2 errors
    Is this format is correct? am i placing this doGet method at the right place? is my program's logic is correct?
    Please help me?
    Regards
    AShvini

    There is some mistakes in ur code.....how can try catch exists outside a function???
    make use of try catch isde ur doGet method and put
    Connection con=null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbc:odbc:Testing";
    con = DriverManager.getConnection(url, uid, pwd);
    Statement s = con.createStatement();
    query = "select * from gowri.msllst1";
    ResultSet rs = s.executeQuery(query);
    isdie doGet method, for the time being,
    i think u get me..
    regards
    shanu

  • Displaying data from database using Repeater

    Hi,
    I have created a database with 3 column in a table.Where column 1 is username and column 2 is Report name.
    Column 1 has 2 user :-
    user1-----> ABC
    user2-----> PQR. So if i select ABC i am getting 2 records from Report based on ABC and if i select PQR i get 1 record from Report based on PQR.Till here i have done
    Now I am using repeater control and binding the data from the database.but the problem is I want hyperlink on the data which is populating.Since i am using repeater,i am able to fetch 2 records for Report.I want hyperlink on it so i am using anchor tag with
    href,Now both the records are redirecting to the same page.I want each record should redirect to different page.Please help me if any one know about these.
    Thansk Regards,
    Simanchal

    Hi,
    Base on your description here:
    "I want hyperlink on it so i am using anchor tag with href,Now both the records are redirecting to the same page"
    I agree with Bob you have to consult this issue on this forum:
    http://forums.asp.net/24.aspx/1?Web+Forms+Data+Controls
    Regards,
    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • How to copy file to another server from database using FTP in oracle

    How to copy file to another server from database using FTP in oracle.
    Please do the needfaul.

    Billy  Verreynne  wrote:
    BluShadow wrote:
    Not to mention that some FTP servers can return more than one return message per operation whereas others may return one message for the same operation.I had the problem using the LIST command to determine if a file exists on the server. Cannot be determined via the FTP server's return code. Which means parsing and checking the text response from the server to the command. And this vary from server to server.
    But the basics were quite easy to code. The entire package is 500 lines, includes comments and blank lines for formatting, and supports the basic FTP client command set. Not really a complex piece of software to write - but I found that many developers seem to think that writing network socket software is complex. Not really the case...Mine's a big larger, but incorporates functionality similar to what Chris provided in his, such as being able to use SQL to query a remote file using pipelined functions, or functionality to write the results of a query directly to a remove file.
    :)

  • CallResponder|Datagrid|delete item from Database

    Hello guys,
    I succeeded to display datas from database inside the DataGrid using the CallResponder, but until now I still don't know how can I access to the data that already stored in column in the DataGrid !
    the DataGrid Structure is (id, login, password, email, firstname, lastname), and want to access to those datas using the action script
    My question, what is the object that already stored these datasin memory? is it "dataProvider", or "data".
    When I want to delete a person from the dataGrid, I want to click on the dataGrid and then click the delete button, the button will seek for the "id" stored in the memory and finaly send the query to the server to delete the item token from the data Grid !
    example :
    I click on the second item in the DataGrid, and this item it's id = "14" so dataGrid.selectedIndex == 2, but the value of the attribute of that item is 14
    how can I access to to the values ?
    I face this problem because I don't know where the dataGrid does already stores the data that it displays, and what is the structure of it even it is ArrayList or ArrayCollection.
    I hope you understood my challenge?

    Thank you a lot, that is correct, I executed the application in debug mode and I saw that the dataProvider is already an ArrayCollection, so I can understand that all the method of an Arraycollection is already applyable to the dataProvider.
    I didn't know that it is the case, so before you reply me, I was thinking about doing that manually, by pushing the result that come from the CallResponder into an ArrayCollection that is already declared manually in the mxml file, after that adding an event listener and calling a function that is going to make a loop and store all the result into a the ArrayCollection.
    Here is the code: (I think it is useful if someone is going to select something manually from the database so he has to do the same thing and filtring the results inthe loop)
    Creating Manulally the dataProvider()
    Script :
    protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
    getAllUserResult.token = userService.getAllUser();
    getAllUserResult.addEventListener(ResultEvent.RESULT,onResult);
    protected function onResult(event:ResultEvent):void
    for (var i:int=0 ;i< event.result.length;i++){
    userMemory.addItem(event.result[i]);
    Mxml File (Declaration) :
    <fx:Declarations>
    <s:CallResponder id="getAllUserResult"/>
    <userservice:UserService id="userService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
    <s:ArrayCollection id="userMemory"/>
    </fx:Declarations>
    I must thank you my brother for the answer, and for the fast reply !

  • How to display 2 decimal places using DecimalFormat?

    Hi, i would like to display an account balance from database using child.getAccountBal(). Before that, i want to use DecimalFormat to display 2 decimal places. I would like to know whether the codes below are correct. Can anybody guide me? Thanks.
    public static double roundTo2DecimalPlaces(double value){
              DecimalFormat df = new DecimalFormat("0.##");
              double d = df.format(value);
              System.out.println(d);
              return value;          
    And inside the jsp page...is that how i call the values?
    Account Balance: <%=roundTo2DecimalPlaces(child.getAccountBal())%>

    DecimalFormat's format method returns a String not a double,
    os you must return a String instead of a double.
    public String roundTo2DecimalPlaces(double value)
         DecimalFormat df = new DecimalFormat("0.00");
         String stringValue = df.format(value);
         return stringValue;
    <%= roundTo2DecimalPlaces(child.getAccountBal()) %>

Maybe you are looking for