Equivalent of POST_COMMIT in BC4J

In Oracle Forms there is the post-commit trigger. In it we write code that needs to be called after records have been committed to the database. How do we achieve the equivalent functionality in BC4J using JDEV 3.1?
I tried to put the code in the doDML method but that creates all kinds of problems like 'ANOTHER USER HAS CHANGED THE ROW...' etc.
Ideas appreciated!

Steve,
Sounds like you need to talk to Brian. Some of what I'm discussing is related to the "friction" between "layers" I keep referring to. What you'd think would be easy to do isn't.
If I "commit" using the navigation bar there is no "after" event unless I reverse engineer how everything is put together and set up some sort of event listener... OR I replace the navigation bar with my own code.
Your statement about subscribing to events is very valid... but it is empirically obvious that what is available and how to set up these traps are non-obvious to folk who've been to Oracle classes, read the documentation and are busy trying to build their applications. Each time I need to do something along these lines I go hunting through the class docs, guessing at the appropriate classes and interfaces to look at, and guessing as to which methods are affected, and where to put the code, appropriately and safely.
Again, obvious to you and some Oracle staff.. but archane and obscure to much of the rest of the universe.
null

Similar Messages

  • Equivalent for CLEAR_BLOCK in BC4J?

    Hello,
    is there a way to clear the data on a view object? This is what CLEAR_BLOCK does in Forms.
    I have a JTable with a JUTableBinding and I would like to clear the table. I could use a query that returns nothing, but I'd rather to do without a database query.
    Thanks,
    Harry

    I'm looking for a way to get vo.clearCache() to work. (in essence, I'm also looking to reset the screen contents)
    Here's the situation: (JDev 9.0.3.3 with a JClient application)
    I open a form and perform executeQuery() on the form's viewobject.
    Next, I modify some data. But in stead of performing a rollback, I want to simply clear the viewobject, so that it will contain the data which is still in de database.
    When I press a button, which calls vo.clearCache() and vo.executeQuery(), nothing happens!
    Am I doing something wrong? Why doesn't vo.clearCache work like I expect it to?
    Any help will be appreciated.

  • BC4J/JSP:Foreign Keys:Read Only Renderers

    I've read and implemented all of the Renderers in the Renderer how to document. I've also read 8 pages of postings to this forum regarding renderers and LOVs. And I've read reams of BC4J class documentation.
    Though the EditRenderer that does a lookup via a SQL query works well, there is no equivalent Read-only (via a SQL query) Renderer example.
    I have tried to use the examples to create a Read-only (SQL based) Renderer but I haven't had much luck.
    The closest I got to a solution was an indicator that another poster accomplishes this by modifying the generated JSP. This is clearly the wrong place to implement this functionality (doesn't allow for code re-use).
    I was also able to use the DynamicEditRenderer as a Read-Only Renderer but that would confuse my users and create bugs.
    It was my idea that you shouldn't have to define the SQL and that you could use existing BC4J classes to lookup the friendly FK value. I looked through the XML files for View Objects and View Links and saw all the information required to do this. A smart person (obviously much smarter than me), should be able to create a read-only and Edit Renderer that doesn't require a SQL property or the PK or column properties (use the UK from the db).
    Does someone have an example of a Read-Only, SQL based, Renderer? Better, has someone written a generic renderer that can track back through View Links to find the UK in the lookup table?
    This is incredibly basic functionality that I'm surprised is missing from JDeveloper.
    Please help.
    Thanks, George

    You are not going to find an 'exact' match in our existing classes. The rednering HOWTO(http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html) provides enough information for implementing your readonly lookup field. If you look at the first renderer in this document, it uses a static lookup list. You can easily use a secondary view object for your lookup values. Here is the code from that document:
    package myrenderers;
    import oracle.jdeveloper.html.ReadOnlyField;
    import oracle.jbo.Row;
    import oracle.jbo.AttributeDef;
    import java.util.StringTokenizer;
    public class ListFieldRenderer extends ReadOnlyField
    public ListFieldRenderer()
    public String renderToString(Row row)
    setValueFromRow(row);
    AttributeDef aDef = getAttributeDef();
    String sAttrValue = getValue();
    String sList = (String)aDef.getProperty("DISPLAY_LIST");
    if(sAttrValue != null && sList != null)
    StringTokenizer tokens = new StringTokenizer(sList, ",", false);
    while(tokens.hasMoreTokens())
    String sEntry = tokens.nextToken();
    String sValue = sEntry.substring(sEntry.indexOf('=') + 1);
    String sKey = sEntry.substring(0, sEntry.indexOf('='));
    if(sKey.equals(sAttrValue))
    return sValue;
    return super.renderToString(row);

  • Urgent Pls - Using BC4J Intermedia tags

    Hi,
    I am using BC4J Intermedia tag EmbedImage to display images stored in Databases. When I try to display I get only a blank picture equivalent to the size of the image and not the image itself. The type of the image is JPG. The Image datatype in the database is ORDSYS.ORDIMAGE.
    Is it to do something with the project settings? I am using Oracle 9.0.3 version of JDeveloper.
    Any help is appreciated.
    Thanks
    Priya

    Right, that's because the oracle.ord.html.URLBuilder class builds the URL for the images by using the current JSP directory level.
    For example: if your JSP page that uses <jbo:EmbedImage> is located under http://hostname.com/contextRoot/mydir/. Then the generated URL for the image will be http://hostname.com/contextRoot/mydir/ordDeliverMedia?....
    But in web.xml, the <url-pattern> element defines the url pattern value, which by default is "/ordDeliverMedia". So the media delivery servlet only handles the requests like these: http://hostname.com/contextRoot/ordDeliverMedia?...
    So, in order to make your sample work, you need to modify the web.xml in your project. There are two alternatives:
    1. Change the <url-pattern> element to this:
    <url-pattern>/kerfisumsjon/ordDeliverMedia</url-pattern>
    This will correctly handle the JSPs located under kerfisumsjon.
    Or
    2. Change the <url-pattern> element to this:
    <url-pattern>*ordDeliverMedia</url-pattern>
    This will handle any requests for ordDeliverMedia regardless of their directory location.
    Hope this solves your problem.
    Richard

  • BC4J, uiXML and SSO

    Can someone please point me in the direction of some documentation on how to integrate SSO with a uiXML/BC4J project ?
    Can you achieve the same logon page as portal where users can also change their password ?
    Also, if using Jakarta Struts, does the SSO replace some of the struts functionality with regards to authentication ?
    One last thing - is it possible to display a uiXML page as a porlet within Portal ? Is this acheived through usind PDK ? If someone could point me to some specific documentation on this also it would be appreciated !
    Thanks,
    Brent

    Hi Brent -
    Can someone please point me in the direction of some
    documentation on how to integrate SSO with a
    uiXML/BC4J project ? I recently responded to a similar question on the JDev forum:
    How do I secure uiXML with Oracle SSO Server
    I believe you've got two options here... You can use MOD_OSSO to secure the entire application at the Apache level. Or, you can take advantage of the SSO Java APIs to authenticate users directly within your own application - in which case your application is considered a "partner application" to the login server. We don't have any UIX-specific samples for this - but the following sample from the SSO Application Developer's Guide should help get you started:
    http://otn.oracle.com/docs/products/ias/doc_library/1022doc_otn/portals.102/a90343/examples.htm#1004074
    Can you achieve the same logon page as portal where
    users can also change their password ?I'm not sure whether this functionality (ability to change passwords) is implemented by Portal or whether it is something that is provided by the SSO server - so unfortunately I'm not sure what to recommend here...
    Also, if using Jakarta Struts, does the SSO replace
    some of the struts functionality with regards to
    authentication ?I haven't really had a look at the authentication capabilities provided by Struts. By I'm guessing that if you are using SSO for authentication, then yes, this would take the place of equivalent functionality provided by Struts.
    One last thing - is it possible to display a uiXML
    page as a porlet within Portal ? Is this acheived
    through usind PDK ? If someone could point me to some
    specific documentation on this also it would be
    appreciated !I couldn't find any specific documentation on this. My recommendation would be to set up your UIX application as you would for normal deployment, and then create a simple Servlet-based portlet running in the same web application which simply forwards all requests to the UIX servlet. So then this becomes a matter of figuring out how to set up a portlet which forwards to another servlet - hopefully the PDK documentation explains how to do this...
    Andy

  • Suggested Migration Path (BC4J/Struts - ?)

    We built a BC4J/Struts apps a couple years back closely modeled after the BC4J ToyStore. It has been quite successful for us. However, I'm feeling like its technology stack is a bit dated, and would like some suggestions on bringing it more current.
    BC4J (ADF) has been pretty solid for us, so I'm thinking of sticking with that instead of considering something else (Toplink, Hibernate, JPA, ...).
    It would be cool to hear from others who were/are in a similar situation, and what they decided to do (tips, tricks, lessons learning from the trenches, ...). Thank you.
    - Matt

    I've worked in situations like this.
    Personally, I think that if ADF BC/BC4J is working for you, there's no need whatsoever to migrate away from it. I imagine some might disagree with me on this, though.
    The logical successor to Struts is JSF--since you're working in ADF, you'd probably want to use the ADF Faces components. Here, so far as I can tell, is the deal:
    1) The UIX -> Faces migration utility is pretty smooth, unless you made heavy use of .uit templates. There's no equivalent in Faces, so you'll have to drop what was previously template code into place on your individual faces pages.
    2) Moving from Struts to Faces...well, it depends on how heavily you used Struts, beyond the declarative bit. The declarative part is pretty easy to duplicate, but migrating controller code you've written in Struts over to Faces is manual, and in my experience not always 100% smooth. There isn't, for example, a clear action/page separation, so you'll need to find something to do with code you had written in Struts Actions and DataActions.
    Desppite these hurdles, I'd still recommend making the switch--the ADF Faces components are in many ways a big improvement over UIX components.

  • JD3.2; BC4J; JSP; logging out connections

    We have developed user connections by building on Juan's application pool example
    [href] http://technet.oracle.com:89/ubb/Forum2/HTML/006025.html
    [href]
    But we would like to be able to log users out. Is there a way of doing this cleanly?
    We would like to present the users with a log-out button that resolves any uncompleted transactions, closes down the session and frees any outstanding database locks.
    The biggest single problem we have with BC4J on the database is that it doesn't tidy up its locks if the transaction fails for any reason. And given that JServ only supports Servlet API 2.0 session failures happen all too frequently.
    There seems to have been a couple of postings on this issue, but no replies for the JDev team.
    rgds, APC

    public void setReleaseApplicationResources(boolean release){
    m_rsBrowser.setReleaseApplicationResources(release);
    }the last thing i do in the render method of the RS bean is: m_rsBrowser.render(); which in turn the last thing this bean do is: releaseApplicationResources(); so my code is equivalent to the recomendation you did.
    but ph is subclassing ViewCurrentRecord so the equivalent of your recomendation is:
    ph.render();
    RS.render();
    ph.setReleaseApplicationResources(true);
    ph.releaseApplicationResources();
    Right? I did it this way and throws me the same error.
    Q. remains:
    1)What does mean the Error Message: Component object XXXX has no parent?
    2) Under what circumstances the previous error throws?
    3) How I can recover my application from this error?
    4) is My application is going to degrade?(i've changed all the setReleaseApplicationResources to false) to make it work.
    Thank you for your interest. Help please.

  • JDeveloper 9.0.5 and creating JSP for Business Components (BC4J)

    Hi,
    We've been creating Web applications from our BC4J projects quite happily using JDeveloper version 9.0.3 using the option on JSP for Business Components under the Web Tier Category. Recently we've been looking at version 9.0.5 and this option doesn't exist anymore. Does anyone know what the equivalent in 9.0.5 is to achieve this automated production of web applications.
    Regards

    Catherine,
    This wizard no longer exists in JDeveloper 10g.
    We found that in the overwhelming majoring of cases, developers would use the wizard to generate a number of pages and then "hit a wall" because they didn't understand how to evolve the applications to do something more close to what they really wanted. The results produced didn't lend themselves well to iterative modification, which in the end is what the bulk of application development ends up being.
    In JDeveloper 10g, the developer builds up pages and ties them together in a less fully-automated way, but in a way that means encourages the interative and consistent "RAD" approach using visual editor, property palette, code editor, and structure window.

  • JBO:33001 bc4j.xcfg file not found in class path

    Hi,
    I am yet another victim of the age-old error JBO:33001 bc4j.xcfg file not found in class path, When i have my BC4JApp.jar in Tomcat Web-inf/lib directory. All the other jar files and class files in my webserver-application web-inf classes and lib directory works.
    But Tomcat server is not able to read this bc4j.xcfg file. I can see in my jar file that this bc4j.xcfg exists and in the specified package directory. still the problem persists. My BC4JApp.jar is perfectly working when i use JDeveloper. but not when i use tomcat4.0 and call a JSP using BC4JApp.jar from browser (My environment is Jdeveloper3.2, Tomcat4.0+IIS in middle tier and oracle 8i as DB, everything on windows2k)
    I have gone through almost all the threads possible that relates to this error in this form. None of them have a answer except to say "put the file in classpath". and last reply is "will fix in jDeveloper 9i. So what happens to us who are working in Jdeveloper 3.2?
    1. I have this file in my jar file.
    2. I also tried creating a seperate directory manually, with the same name as my package under web-inf/classes, web-inf/lib , just under web-inf directory and atlast under approot directory also. I tried having my package directory containing bc4j.xcfg in these folders one at a time and also tried having this directory in all these folders at the same time.
    Still no solution.
    Itz frustrating that neither proper documentation nor a right url page nor i am aware of available addressing this. page links given in above threads only gives me the wonderful page of ie's "Page cannot be displayed".
    Is there a answer to this error and my problem. If this doesn't work, then i have to all the way develop from scratch creating my jsp using JDBC calls and Stored packages etc.
    I don't want to give up on this Jdeveloper at this final moment because if this bc4j.xcfg file is found, my application will work perfectly. on these final moments, if this doesn't work, i am frightened to imagine to develop my application in standard way. Atlast, if thatz the option left,we have to do that bcos our production date is close by.
    Please can some one in this forum or Jdeveloper help me to solve this problem. I am desperate and very urgent.
    Waiting for a reply from Jdev team very much...
    ( I just posted in the other thread which is pretty old, dated backto May 2001, which was relevant to this error. Just to make sure it is noticed, I am posting it seperately too)
    Thanks
    Hari(2/3/02)

    Hi All,
    For those who are following this thread, I got a solution for this error with the help of Jdev Team.
    This solution may work, if you have deployed your application in Tomcat4.0.1. This is the environment in which I work and tested.
    As you may be aware, Tomcat ignores value in CLASSPATH variable.
    To see any files that are existing or newly deployed, it has it own way of detecting it.
    Addition information on Tomcat working, you can follow this link,
    http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html
    Coming to point, Tomcat has got five classloaders and each classloader invoked, looks in their related directories for files in following order.
    1. /WEB-INF/classes of your web-application
    2. /WEB-INF/lib/*.jar of your web application
    3. BootStrap classes of your JVM (Tomcat's $JAVA_HOME/jre/lib/ext)
    4. System class loader classes($CATALINA_HOME/bin/bootstrap.jar,CATALINA_HOME/lib/tools.jar)
    5. $CATALINA_HOME/common/classes
    6. $CATALINA_HOME/common/lib/*.jar
    7. $CATALINA_HOME//classes
    8. $CATALINA_HOME/lib/*.jar
    So All your individual application related files should be deployed in your application's WEB-INF/classes or WEB-INF/lib directory accordingly.
    If your application files are unpacked, they should be deployed or copied under WEB-INF/classes directory
    if the files are within a jar, they should be under WEB-INF/lib directory.
    If your Jar-files contains bc4j components, then those jar files should be deployed under WEB-INF/lib directory. Also,do the next step to copy all relavant BC4J runtime libraries under lib directory.
    IMPORTANT: Please remember to copy and paste all the required BC4j runtime libraries in the Same WEB-INF/lib directory along with your application jar files. This is the real reason which can solve this JBO:33001 to disappear. It worked for me.
    To configure your directory for tag-lib uri's, use web.xml to set the taglib-uri attribute.
    Put your web.xml and DataTags.tld in the WEB-INF directory.
    Your simple web.xml may look like as follows.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <taglib>
              <taglib-uri>
                   /webapp/DataTags.tld
              </taglib-uri>
              <taglib-location>
                   /WEB-INF/DataTags.tld
              </taglib-location>
         </taglib>
    </web-app>
    You may then modify this web.xml to suit further requirements of your application.
    Remember to stop and restart the Tomcat Server (service) by using shutdown and startup scripts after updating any jar files/class files/ JSP or source files deployed in Tomcat.
    Sometimes, only this helps even though your context's reloadable attribute is set to true in Tomcat Server's server.xml file.
    Hope this above information helps you to solve this error in Tomcat environment. My Sincere thanks once again to Juan and Jdev team for their help and efforts to solve this problem.
    Thanks
    Hari

  • Error while opening BC4J objects in Jdev 10G

    I downloaded the jdev 10.1.3.3 version , copied the entire JAVA_TOP files to myclasses on my local machine. In the project content property i gave the path to myprojects.
    In the include section i included only oracle\apps\ego since these are the only files i need to modify.
    Now when I right click on one of the EOs in jdev, i get an error message that there are java errors in the underlying EOImpl.java and the wizard will open read only.
    I did not modify any files. These are all oracle shipped files. This happens with a few other objects. I am able to open some of the BC4J objects but some of them give me this error mesage.
    When I build the project , i do not see any errors, I am even able to run a page.
    What is wrong here. is it some missing library or do i need to include additional files/folders .. Please help
    thanks,

    I deleted the class files from myprojects and tried opening the EO but that din't help. I created a new project after deleting all the class files, even now i get the same error.
    I wonder if reinstalling jdev will solve the issue? I have only xml files in the myprojects folder but i keep getting the same message that there exist errors in the .java file under the myprojects folder.
    I'm not sure what's going on. Is there some cache that jdev is looking at.

  • DID YOU KNOW?: Debugging with BC4J Tester

    Did you know that in JDeveloper 3.2, you can run the BC4J tester in debug mode to exercise your business components and hit breakpoints at the same time?
    Just do the following:
    [list]
    [*]Expand the navigator node for your Application Module, revealing its XML and Java implementation files.
    [*]Right-mouse on the YourAppModImpl.java file, and select Debug...
    [list]
    By default, it will debug using the "local mode" connection configuration. If you want it to debug using a difference configuration, just change the configuration name that appears as the 2nd argument in the launchTester call in the main() method of the application module implementation file.

    grin Thanks, Steve.
    Does this mean that in JDev 5.0 we're going to see an animated Steven Muench head in a tiny window in the lower corner, occassionally tapping on the glass to offer us hints?

  • Equivalent of MS Access First Function in SQL for Group By

    We previously had an Access database performing operations. We are now converting it over to SQL. There are queries in Access that use the "First" function to insert data, which I have not been able to find the equivalent to in SQL. Below is an
    example showing the data used, the SQL syntax and the results that it would produce.
    tbl_Data
    FirstN LastN CustNum TDate SalesPer
    Jim Smith 11111 5/10/2014 Jim Johnson
    Sally Jones 22222 5/12/2014 Alan Brown
    Sally Jones 22222 5/10/2014 Ben Doers
    Jim Smith 11111 5/12/2014 Jim Johnson
    Frank Oliver 33333 5/15/2014 Jim Johnson
    Results to be inserted into tbl_Main
    FName LName CustID TransDate SalesPerson
    Jim Smith 11111 5/10/2014 Jim Johnson
    Sally Jones 22222 5/10/2014 Ben Doers
    Frank Oliver 33333 5/15/2014 Jim Johnson
    Below is the SQL that will produce this
    INSERT INTO tbl_Main ( FName, LName, CustID, TransDate, SalesPerson)
    SELECT td.FirstN, td.LastN, td.CustNum, First(td.TDate) As SellDate, First(td.SalesPer) As SP
    FROM tbl_Data td
    GROUP BY td.FirstN, td.LastN, td.Cust;
    If anyone could assist me in an alternative that I could use in SQL to yield the same results, I'd appreciate it.

    tbl_Data
    FirstN LastN CustNum TDate SalesPer
    Jim Smith 11111 5/10/2014 Jim Johnson
    Sally Jones 22222 5/12/2014 Alan Brown
    Sally Jones 22222 5/10/2014 Ben Doers
    Jim Smith 11111 5/12/2014 Jim Johnson
    Frank Oliver 33333 5/15/2014 Jim Johnson
    Results to be inserted into tbl_Main
    FName LName CustID TransDate SalesPerson
    Jim Smith 11111 5/10/2014 Jim Johnson
    Sally Jones 22222 5/10/2014 Ben Doers
    Frank Oliver 33333 5/15/2014 Jim Johnson
    Below is the SQL that will produce this
    INSERT INTO tbl_Main ( FName, LName, CustID, TransDate, SalesPerson)
    SELECT td.FirstN, td.LastN, td.CustNum, First(td.TDate) As SellDate, First(td.SalesPer) As SP
    FROM tbl_Data td
    GROUP BY td.FirstN, td.LastN, td.Cust;
    As an aside that query is not correct in Access -  because you did not specify an ORDER BY the resultset has no particular order so you could get either row for Jim or Sally.
    It's a bit of a tricky one as it may on the surface appear that the resultset is always returned in a consistent order but this is not guaranteed (not in Access and certainly not in SQL server)

  • Diff b/w bc4j model and ejb model in adf11g

    hi all,
    iam murali iam new for adf 11g i have some dout's in adf11g ,can u please solve my probleam
    what is the difference b/w bc4j componet and ejb componet,how to develop ejb application in adf11g.

    ,how to develop ejb application in adf11gTake a look at this tutorial for starters:
    http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/ejb/ejb.html

  • Is there a logic:match equivalent for JSTL?

    In a search page I execute a query which returns an array of objects (All objects are of the same object type and are cast to Object[]) and each object has many attributes. I tried using <logic:iterate>, but I was never successful in having it display any results. I believe this had something to do with the entire array being passed via session scope instead of just one record and me not specifying it properly with <logic:iterate>. I was able to successfully use <c:forEach> and it worked right away. I stuck with using that because of its "just works" ability in addition to using a lot of other JSTL code. However, one of the attributes that is being printed out needs to be parsed and is of the form "Yxxx". <logic:match> covers this very nicely, but when I specify it in the below code it is not able to find my variable in any scope.
    <c:forEach var="myResults" items="${sessionScope.result}" varStatus="status">
        <logic:match parameter='${myResults}' property='pin' value='Y'>
            <c:out value="Preeti"/>
        </logic:match>
    </c:forEach>I have done several google searches, but I haven't found a JSTL equivalent for <logic:match>. If there is one could someone please tell me what it is? In addition, although <logic:match> is great I still need to print out a substring of that attribute. Could someone tell me how to do that? If this is not possible could someone please tell me if its possible to use <logic:iterate> with an array of objects like I was attempting to do initially so that I could use <logic:match> at least?
    Thanks to all of you for your time.

    Yes you can use the logic:iterate tag. I think you have to specify the type of the exposed variable though. I prefer the forEach loop.
    I think you are using the wrong attribute in the logic:match tag. You should be using the "name" attribute rather than "parameter"
    Parameter attribute refers you to a request parameter, and I pretty sure you don't want that.
    So given the collection of objects in the session attribute "result"
    This should loop through them all, and see if they start with the letter 'Y'
    <c:forEach var="myResults" items="${sessionScope.result}" varStatus="status">
        <logic:match name='myResults' property='pin' value='Y'>
            <c:out value="Preeti"/>
        </logic:match>
    </c:forEach>As for the latter bit, are you using a JSP2 container and JSTL1.1? It would appear so seeing as you are trying to use EL expressions in the logic:match tag.
    If so, you could make use of the JSTL function library:
    <c:forEach var="myResults" items="${sessionScope.result}" varStatus="status">
       <c:if test='${fn:startsWith(myResults.pin, "Y")}'>
          <c:out value="${fn:substring(myResults.pin, 1, -1)}"/>
        </c:if>
    </c:forEach>And I've just spotted a very cool function in there: substringAfter
    <c:forEach var="myResults" items="${sessionScope.result}" varStatus="status">
          <c:out value='${fn:substringAfter(myResults.pin, 'Y')}'/>
    </c:forEach>Cheers,
    evnafets

  • What is equivalent of JInternalFrame in JavaFX 2.0?

    what is equivalent of JInternalFrame in JavaFX 2.0?
    Actually I want to use pure javaFX 2.0 to view report created in iReport 5.0.0.
    I have used java.swing code, and now I want to use pure javaFX 2.0.
    My code in swing is as follows
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package reports;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.HashMap;
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.view.JRViewer;
    * @author TANVIR AHMED
    public class ReportsViewer extends javax.swing.JInternalFrame {
    * Creates new form MyiReportViewer
    private ReportsViewer()
    super("Report Viewer",true,true,true,true);
    initComponents();
    setBounds(10,10,600,500);
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    public ReportsViewer(String fileName)
    this(fileName,null);
    public ReportsViewer(String fileName,HashMap parameter)
    this();
    try
    /* load the required JDBC driver and create the connection
    here JDBC Type Four Driver for MySQL is used*/
    //Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "invoice", "item");
    //Connection con=DriverManager.getConnection("jdbc:mysql://localhost/inventory","root","karim");
    /*(Here the parameter file should be in .jasper extension
    i.e., the compiled report)*/
    JasperPrint print = JasperFillManager.fillReport(
    fileName, parameter, con);
    JRViewer viewer=new JRViewer(print);
    Container c=getContentPane();
    c.setLayout(new BorderLayout());
    c.add(viewer);
    catch(SQLException sqle)
    sqle.printStackTrace();
    catch(JRException jre)
    jre.printStackTrace();
    * This method is called from within the constructor to initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is always
    * regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 394, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 290, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    // Variables declaration - do not modify
    // End of variables declaration
    and
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package reports;
    import java.beans.PropertyVetoException;
    * @author TANVIR AHMED
    public class MainUI extends javax.swing.JFrame {
    * Creates new form MainUI
    public MainUI() {
    super("REPORTS");
    initComponents();
    setSize(java.awt.Toolkit.getDefaultToolkit().getScreenSize());
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jMenuItem1 = new javax.swing.JMenuItem();
    desktopPane = new javax.swing.JDesktopPane();
    salesTaxInv = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    supplyRegister = new javax.swing.JButton();
    PartyLedger = new javax.swing.JButton();
    menuBar = new javax.swing.JMenuBar();
    jMenuItem1.setText("jMenuItem1");
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    desktopPane.setBackground(new java.awt.Color(255, 204, 0));
    desktopPane.setBorder(new javax.swing.border.MatteBorder(null));
    desktopPane.setForeground(new java.awt.Color(255, 0, 102));
    desktopPane.setAutoscrolls(true);
    desktopPane.setFont(new java.awt.Font("Bookman Old Style", 0, 14)); // NOI18N
    desktopPane.setPreferredSize(new java.awt.Dimension(1024, 768));
    salesTaxInv.setBackground(new java.awt.Color(255, 255, 255));
    salesTaxInv.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
    salesTaxInv.setForeground(new java.awt.Color(204, 0, 0));
    salesTaxInv.setText("Sales Tax Invoice");
    salesTaxInv.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    salesTaxInvActionPerformed(evt);
    salesTaxInv.setBounds(20, 53, 200, 31);
    desktopPane.add(salesTaxInv, javax.swing.JLayeredPane.DEFAULT_LAYER);
    jLabel1.setFont(new java.awt.Font("Bookman Old Style", 0, 24)); // NOI18N
    jLabel1.setForeground(new java.awt.Color(50, 72, 255));
    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setText("Invoice System Reports");
    jLabel1.setBounds(0, -1, 1024, 50);
    desktopPane.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
    supplyRegister.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
    supplyRegister.setForeground(new java.awt.Color(204, 0, 0));
    supplyRegister.setText("Supply Register");
    supplyRegister.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    supplyRegisterActionPerformed(evt);
    supplyRegister.setBounds(20, 100, 200, 30);
    desktopPane.add(supplyRegister, javax.swing.JLayeredPane.DEFAULT_LAYER);
    PartyLedger.setFont(new java.awt.Font("Bookman Old Style", 1, 18)); // NOI18N
    PartyLedger.setForeground(new java.awt.Color(204, 0, 0));
    PartyLedger.setText("Party Ledger");
    PartyLedger.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    PartyLedgerActionPerformed(evt);
    PartyLedger.setBounds(20, 140, 200, 30);
    desktopPane.add(PartyLedger, javax.swing.JLayeredPane.DEFAULT_LAYER);
    setJMenuBar(menuBar);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(desktopPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    private void salesTaxInvActionPerformed(java.awt.event.ActionEvent evt) {                                           
    try
    ReportsViewer myiReportViewer = new ReportsViewer("reports/INV.jasper");
    myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
    myiReportViewer.setVisible(true);
    desktopPane.add(myiReportViewer);
    myiReportViewer.setSelected(true);
    catch (PropertyVetoException pve)
    pve.printStackTrace();
    private void supplyRegisterActionPerformed(java.awt.event.ActionEvent evt) {                                              
    try
    ReportsViewer myiReportViewer = new ReportsViewer("reports/supplyRegister.jasper");
    myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
    myiReportViewer.setVisible(true);
    desktopPane.add(myiReportViewer);
    myiReportViewer.setSelected(true);
    catch (PropertyVetoException pve)
    pve.printStackTrace();
    private void PartyLedgerActionPerformed(java.awt.event.ActionEvent evt) {                                           
    try
    ReportsViewer myiReportViewer = new ReportsViewer("reports/CustomerLedger.jasper");
    myiReportViewer.setBounds(0, 0, desktopPane.getWidth(), desktopPane.getHeight());
    myiReportViewer.setVisible(true);
    desktopPane.add(myiReportViewer);
    myiReportViewer.setSelected(true);
    catch (PropertyVetoException pve)
    pve.printStackTrace();
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MainUI().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton PartyLedger;
    private javax.swing.JDesktopPane desktopPane;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JButton salesTaxInv;
    private javax.swing.JButton supplyRegister;
    // End of variables declaration
    Best Regards

    Dear Sir,
    I am using the swing code and running the jasper report with the above code.
    Realy!
    I start the thread with this code
    @FXML
    private void mainUiButtonAction(ActionEvent event) {
    try{
    new MainUI().setVisible(true);
    catch(Exception ex){                 
    }

Maybe you are looking for

  • Lost Mail and Address Book ikons from HD

    Preparing to upgrade to Tiger OX 10 from Panther. Recommended backup all vital info. In transfer process, both Mail and Address Book ikons from HD to backup Superdisk repeatedly came up Error 50. Only success was to lose both ikons from HD and Questi

  • How do I save more than 1 page at a time?

    <blockquote>Locking duplicate thread.<br> Please continue here: [/questions/836178]</blockquote> I've tried this before, and lost it every time. Forget about it.

  • How to integrate nakisa in to poral 7.0?

    Hello all Can you guide me how to integrate nakis with sso in  Portal 7.0? I want to integrate  following application in portal with usermapping. In ESS: OrgChart The URL for iView: http://192.168.215.78/OrgChart/default.aspx In MSS: OrgModeler The U

  • Not able to import .motn files into FCP

    For some reason I'm not able to import .motn files into FCP. While in FCP, I use "send to motion" and uncheck the embed box. After motion opens and I add my motion content, I get the following error when trying to import the .motn file back into FCP

  • ISE 1.3 px grid

    I am planning to upgrade to ISE 1.3 and learn that we have a new persona pxgrid. Can any one pls tell what pxgrid exactly does and any implementation advise will be very helpful