Displaying BLOB image by using ADF Faces

Hi all,
I digged the forum but couldn't find any satisfied answer about displaying BLOB images by using ADF Faces.
I have insterted POJO object to Oracle database but couldn't find any way to display blob (in java byte [] ) data in POJO.
I have read the POJO object from database which contains two field; one of them is id field and other is BLOB data which holds GIF or JPG image and I want to display this image another page which contains also other fields / records ...
thanks for your answers
regards...
--baris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

This thread at Sun : http://forum.java.sun.com/thread.jspa?threadID=513804&messageID=2445090
talks about two options for creating a graphicImage jsf tag. (img tag)
1. Make the img tag url refer to a servlet (instead of a static image file)
2. Embed the image into the tag as inline base64 encoded data.
2a. Use an <Object> tag with inline data.
1. Looks a bit complex for a simple problem.
2 and 2a don't work with some browsers.
- And I've not yet figured out how to hook into the ADF Faces table-rendering logic to get it to add my image column. My table binds to a collection DataControl, [which in turn retrieves from a findAllItems call on a session facade, which uses my domain model, and wraps up access to a TopLink pesistence layer]. The framework just ignores my byte[] attribute when creating the jsf table from the DataControl. All string, int etc. attributes get represented correctly in the jsf table output.

Similar Messages

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • I want to display BLOB image in JSP Using  html tags IMG src=

    GoodAfternoon Sir/Madom
    I Have got the image from oracle database but want to display BLOB image using <IMG src="" > Html tags in JSP page . If it is possible than please give some ideas or
    Send me sample codes for display image.
    This code is ok and working no problem here Please send me code How to display using html tag from oracle in JSP page.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.swing.ImageIcon;" %>
          <%
            out.print("hiiiiiii") ;
                // declare a connection by using Connection interface
                Connection connection = null;
                /* Create string of connection url within specified format with machine
                   name, port number and database name. Here machine name id localhost
                   and database name is student. */
                String connectionURL = "jdbc:oracle:thin:@localhost:1521:orcl";
                /*declare a resultSet that works as a table resulted by execute a specified
                   sql query. */
                ResultSet rs = null;
                // Declare statement.
                PreparedStatement psmnt = null;
                  // declare InputStream object to store binary stream of given image.
                   InputStream sImage;
                try {
                    // Load JDBC driver "com.mysql.jdbc.Driver"
                    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                        /* Create a connection by using getConnection() method that takes
                        parameters of string type connection url, user name and password to
                        connect to database. */
                    connection = DriverManager.getConnection(connectionURL, "scott", "root");
                        /* prepareStatement() is used for create statement object that is
                    used for sending sql statements to the specified database. */
                    psmnt = connection.prepareStatement("SELECT image FROM img WHERE id = ?");
                    psmnt.setString(1, "10");
                    rs = psmnt.executeQuery();
                    if(rs.next()) {
                          byte[] bytearray = new byte[1048576];
                          int size=0;
                          sImage = rs.getBinaryStream(1);
                        //response.reset();
                          response.setContentType("image/jpeg");
                          while((size=sImage.read(bytearray))!= -1 ){
                response.getOutputStream().write(bytearray,0,size);
                catch(Exception ex){
                        out.println("error :"+ex);
               finally {
                    // close all the connections.
                    rs.close();
                    psmnt.close();
                    connection.close();
         %>
         Thanks

    I have done exactly that in one of my applications.
    I have extracted the image from the database as a byte array, and displayed it using a servlet.
    Here is the method in the servlet which does the displaying:
    (since I'm writing one byte at a time, it's probably not terribly efficient but it works)
         private void sendImage(byte[] bytes, HttpServletRequest request, HttpServletResponse response) throws IOException {
              ServletOutputStream sout = response.getOutputStream();
              for(int n = 0; n < bytes.length; n++) {
                   sout.write(bytes[n]);
              sout.flush();
              sout.close();
         }Then in my JSP, I use this:
    <img src="/path-to-servlet/image.jpg"/>
    The name of the image to display is in the URL as well as the path to the servlet. The servlet will therefore need to extract the image name from the url and call the database.

  • Display BLOB (image) column in (interactive) report

    Hi,
    I have a field called "picture" in my table "details" which is of type BLOB. i also have a field for "MIMETYPE" and "filename"
    i additionally have a "name" and "description" columns which i need to display along with the picture as columns in a report (preferably interactive).
    i have also modified the BLOB display format as per
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    what i am missing is the correct query. if possible, i would like to control the size of the picture rendered within the report like say 40*50.
    I have also referred to the thread
    APEX 3.1 Display BLOB Image
    But i don't know how to place the
    dbms_lob.getlength("BLOB_CONTENT") as "BLOB_CONTENT"
    in my query.
    The above also makes the report column as of type "number". is this expected?
    Any help would be much appreciated.
    Regards,
    Ramakrishnan

    You haven't actually said what the problem is?
    >
    I have a field called "picture" in my table "details" which is of type BLOB. i also have a field for "MIMETYPE" and "filename"
    i additionally have a "name" and "description" columns which i need to display along with the picture as columns in a report (preferably interactive).
    i have also modified the BLOB display format as per
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    what i am missing is the correct query.
    I have also referred to the thread
    APEX 3.1 Display BLOB Image
    But i don't know how to place the
    dbms_lob.getlength("BLOB_CONTENT") as "BLOB_CONTENT"
    >
    Something like:
    select
              name
            , description
            , dbms_lob.getlength(picture) picture
    from
              details
    if possible, i would like to control the size of the picture rendered within the report like say 40*50.For images close to this size it's easy to do this for declarative BLOB images in interactive reports using CSS. Add a style sheet with:
    .apexir_WORKSHEET_DATA td[headers="PICTURE"] img {
      display: block;
      width: 40px;
      border: 1px solid #999;
      padding: 4px;
      background: #f6f6f6;
    }where the <tt>PICTURE</tt> value in the attribute selector is the table header ID of the image column. Setting only one dimension (in this case the width) scales the image with the correct aspect ratio. (The border, padding and background properties are just eye candy...)
    However, scaling large images in the browser this way is a huge waste of bandwidth and produces poorer quality images than creating proper scaled down versions using image tools. For improved performance and image quality, and where you require image-specific scaling you can use the database ORDImage object to produce thumbnail and preview versions automatically, as described in this blog post.

  • Problem using ADF Faces Runtime 11 Library

    Hi All,
    I am trying to use tr:Command link to open a dialogue.
    When i run my application including only the JSP Runtime, JSF 2.0, JSTL 1.2 and Trinidad Runtime 11 Libraries my application seems to work fine and a popup is opened.
    However when i include the ADF Faces Runtime 11 library the popup is opened in the same window as a web page.
    The same problem is also encountered when using tr:table with ADF Faces Runtime 11 library.
    The height of the tr:table changes dynamically with the number of rows displayed but when i include ADF Faces Runtime 11 library a fixed height is displayed for the table.
    I need to include the ADF Faces Runtime 11 library for fetching data from application module.
    Can anyone help me out or explain why this happens.
    I am using Jdeveloper 11G.

    Hi John,
    I am actually migrating a project from JDeveloper 10G to Jdeveloper 11G. As u suggested i have removed the ADF Faces Runtime Library from my classpath and included the ADF Model library. When i run my application i am getting the following exceptions.
    [Running application WebApproval42-11g on Server Instance IntegratedWebLogicServer...]
    [05:22:41 PM] Web Module WebApprovalModelWebApp.war recognized in project WebApprovalModel.jpr
    [05:22:41 PM] Web Module WebApprovalViewWebApp.war recognized in project WebApprovalView.jpr
    [05:22:41 PM] ---- Deployment started. ----
    [05:22:41 PM] Target platform is (Weblogic 10.3).
    [05:22:41 PM] Retrieving existing application information
    [05:22:41 PM] Running dependency analysis...
    [05:22:41 PM] Deploying 3 profiles...
    [05:22:41 PM] Wrote Web Application Module to C:\Users\roshan.lobo\AppData\Roaming\JDeveloper\system11.1.2.0.38.60.17\o.j2ee\drs\WebApproval42-11g\WebApprovalViewWebApp.war
    [05:22:41 PM] Wrote Web Application Module to C:\Users\roshan.lobo\AppData\Roaming\JDeveloper\system11.1.2.0.38.60.17\o.j2ee\drs\WebApproval42-11g\WebApprovalModelWebApp.war
    [05:22:42 PM] Wrote Enterprise Application Module to C:\Users\roshan.lobo\AppData\Roaming\JDeveloper\system11.1.2.0.38.60.17\o.j2ee\drs\WebApproval42-11g
    [05:22:42 PM] Deploying Application...
    [05:22:50 PM] Application Deployed Successfully.
    [05:22:50 PM] The following URL context root(s) were defined and can be used as a starting point to test your application:
    [05:22:50 PM] http://192.168.1.84:7101/WebApproval42-11g-WebApprovalView-context-root
    [05:22:50 PM] http://192.168.1.84:7101/WebApproval42-11g-WebApprovalModel-context-root
    [05:22:50 PM] Elapsed time for deployment: 9 seconds
    [05:22:50 PM] ---- Deployment finished. ----
    Run startup time: 9017 ms.
    [Application WebApproval42-11g deployed to Server Instance IntegratedWebLogicServer]
    Target URL -- http://127.0.0.1:7101/WebApproval42-11g-WebApprovalView-context-root/faces/index.jspx
    <Oct 4, 2011 5:22:51 PM IST> <Error> <HTTP> <BEA-101017> <[ServletContext@23231866[app:WebApproval42-11g module:WebApproval42-11g-WebApprovalView-context-root path:/WebApproval42-11g-WebApprovalView-context-root spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@75795c[
    GET /WebApproval42-11g-WebApprovalView-context-root/faces/index.jspx HTTP/1.1
    Accept: */*
    Accept-Language: en-us
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    Cookie: username=; role=; rolepwd=; datasource=; appName=; terminal=
    ]] Root cause of ServletException.
    java.lang.IllegalArgumentException: null source
         at java.util.EventObject.<init>(EventObject.java:38)
         at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71)
         at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73)
         at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73)
         at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:265)
         Truncated. see log file for complete stacktrace
    >
    <Oct 4, 2011 5:22:51 PM IST> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Oct 4, 2011 5:22:51 PM IST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = Oct 4, 2011 5:22:51 PM IST SERVER = DefaultServer MESSAGE = [ServletContext@23231866[app:WebApproval42-11g module:WebApproval42-11g-WebApprovalView-context-root path:/WebApproval42-11g-WebApprovalView-context-root spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@75795c[
    GET /WebApproval42-11g-WebApprovalView-context-root/faces/index.jspx HTTP/1.1
    Accept: */*
    Accept-Language: en-us
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    Cookie: username=; role=; rolepwd=; datasource=; appName=; terminal=
    ]] Root cause of ServletException.
    java.lang.IllegalArgumentException: null source
         at java.util.EventObject.<init>(EventObject.java:38)
         at javax.faces.event.SystemEvent.<init>(SystemEvent.java:71)
         at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:73)
         at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:73)
         at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:265)
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:251)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101017 MACHINE = Aptbngdst189 TXID = CONTEXTID = 9948ba59687be1d8:18e4db26:132ceba77f1:-8000-0000000000000123 TIMESTAMP = 1317729171443
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    I am not able to figure out as to what is acusing this exception.
    Can u please help me out.
    Note: The application works fine when i include the ADF Face Runtime library but i have the look and feel and popup issues as mentioned earlier.

  • How to save multiple rows using ADF faces ?!

    Hello;
    I am developing a search page using ADF faces (jdeveloper 10.1.3).
    after building my view i dragged it as search form on my page then i dragged it again as a read only table to display results with different iterator.
    I have a field act as a flag with 'Y' and 'N' value so i converted this field in the table to select boolean checkbox.
    what i need is ...
    after processing search operation i want to update this flag by 'Y' or 'N' (select/un-select checkbox) then click on a save button to save all result rows flag with its new status to the data base.
    Wish to know how to implement that.
    Thanks a lot

    Searching this forum yields How to do a bound af:SelectBooleanCheckbox inside of af:Table
    Hope this helps

  • Problem with a example of "Developing and Using ADF Faces Skins"

    Hi, I've tried the example "Developing and Using ADF Faces Skins", but when I run the sample.jspx page and choose the skin "MyCompany" in the select skin I obtain the next message:
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.ui.laf.simple.desktop.SideBarRenderer._getIconData(SideBarRenderer.java:393)
    at oracle.adfinternal.view.faces.ui.laf.simple.desktop.SideBarRenderer.prerender(SideBarRenderer.java:83)
    at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:79)
    Could somebody help me?
    Thanks a lot ;-)

    Hi there,
    I had the same issue last friday.
    It's probably because you are using JDeveloper 10.1.3.2 instead of 10.1.3.0 or 10.1.3.1 for which the example is made.
    I haven't been able to fix this yet, other then by commenting out the this part of the css.
    Luc Bors
    Message was edited by:
    lucbors

  • Validation messages in JSF (when not using ADF faces)

    I've spent some time with JDeveloper 11 and would like to use it on an upcoming project. I have to target IE 6, so I won't be able to take advantage of ADF Faces. Instead I'd like to use the ADF Business Components with a standard JSF interface so it can be used by people still running IE 6.
    I've created a Business Component from a database table and can bind a JSF HTML Creation Form by dragging the appropriate view from the AppModule in the Data Controls pane. However, when I attempt to submit the page without all the fields being valid I get the following validation error message:
    j_id__ctru2:j_id__ctru6: Validation Error: Value is required. j_id__ctru2:j_id__ctru6: Validation Error: Value is required.
    I've tried making this more descriptive, but editing the error message in the Validation Rules section of the Business Component has no effect. What's the best way to convey a meaningful validation message to the user when not using ADF Faces?
    Also - I'm still very new to JDeveloper. Since I won't be able to rely on my users having Internet Explorer 7, would you recommend I stay with JDeveloper 10? The examples and documentation I've seen so far for JDeveloper 11 appear heavily biased towards using ADF Faces so I'm starting to wonder how much support is there for using plain old JSF.
    Thanks for your time!

    Hi,
    if you are completely new to this then I suggest to use JDeveloper 10.1.3 and ADF Faces in there. Its good to use with IE6 as well. Currently we do have more tutorials available for this release than for 11, which for this reason is a better choice for someone new to this
    Frank

  • Problem in Developing and Using ADF Faces Skins sample

    sample.jspx dose not have “Select Skin” box as the document shown.
    I am trying the sample project downloaded from sample WAR file - adffaces_skin.war in article “Developing and Using ADF Faces Skins”.
    In paragraph “Changing the Color Schema of a Skin”
    sample.jspx has a “Select Skin” box to allow user to select “Simple” or “MyCompany”. (in JSP Visual Editor)
    However, it does not show on the project built from downloaded from sample WAR file (adffaces_skin.war).

    After reading the whole document, I realize it is my mistake.
    The box will be created after all user skins setting.
    The sample works.
    Only thing need to remind is for later version Jdeveloper, Application Worksapce in only for early version Jdeveloper. All the version after 10g 1.3 EA1, Only have Application.

  • How to use ADF Faces with struts1.3.8

    Hi
    Can anybody guide us how to use ADF faces with Struts 1.3.8.
    Your help will be appreciated.
    Thanks
    Chetan

    Xpp,
    Have a look at the ADF Developer's Guide for specific instructions on menus (the ADF Developer's Guide for Forms/4GL Developers has the information in section 19.2).
    You can put javascript handlers on the components to get keyboard event handling.
    John

  • Did anybody used ADF Faces with Apache Struts?

    Hi
    Can anybody give some guidelines of how to use ADF Faces with Struts?

    I think you'll get a better answer for this on an iBatis forum.
    I think I knew one customer who used this combination.
    We don't have a specific tutorial that shows you how to use iBatis with ADF Faces, but at the end of the day any of the tutorials we have that shows you how to use POJO or a session facade to front POJO will be applicable to iBatis.

  • JDeveloper popup window using ADF Faces

    Has anyone actually managed to get a popup window working properly using ADF Faces? I have slavishly copied examples from the Developer's Guide, but nothing works - I never get a popup window appearing.

    I'm back again and unfortunately I haven't got this to work. I've scaled down my jsp to just include enough to test the pop-up functionality.
    First here's the code from my jsp page(index.jsp):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <!-- import tag libraries -->
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af" %>
    <f:view>
    <afh:html>
    <afh:head title="JSF Test Pop-up Page">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <meta name="MSSmartTagsPreventParsing" content="true"/>
    </afh:head>
    <afh:body>
    <af:commandLink text="Test Pop-up" action="dialog:test" useWindow="true"/>
    </afh:body>
    </afh:html>
    </f:view>
    and here's a copy of faces-config.xml:
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <application>
    <default-render-kit-id>oracle.adf.core</default-render-kit-id>
    </application>
    <!-- Navigation Rules -->
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>dialog:test</from-outcome>
    <to-view-id>/results.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    According to the docs on ADF Dialog Framework this is all I need to have in place in order for it to work. What am I missing?
    Thanks again to all replies.

  • ADF without using ADF-Faces

    I'm starting a new project and I want to combine the use of ADF without using adf-faces in other words I want to connect to the Oracle data base through ADF while building my own beans.

    Well I'm still having problems with "ADF without using ADF-Faces" so I went back and found documentation:
    Oracle® Application Development Framework
    Developer’s Guide
    10g Release 3 (10.1.3)
    B25386-01
    However I came to point where I was confused with the TopLink documentation on 3.7 Querying Objects where it said:
    You cannot configure the sort criteria of a TopLink query from Oracle JDeveloper. You
    must write a Java method, using descriptor amendment method. See Section 3.3.3.2,
    "Using Amendment Methods" for more information.
    I find this hard to fathom would you not want to sort the dataset on a JSF table?
    The link takes you to a statement that has nothing to do with Sorting.
    Jim

  • Using ADF-FACES wih Apache Geronimo or IBM Websphere-CE?

    If you have used adf-faces with apache geronimo or IBM WASCE, could you share with me the following information:
    1. How you deploy an ear or war file.
    2. The sets of adf-faces jars you used.
    3. Did you put the adf-faces jars in the geronimo repository or sharedLib folder or in your web application WEB-INF/lib.
    4. What are the possible pitfalls and problems to watch out for.
    Please I am looking for response ONLY from people who have practical experiences of deploying adf projects to apache geronimo or IBM WASCE. 
    Thanks in advance.

    Hi,
    Did you tried keeping the jsf and jstl api and implementation jar files in your Web application and change the classloader order to parent last ?
    Regards,
    Catalin

  • ADF FACES: HTML template text Layout is broken when uses ADF Faces tags

    This works fine:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
    </head>
    <body>
    <h:form>
    <table border="1">
    <tr>
    <td width="45%">
    <h:dataTable rows="5" bgcolor="Red" value="#{class1.names}" var="name">
    <h:column>
    <h:outputText value="#{name}"/>
    </h:column>
    <h:column>
    <h:outputText value="#{name}"/>
    </h:column>
    </h:dataTable>
    </td>
    <td width="55%">
    <h:inputText/>
    </td>
    </tr>
    </table>
    </h:form>
    </body>
    </html>
    </f:view>
    => a table is rendered with one row and two columns; in the first column the data table is rendered in the second the inputText
    Changing to ADF Faces tags breaks the layout:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/EA11" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/EA11/html" prefix="afh"%>
    <f:view>
    <afh:html>
    <afh:head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
    </afh:head>
    <afh:body>
    <af:form>
    <table border="1">
    <tr>
    <td>
    <af:table rows="5" value="#{class1.names}" var="name">
    <af:column>
    <h:outputText value="#{name}"/>
    </af:column>
    <af:column>
    <h:outputText value="#{name}"/>
    </af:column>
    </af:table>
    </td>
    <td>
    <h:inputText/>
    </td>
    </tr>
    </table>
    </af:form>
    </afh:body>
    </afh:html>
    </f:view>
    => at the begin of the page an empty table is rendered; below the data table is rendered and below the inputText
    It think it should be possible to layout the page with HTML template text and use ADF Faces tags.

    As of EA12 (and EA13) <afh:body> is what is known as a "rendersChildren" tag. It needs to do so in order to support partial-page rendering This means that template text inside it needs to be wrapped inside <f:verbatim>.
    For later releases of ADF Faces, I've filed an enhancement request to loosen up this restriction for <afh:body>.

Maybe you are looking for

  • Can't find where to add formulas to a table in Pages 5

    I have a Pages 09 document with tables set up to track assignments and point values for the classes I teach. I prefer to work in Pages and not Numbers because of some page formatting issues. I used to be able to highlight point values in a column and

  • Solaris 8: 32/64-bit installation

    Could anybody give me any ideas whether it is necessary to include 64-bit support during the installation? Thanks. LL

  • Metric Paper Size Defaults

    I have two OfficeJet Pro 8500's and an OfficeJet 7000 that I purchased in the UK (two of them are less than 6 months old. I am frustrated that I cannot get the printers to default to metric paper sizes. I can create metric shortcuts, but I cannot rem

  • Reader 8.1.2 hangs on File Open menu

    My Acrobat Reader was upgraded to 8.1.2 last week. The program works fine if I open a PDF file by double-clicking on the name in a Windows Explorer window. However, the program hangs when I try to use the File Open menu. I have to use Task Manager to

  • How to remove excise entry from excise register J2I9

    Dear Experts,           I reverse the excise entry(which was posted by j1iex) through J1IH (other adj.) Now I want to remove the excise entry from excise register (J2I9). Regards Sanjay Verma