How to display the content of a BLOB column in a JSP page?

Hi,
I've a db table with a Blob column which contains an image (".gif" file). I've created a UIX JSP page with the wizard, but I cannot display my image.
This is my code:
<%@ page errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
<%@ taglib uri="http://xmlns.oracle.com/uix/ui/bc4j" prefix="bc4juix" %>
<%-- Define Application Module and DataSource--%>
<jbo:ApplicationModule configname="PackageTest.PackageTestModule.PackageTestModuleLocal" id="app1" />
<jbo:DataSource id="ds1" appid="app1" viewobject="ProvaMediaView" rangesize="1" />
<%-- Main page contents go here --%>
<uix:contents>
<uix:form name="form1" method="POST">
<uix:labeledFieldLayout >
<jbo:AttributeIterate id="dsAttributes" datasource="ds1" hideattributes="UixShowHide">
<%if(dsAttributes.getName().compareTo("Image")==0){
%>
<bc4juix:LabelStyledText datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
<jbo:EmbedImage datasource="ds1" mediaattr="Image" />
<%}else{%>  
<bc4juix:LabelStyledText datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
<bc4juix:InputRender datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
<%}%>
</jbo:AttributeIterate>
</uix:labeledFieldLayout>
<uix:formValue name="RowKey" value="<%= sRowKey%>" />
</uix:form>
</uix:contents>
and this is the error on running the page:
oracle.jbo.domain.BlobDomain
Exception Details
javax.servlet.jsp.JspException: oracle.jbo.domain.BlobDomain
     int oracle.ord.html.jsp.datatags.ShowEmbedImageTag.doStartTag()
     void Media_Edit._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
     void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
     boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
     void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
     void com.evermind.util.ThreadPoolThread.run()
How can I do?
Thanks in advance.

Hi,
I've a db table with a Blob column which contains an image (".gif" file). I've created a UIX JSP page with the wizard, but I cannot display my image.
This is my code:
<%@ page errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
<%@ taglib uri="http://xmlns.oracle.com/uix/ui/bc4j" prefix="bc4juix" %>
<%-- Define Application Module and DataSource--%>
<jbo:ApplicationModule configname="PackageTest.PackageTestModule.PackageTestModuleLocal" id="app1" />
<jbo:DataSource id="ds1" appid="app1" viewobject="ProvaMediaView" rangesize="1" />
<%-- Main page contents go here --%>
<uix:contents>
<uix:form name="form1" method="POST">
<uix:labeledFieldLayout >
<jbo:AttributeIterate id="dsAttributes" datasource="ds1" hideattributes="UixShowHide">
<%if(dsAttributes.getName().compareTo("Image")==0){
%>
<bc4juix:LabelStyledText datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
<jbo:EmbedImage datasource="ds1" mediaattr="Image" />
<%}else{%>  
<bc4juix:LabelStyledText datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
<bc4juix:InputRender datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
<%}%>
</jbo:AttributeIterate>
</uix:labeledFieldLayout>
<uix:formValue name="RowKey" value="<%= sRowKey%>" />
</uix:form>
</uix:contents>
and this is the error on running the page:
oracle.jbo.domain.BlobDomain
Exception Details
javax.servlet.jsp.JspException: oracle.jbo.domain.BlobDomain
     int oracle.ord.html.jsp.datatags.ShowEmbedImageTag.doStartTag()
     void Media_Edit._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
     void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
     void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
     boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
     void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
     void com.evermind.util.ThreadPoolThread.run()
How can I do?
Thanks in advance.

Similar Messages

  • How to display the content of a BLOB column in a ADF/BC pages ?

    How to display the content of a BLOB column in a ADF/BC pages ?
    There is some image in database table blog column. And we want to display image on the screeen.
    There is some example about upload and dowload blog columns.
    (steve not yet document example page etc...)
    But We want to display blog picture in a image component...
    is there any basic way to do it ?
    Thanks a lot...

    Ali,
    You could just download the sample app... but... here is the servlet code from the demo (look at it just for technique - you'll obviously have to change it for your needs)...
    John
    package oracle.fodemo.storefront.servlet;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    import oracle.jbo.domain.DBSequence;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.ViewObjectImpl;
    public class ImageServlet
      extends HttpServlet
      private static final String CONTENT_TYPE =
        "image/jpg; charset=windows-1252";
      public void init(ServletConfig config)
        throws ServletException
        super.init(config);
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType(CONTENT_TYPE);
        response.setContentType(CONTENT_TYPE);
        String detailProductId = request.getParameter("detail");
        String thumbnailProductId = request.getParameter("thumbnail");
        boolean thumbnail = true;
        String productId = null;
        OutputStream os = response.getOutputStream();
        String amDef = "oracle.fodemo.storefront.store.service.StoreServiceAM";
        String config = "StoreServiceAMLocal";
        ApplicationModule am =
          Configuration.createRootApplicationModule(amDef, config);
        ViewObjectImpl vo =
          (ViewObjectImpl) am.findViewObject("ProductImages"); // get view object (the same as used in the table)
        if (detailProductId != null)
          productId = detailProductId;
          thumbnail = false;
        else
          productId = thumbnailProductId;
        vo.defineNamedWhereClauseParam("paramThumbnail", null, null);
        vo.defineNamedWhereClauseParam("paramProductId", null, null);
        vo.setWhereClause("DEFAULT_VIEW_FLAG = :paramThumbnail AND PRODUCT_ID = :paramProductId");
        vo.setNamedWhereClauseParam("paramThumbnail", (thumbnail? "Y": "N"));
        vo.setNamedWhereClauseParam("paramProductId", productId);
        vo.executeQuery();
        Row product = vo.first();
        BlobDomain image = (BlobDomain) product.getAttribute("Image");
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[10 * 1024];
        int nread;
        while ((nread = is.read(buffer)) != -1)
          os.write(buffer, 0, nread);
        os.close();
        vo.setWhereClause(null);
        vo.removeNamedWhereClauseParam("paramProductId");
        vo.removeNamedWhereClauseParam("paramThumbnail");
        Configuration.releaseRootApplicationModule(am, false);
    }

  • How To Print the contents of a BLOB Column on a report?(Word Document)

    Requirement: The word document will be inserted in a BLOB Column and the data in the word document has to be shown on the reports or the user should be able to see the word document (atleast he should be able to view the contents)?
    The data is getting loaded in the database but not sure how to proceed further.
    Any inputs on how to proceed will be appreciated.
    Thanks.

    in JComponent there is a method called print(Graphics g)
    you can use that with a Printable class
    read bout the java.print package in the java doc

  • How to display the content of a region on a different page

    Hello,
    Does anyone knows how to display the content of a region on an other page. I try to make page that displays content that resides somewhere else in my portal, so I can give a summarization of some hot topics. I really want to display the whole content of some regions (not a display with custom search).
    Thanks a lot,
    Hans

    Set that page as portlet, include it in a region in another page and in the edit defaults decide which regions you want to display.
    Mere.

  • How to display the contents of the database values which are retrived.

    how to display the contents of the database values which are retrived in servlets and i am able to display the contents in the servlets and if forward to jsp using requestdespatcher,the values are to be shown in jsp one below the other.please suggest me in these........the servlet code is as shown
    while(rs.next()){
                        buffer.append(rs.getString(1));
                        buffer.append(rs.getString(2));
                        buffer.append(rs.getString(3));
                        buffer.append(rs.getString(4));
                        buffer.append(rs.getString(5));
                        buffer.append(rs.getString(6));
                        buffer.append(rs.getString(7));
                        buffer.append(rs.getString(8));
                        buffer.append(rs.getString(9));
                        buffer.append(rs.getString(10));
                        request.setAttribute("result1",buffer);
                        RequestDispatcher rq=request.getRequestDispatcher("/results.jsp");
                        rq.forward(request,response);
    in jsp iam using the getAttribute to retrieve the values as shown
    <% StringBuffer sb=(StringBuffer)request.getAttribute("result1"); %>
    <%= sb %>
    but getting the results in the stretch,i need to display the result one below the other.

    if you load it all into the buffer that is going to be very difficult. I would suggest loading it into some sort of collection. I like using an ArrayList.
    Then pass the arraylist.
    you will then on the jsp iterate through the arrayList using what every you want.. el, logic tags, scriplets.
    so something like
    ArrayList arrayList = new ArrayList();
    while(rs.next()){
    arrayList.append(rs.getString(1));
    //or possibly an arrayList of String arrays
    //maybe using nested for loops.  Inner for loop adds result to string[] then //outer adds string[] to arrayList.
    //can be done any number of ways based on your expected result set.

  • Want to display the contents of a text file in a jsp

    hi
    i am new to jsp, i want to display the contents of a text file in a jsp file ,whenever jsp file is loaded from browser.
    -thanx

    i had come up with the code
    <!-- form.jsp -->
    <%@ page import="java.io.*, java.lang.*" %>
    <%@ page language="java" %>
    <html>
    <head>
    <title>Display</title>
    </head>
    <body>
    <%
    String sample[100];
    String line;
    %>
    <%! int i=0; %>
    <%!File f1 = new File("c:\\file.txt"); %>
    <% try { %>
    <%!FileReader fi = new FileReader(f1); %>
    <% } catch(FileNotFoundException io) { } %>
    <%!BufferedReader in = new BufferedReader(fi); %>
    <%
    while((line=in.readLine())!= null)
    sample= line;
    i++;
    in.close();
    %>
    i will display sample here
    </body>
    </html>
    but i am getting error
    display_jsp.java:16: unreported exception java.io.FileNotFoundException;
    must be caught or declared to be thrown
    FileReader fi = new FileReader(f1);
    ^
    plz help
    -thanx

  • The content type for office excel 2007 in jsp page and the mime-type in  we

    Hi,
    In my system MS Office 2007 is installed. I am trying to generating excel sheets from JSP page by setting the content type "application/vnd.ms-excel" in jsp page and as well as in web.xml file. I am getting the below message
    The file you are trying to open, 'xxxxxxxx.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
    Then finally the excel file is opening and displaying properly. If in my system MS Office 2003 is installed , then the above message is not coming.
    I have changed the content type according to Excel 2007 <%@ page contentType= "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" %> and in web.xml file the mime type to
    <mime-mapping>
    <extension>xlsx</extension>
    <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
    </mime-mapping>
    even the content type is changed according to office excel 2007 , i am getting the same above message.
    My client is asking not to display the above message. So how to prevent that message ?
    It's very great if any body reply me as soon as possible.

    Hi Akash,
    I am not using the POI. I am generating the excel sheet using the below code.
    <jsp:directive.page import="java.util.Map" />
    <jsp:directive.page import="lehman.ra.Report.ReportDefinition" />
    <jsp:directive.page import="lehman.ra.RAUtilBean" />
    <jsp:directive.page import="java.util.ArrayList" />
    <jsp:directive.page import="lehman.util.GeneralUtil" />
    <jsp:directive.page import="lehman.admin.report.AdminHtmlReportFormatter"/>
    <jsp:directive.page import="lehman.helper.irprod.IRProdHelper"/>
    <%@ page contentType= "application/vnd.ms-excel" %>
    <jsp:directive.page import="java.util.Iterator"/>
    <jsp:directive.page import="java.util.HashMap"/>
    <%
         String strTradeDate = (String) session.getAttribute("TradingDate");
         String sContextPath = request.getContextPath();
         IRProdHelper irHelper     = new IRProdHelper();
         String  sReportFormat  = "E2E";     
         String subtab1 = request.getParameter("subtab1");
         if (subtab1 == null)
              subtab1 ="";     
         Map report_Ids    = (Map) session.getAttribute("ADMIN_E2E_REPORTS");
         AdminHtmlReportFormatter formatter = new AdminHtmlReportFormatter();
         ArrayList contentData = new ArrayList();
         ArrayList headerData  = new ArrayList();
         ArrayList metaData    = new ArrayList();
         Map resultMap            = null;
         String headerString       = "";
         String contentString  = "";
         String reportId            = "";
         int titleSpan         = 5;     
         if( report_Ids!=null && report_Ids.size() > 0){
              Object oReportObj      = null;
              Iterator rowIter = report_Ids.keySet().iterator();
              RAUtilBean raUtilBean = new RAUtilBean();
              ReportDefinition rdef = new ReportDefinition();
              while ( rowIter.hasNext() ){          
                   oReportObj = rowIter.next();     
                   reportId = oReportObj.toString();
                   System.out.println("**************reportId="+reportId);     
                   resultMap  =  (HashMap) report_Ids.get(oReportObj);
                   if(resultMap == null )
                        continue;
                   if(resultMap.size() > 0 ) {
                        contentData          = (ArrayList)resultMap.get(GeneralUtil.CONTENT_DATA);
                        headerData          = (ArrayList)resultMap.get(GeneralUtil.COL_METADATA);
                        metaData          = (ArrayList)resultMap.get(GeneralUtil.METADATA);
                        rdef = new ReportDefinition();                    
                        raUtilBean.setReportAttributes(rdef, headerData, metaData,reportId, sReportFormat);
                        titleSpan = raUtilBean.findMaxCol(contentData, rdef.getDisplayCols());
                        if("51031".equals(reportId)){                         
                             if(resultMap.get("HIDE_ETA")!=null){
                                  boolean hideETA = ((Boolean)resultMap.get("HIDE_ETA")).booleanValue();                              
                                  formatter.setHideETA(hideETA);
                                  if(hideETA){
                                       titleSpan = titleSpan-1;
                        rdef.setMaxCol(titleSpan);
                        headerString = formatter.constructHeadingForE2E(rdef, headerData);
                        contentString = formatter.constructContentForE2E(rdef, contentData, strTradeDate, sReportFormat);
    %>     
    <html xmlns:o="urn:schemas-microsoft-com:office:office"
         xmlns:x="urn:schemas-microsoft-com:office:excel"
         xmlns="http://www.w3.org/TR/REC-html40">
         <head>
         <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
         <meta name="ProgId" content="Excel.Sheet"/>
         <meta name="Generator" content="Microsoft Excel 9"/>
         <link rel="File-List" href="./Test33_files/filelist.xml"/>
         <link rel="Edit-Time-Data" href="./Test33_files/editdata.mso"/>
         <link rel="OLE-Object-Data" href="./Test33_files/oledata.mso"/>
         <link href="<%=sContextPath %>/llehman.css" rel="stylesheet" type="text/css">
         <link href="<%=sContextPath %>/llcontent.css" rel="stylesheet" type="text/css">
         <style>
         <xsl:comment>
         table
              {mso-displayed-decimal-separator:"\.";
              mso-displayed-thousand-separator:"\,";}
         .style0
              {mso-number-format:General;
              text-align:general;
              vertical-align:bottom;
              white-space:nowrap;
              mso-rotate:0;
              mso-background-source:auto;
              mso-pattern:auto;
              color:windowtext;
              font-size:10.0pt;
              font-weight:400;
              font-style:normal;
              text-decoration:none;
              font-family:Arial;
              mso-generic-font-family:auto;
              mso-font-charset:0;
              border:none;
              mso-protection:locked visible;
              mso-style-name:Normal;
              mso-style-id:0;}
         .xl21
         {mso-style-parent:style0;
         color:black;
         font-size:8.0pt;
         font-family:Arial, sans-serif;
         mso-font-charset:0;
         border-top:.5pt solid silver;
         border-right:.5pt solid silver;
         border-bottom:.5pt solid silver;
         border-left:none;}
         .xl24
              {mso-style-parent:style0;
              mso-number-format:"\#\,\#\#0\.00_\)\;\\\(\#\,\#\#0\.00\\\)";}
         .xl25
              {mso-style-parent:style0;
              mso-number-format:0%;}
         .xl26
              {mso-style-parent:style0;
              mso-number-format:"\#\,\#\#0_\)\;\\\(\#\,\#\#0\\\)";}
         .xl27
         {mso-style-parent:style0;
         background-color:#666666;
         color:#FFFFFF;
         font-size:9.0pt;     
         font-family:Arial, sans-serif;
         mso-font-charset:0;
         text-align:left;
         vertical-align:middle;
         border-top:none;
         border-right:.5 pt solid silver;
         border-bottom:.5pt  silver;
         border-left:none;
         mso-pattern:auto none;
         white-space:normal;
         .xl55
         color:black;
         font-size:8.0pt;
         font-weight:700;
         mso-style-parent:style0;
         mso-number-format:"\#\,\#\#0_\)\;\[Red\]\\\(\#\,\#\#0\\\)";
         mso-pattern:auto none;
         font-size:9.0pt;
         font-family:Arial, sans-serif;
         mso-font-charset:0;
         text-align:right;
         border-top:none;
         border-right:.5pt solid silver;
         border-bottom:.5pt solid silver;
         border-left:none;
         .xlDate{
         mso-style-parent:style0;
         mso-number-format:"yyyy\\-mm\\-dd";
         .xlDateTime{
         mso-style-parent:style0;
         mso-number-format:"yyyy\\-mm\\-dd\\ h\\:mm\\ AM\/PM";
         </xsl:comment>
         </style>
         <xml>
          <x:ExcelWorkbook>
           <x:ExcelWorksheets>
            <x:ExcelWorksheet>
              <x:Name><%=subtab1%></x:Name>
              <x:WorksheetOptions>
               <x:ProtectContents>False</x:ProtectContents>
               <x:ProtectObjects>False</x:ProtectObjects>
               <x:ProtectScenarios>False</x:ProtectScenarios>
              </x:WorksheetOptions>
            </x:ExcelWorksheet>
           </x:ExcelWorksheets>
          </x:ExcelWorkbook>
          </xml>
         </head>
    <body text="#000000" style="margin-left:5px;margin-top:5px">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                  <td>
                       <table  border='0' cellpadding="0"  cellspacing='0' width="100%">
                             <tr class="xl21">
                                  <td align="left" nowrap style='font-size:11px;' colspan="<%=titleSpan%>"><b><%=subtab1%></b> -  COB  <%=irHelper.formatDate(strTradeDate)%>  </td>
                                  </tr>
                         </table>
                   </td>
                </tr>
                <tr>
                     <td> </td>
              </tr>
    <!-- Report Processing -->
              <tr>
                   <td>
                        <%=headerString%>
                        <%=contentString%>
                   </td>
              </tr>
    <%
                   }//end of if
              }//end of while
         }//end of if report_Ids     
    %>          
         </table>
    </body>
    </html>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to display the contents of java.util.list in a frame???

    i should use awt only not applet...
    i need to display the contents of java.util.list in a frame...
    the contents contains rows queried from a oracle database.....
    the contents should be displayed similar to how a lable is displayed..
    please help me out..
    thanks
    dinesh

    Of course there is something in AWT:
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.
    htmlagain, if you carefully read the question, he needs a
    table to display a JDBC result set. There is no
    pre-made table component in AWT.Well, I read that he filled the data into a java.util.List and now wants to display this list. So a List-component should be sufficient. But I might be wrong...
    -Puce

  • How to display the contents of an array list to a listview?

    Hi. How do I display the contents of an arraylist to a listview?
    Here is my current code:
    var c: Control= new Control();
    var simpleList: ArrayList = c.ListResult; //ListResult is an ArrayList containing strings
    var simpleListView : ListView = ListView {
            translateX: 0
            translateY: 0
            layoutX: 20
            layoutY: 80
            height: 130
            width: 200
            items: bind simpleList;
    Stage {
        title: "Trial app"
        width: 240
        height: 320
        style: StageStyle.TRANSPARENT
        scene: Scene {
            content: [ simpleListView
    } [http://img341.imageshack.us/img341/133/listview.jpg]
    My code generates the result in this screenshot above. It shows that all the contents on the arraylist is displayed in one row/item.
    It should be displayed as (see bottom image) ...
    [http://img707.imageshack.us/img707/3745/listview1.jpg]
    Do you guys have any idea on this? Thank you very much for your replies

    For your listbox data to bind the listbox requires a Sequence. This is something that you can sort out at the entrypoint of your code.
    In the example below I have used an ArrayList to simmulate the data you have entering your FX code, but then I put that list into a Sequence, in your case instead of having an ArrayList in your FX code, you simple supply the list on entry, as I have marked in the following code.
    * Main.fx
    * Created on 12-Feb-2010, 10:24:46
    package uselists;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import java.util.ArrayList;
    import javafx.scene.control.ListView;
    import javafx.animation.Timeline;
    import javafx.animation.KeyFrame;
    * @author robert
    //Simmulate your data with an ArrayList
    var simpleList: ArrayList = new ArrayList;
    simpleList.add("Hello");
    simpleList.add("World");
    // *** This is what your entry point would become, just load the simpleList.toArray() into your sequence ***
    var simpleSequence = [];
    simpleSequence = simpleList.toArray();
    //after some time add some items, to show that our binding is working
    Timeline {
        repeatCount: 1
        keyFrames: [
            KeyFrame {
                time: 5s
                canSkip: true
                action: function () {
                    //you can work on the Sequence to add or remove
                    insert "Another item" into simpleSequence;
                    //if you at some point want to have your array reflect the changes
                    //then perform your changes on that too
                    simpleList.add("Another item");
                    //remember depending on your app
                    //you may keep the update of simpleList
                    //until you are finished with this view and do it in a single update
            KeyFrame {
                time: 10s
                action: function () {
                    //Alternatly, to keep your ArrayList correct at all times
                    //add items to it and then update your Sequence
                    simpleList.add("Added to array");
                    simpleSequence = simpleList.toArray();
    }.play();
    Stage {
        title: "Application title"
        scene: Scene {
            width: 250
            height: 80
            content: [
                ListView {
                    items: bind simpleSequence
    }You can bind to a function rather than the data, which I am sure would be needed some cases, for example if the listBox data was a named part of a hash value for example, all that is required is that your function returns a sequence.

  • How to display the content of a file in the portal?

    Hey guys, could anyone help?
    I just created a page which includes two iView, one is KM Navigation iView to display a certain repository, while the other is for displaying the content of a certain file I click in the navigation iView.
    And now the problem is when I click a file in the KM Navigation iView, it will pop up a new window to display it. How can I make it displayed in a fixed iView, which type of this iView should be?

    Hi,
    you can try to use the:
    <b>ConsumerTreeListPreview</b>
    layout for KM navigation ivew (or customize to your own).
    This layout shows a folder tree on the left, a document list on the right. When you click on a document from the list it shows the contents of the file on the bottom of the iview.
    Hope this helps,
    Romano

  • How to display the contents of a document set on a page?

    I want to display the contents of a document set (that contains both folders and files) on a page (with the same structure as they are in the document set like folders and files). How to achieve this?
    I tried content search webpart but it is of no use as it displays the flat list instead I need folders and files as they are present in the document set
    I tried document set contents webpart but as it doesn't accept any connection, it is not of much use.
    I will be glad if you have any pointers for me in this regard.
    Regards
    Kesava

    Hi Kesava,
    According to your description, you might want to display the content in a document set with its hierarchy.
    How about using
    Page Viewer Web Part to display the page of the corresponding document set? This would be a non-code solution I would recommend.
    More information about Page Viewer Web Part:
    https://support.office.com/en-nz/article/Page-Viewer-Web-Part-e364436c-0ec4-4819-acac-1982b3525531
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • How to Display the content of Excel file into Webdynpro Table

    Hi Experts
    I am following the Blog to upload a file in to the webdynpro context,but my problem is after uploading a excel file i need to extract the content from that Excel file and that content should be displayed in the webdynpro table.Can any body please guide me how to read the content from excel and to Display in the Table.
    Thanks and Regards
    Kalyan

    HI,
    Take for example, if Excel file contains 4 fields,
    Add jxl.jar to JavaBuild path and Use this snippet
    File f=new File("sample.xls");
    Workbook w=Workbook.getWorkbook(f);
    Sheet sh=w.getSheet(0);
    int cols=sh.getColumns();
    int rows=sh.getRows();
    Cell c=null;
    String s1=null;
    String s2=null;
    String s3=null;
    String s4=null;
    ArrayList al=new ArrayList();
    int j=0;
    for(int i=1;i<rows;i++)
    ITableElement table=wdContext.createTableElementz
         s1=sh.getCell(0,i).getContents();
         s2=sh.getCell(1,i).getContents();
         s3=sh.getCell(2,i).getContents();
         s4=sh.getCell(3,i).getContents();
                             table.setName(s1);
         table.setAddress(s2);
         table.setDesignation(s3);
         table.setDummy(s4);
         al.add(j,table);
         j++;                    
    wdContext.nodeTable().bind(al);
    Regards
    LakshmiNarayana

  • How to display the content from a file  stored in database

    when i am trying to display the content from a file which stored in database on oracle report 10g
    data are displaying as following. please help me to display the data in readable format
    <HTML LANG="en-US" DIR="LTR">
    <!-- Generated: 1/11/2006, postxslt.pl [1012] v1
    Source: amsug304286.xml
    File: amsug304286.htm
    Context: nil
    Tiers: ALWAYS
    Pretrans: YES
    Label: Release 12 -->
    <HEAD>
    <!-- $Header: amsug304286.htm 120.4 2006/11/01 20:57:29 appldev noship $ -->
    <!--BOLOC ug1_OMPO1010302_TTL--><TITLE>Product Overview (ORACLE MARKETING)</TITLE><!--EOLOC ug1_OMPO1010302_TTL-->
    <LINK REL="stylesheet" HREF="../fnd/iHelp.css">
    </HEAD>
    <BODY BGCOLOR="#F8F8F8">
    <A NAME="T304286"></A><A NAME="ProdOve"></A>
    <CENTER><H2><!--BOLOC ug1_OMPO1010302--><B>Product Overview</B><!--EOLOC ug1_OMPO1010302--></H2></CENTER>
    <p><!--BOLOC ug1_OMPO1010304-->Oracle Marketing drives profit, not just responses, by intelligently marketing to the total customer/prospect base. By leveraging a single repository of customer information, you can better target and personalize your campaigns, and refine them in real time with powerful analytical tools.<!--EOLOC ug1_OMPO1010304--></p>
    <p><!--BOLOC ug1_OMPO1006611-->With tools necessary to automate the planning, budgeting, execution, and tracking of your marketing initiatives, Oracle Marketing provides you with:<!--EOLOC ug1_OMPO1006611--></p>
    <ul>
    <li>
    <p><!--BOLOC ug1_OMPO1006612--><B>Customer Insight</B> - With sophisticated customer management and list generation, Oracle Marketing enables you to quickly generate target lists and segments using an intuitive user interface. The easy to use Natural Query Language Builder (NLQB) lets you query for customers or prospects using a natural language while hiding data complexity; fatigue management ensures that you do not over-contact the same customers with marketing messages; and predictive analytics helps you predict customer behavior that you can leverage to produce significant increases in marketing return on investments (ROI).<!--EOLOC ug1_OMPO1006612--></p>
    </li>
    <li>
    ls.<!--EOLOC ug1_OMPO1010304--></p>
    <p><!--BOLOC ug1_OMPO1006611-->With tools necessary to automate the planning, budgeting, execution, and tracking of your marketing initiatives, Oracle Marketing provides you with:<!--EOLOC ug1_OMPO1006611--></p>
    <ul>
    <li>
    <p><!--BOLOC ug1_OMPO1006612--><B>Customer Insight</B> - With sophisticated customer management and list generation, Oracle Marketing enables you to quickly generate target lists and segments using an intuitive user interface. The easy to use Natural Query Language Builder (NLQB) lets you query for customers or prospects using a natural language while hiding data complexity; fatigue management ensures that you do not over-contact the same customers with marketing messages; and predictive analytics helps you predict customer behavior that you can leverage to produce significant increases in marketing return on investments (ROI).<!--EOLOC ug1_OMPO1006612--></p>
    </li>
    <li>
    <p><!--BOLOC ug1_OMPO1006613--><B>Sales Alignment</B> - Oracle Marketing's leads management helps you compile and distribute viable leads so that sales professionals can follow up valuable opportunities and not just contact interactions. Additionally, support for distributing proposals and marketing material drive speedy and consistent setups and collaboration of best practices.<!--EOLOC ug1_OMPO1006613--></p>
    </li>
    <li>
    <p><!--BOLOC ug1_OMPO1006614--><B>Marketing Insight</B> - While Oracle Marketing Home page reports and Daily Business Intelligence (DBI) for Marketing and Sales provide aggregated management level information in almost real time, operational metrics help in tracking the effectiveness of individual marketing activities.<!--EOLOC ug1_OMPO1006614--></p>
    </li></ul>
    </BODY>
    </HTML>
    <!-- Q6z5Ntkiuhw&JhsLdhtX.cg&Zp4q0b3A9f.&RQwJ4twK3pA (signum appsdocopis 1162406236 2673 Wed Nov 1 10:37:16 2006) -->

    Hi,
    you can try to use the:
    <b>ConsumerTreeListPreview</b>
    layout for KM navigation ivew (or customize to your own).
    This layout shows a folder tree on the left, a document list on the right. When you click on a document from the list it shows the contents of the file on the bottom of the iview.
    Hope this helps,
    Romano

  • How to display the contents of a 2D array which is bound to a data table

    Hi ,
    I have a backing bean which returns me a 2D array of Strings . Now I have bound this to a data table .
    Something like this
    <h:dataTable styleClass="dataTable" id="dstable" var="dbArray" value="#{pc_MyApp.dbProperties}">
    Now when I say dbArray[i] it will give me the ith column of the current row. I want to display these dbArray[i] contents in a proper table format.
    What I am doing at present is something like this
    <h:dataTable styleClass="dataTable" id="dstable" var="dbArray" value="#{pc_MyApp.dbProperties}">
    <h:column id=id1>
    <h:facet name="header">
    <h:outputText value="Heading"/>
    </h:facet>
    <h:outputText id="text1" value="#{dbArray[0]}" ></h:outputText>
    <h:outputText id="text1" value="#{dbArray[1]}" ></h:outputText>
    <h:outputText id="text1" value="#{dbArray[2]}" ></h:outputText>
    </h:column>
    </h:dataTable>
    This is able to display the contents of 2D array on the screen, but everything for the current row comes in just a single column...I want each column value to be in diff column and it should look like a table.
    Can anyone please guide me in this respect..
    Thanks
    Mahajan

    Does doArray always have at most three elements?
    If so, you can specify three <h:column>s each displays doArray.

  • Displaying the image stored in Blob column

    Hi all,
    I'm trying to print the report with an image. I've stored the image in a Blob column and the format of the image is Jpg.
    I'm using the Reports 10g(10.1.2.0.2). When I'm trying to print the report, I'm getting an error Rep-62203. I want to know whether there are any settings which i need to set to display the image item. I mean to say that are there any registry settings.
    Regards,
    Alok Dubey
    Edited by: Alok Dubey on Dec 1, 2008 12:55 PM

    Hi all,
    I'm trying to print the report with an image. I've stored the image in a Blob column and the format of the image is Jpg.
    I'm using the Reports 10g(10.1.2.0.2). When I'm trying to print the report, I'm getting an error Rep-62203. I want to know whether there are any settings which i need to set to display the image item. I mean to say that are there any registry settings.
    Regards,
    Alok Dubey
    Edited by: Alok Dubey on Dec 1, 2008 12:55 PM

Maybe you are looking for

  • Can you create a form not using a php script?

    I need to create a contact us form on my website using DW and have researched how and understand the easiest way is using a php script.  Unfortuntately, my webhost server does not support this and will charge me an arm and a leg in order to to do it.

  • Receipt Swap stock

    *Hi SAP gurus,* *Here my client requirement is* *In order to comply with Accounting policies regarding SWAP stock, while still meeting the local Regulatory tax requirements, there is a need to revisit the receiving/Receipting of SWAP stock.* *Swap st

  • Why the "Import Data from Another Browser" option cannot be chosen

    I click on History on the menu, then, Show All History option, a new window appears called Library. I click on the button: 'Import and Backups', a drop down menu appears with the option 'Import Data from Another Browser'; however, this option in my b

  • Weird Macbook Pro Unibody Trackpad problem

    Okay, this has been bothering me for a while. I have a 2 year old Unibody 15" Macbook pro, with the glass trackpad. I used the laptop for a year, and it was perfect. One day I was sitting on the couch with the computer next to me and I push the track

  • Needed user exit to tackle HRP1007-HISTO

    Hi experts, We are facing a unique problem. When ever we are trying to fill a position, it is automatically getting historical status checked (HRP1007-HISTO). The field HISTO (Transaction Code: PO13 -> Vacancy) is not editable and is getting checked