Problem using View Object in Java

I am creating a simple Java class to use a view object (companiesView)that I created and tested in JSP with the following code:
String where="EID = " + eid;
companyAppModuleImpl cam=new companyAppModuleImpl();
CompaniesViewImpl cv=cam.getCompaniesView1();
cv.setWhereClause(where);
cv.executeQuery();
RowSet rs= cv.getRowSet();
return rs.first().getAttribute("Name").toString();
I got
java.lang.NullPointerException
at setWhereClause
What step(s) did I miss?
If you know where I can find such samples, please let me know.
Thank you.

Hi,
You cannot instantiate an application module using the new operator. You have to use the Configuration class. I quote this from the JDeveloper help.
<quote>
Use the method oracle.jbo.client.Configuration.createRootApplicationModule().
Pass this method the package-qualified name of your application module and the name of the configuration you want to use. For example, to instantiate OnlineOrders.OnlineOrdersModule in local mode, you would use: ApplicationModule myAM = Configuration.createRootApplicationModule("OnlineOrders.OnlineOrdersModule", "OnlineOrdersModuleLocal");
</quote>
Hope that helps.

Similar Messages

  • Problem using view objects

    i am new on jdeveloper. i can define objects in model. i can define objects in view controller. but i can't use model-objects from the view controller. what is the right way to do it?

    Have you already been through all of our examples, tutorials, and documentation available at:
    http://otn.oracle.com/products/jdev
    ??

  • Getting error while importing metadata using View Objects

    Hi All,
    I am trying to create a repository using View Object in OBIEE 11.1.5.1 but getting error while viewing the data, after importing the metadata in the repository "[nQSError: 77031] Error occurs while calling remote service ADFService11G. Details: Runtime error for service -- ADFService11G - oracle/apps/fnd/applcore/common/ApplSession".
    I am also getting error "žADFException-2015: The BI Server is incompatible with the BI-ADF Broker Servlet: BI Server protocol version = null, BI-ADF Broker Servlet protocol version = 1" during testing my sample which is deployed to Admin server. I followed BI Adminstrator help file guide in order to create the sample for creating repository using view object.
    Admin server log says
    [2011-09-27T02:59:03.646-05:00] [AdminServer] [NOTIFICATION] [] [oracle.bi.integration.adf] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: b260b57746aa92d3:-1f9ca26:1328fcfd3e6:-8000-0000000000006744,0] [APP: BIEEOrders] [[
    QUERY:
    <?xml version="1.0" encoding="UTF-8" ?><ADFQuery><Parameters></Parameters><Projection><Attribute><Name><![CDATA[Deptno]]></Name><ViewObject><![CDATA[AppModule.DeptViewObj1]]></ViewObject></Attribute><Attribute><Name><![CDATA[Dname]]></Name><ViewObject><![CDATA[AppModule.DeptViewObj1]]></ViewObject></Attribute><Attribute><Name><![CDATA[Loc]]></Name><ViewObject><![CDATA[AppModule.DeptViewObj1]]></ViewObject></Attribute></Projection><JoinSpec><ViewObject><Name><![CDATA[AppModule.DeptViewObj1]]></Name></ViewObject></JoinSpec></ADFQuery>
    [2011-09-27T02:59:04.199-05:00] [AdminServer] [ERROR] [] [oracle.bi.integration.adf.v11g.obieebroker] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: b260b57746aa92d3:-1f9ca26:1328fcfd3e6:-8000-0000000000006744,0] [APP: BIEEOrders] java.lang.NoClassDefFoundError: oracle/apps/fnd/applcore/common/ApplSession[[
         at oracle.bi.integration.adf.ADFDataQuery.makeQueryBuilder(ADFDataQuery.java:81)
         at oracle.bi.integration.adf.ADFDataQuery.<init>(ADFDataQuery.java:70)
         at oracle.bi.integration.adf.ADFReadQuery.<init>(ADFReadQuery.java:15)
         at oracle.bi.integration.adf.ADFService.makeADFQuery(ADFService.java:227)
         at oracle.bi.integration.adf.ADFService.execute(ADFService.java:136)
         at oracle.bi.integration.adf.v11g.obieebroker.ADFServiceExecutor.execute(ADFServiceExecutor.java:185)
         at oracle.bi.integration.adf.v11g.obieebroker.OBIEEBroker.doGet(OBIEEBroker.java:89)
         at oracle.bi.integration.adf.v11g.obieebroker.OBIEEBroker.doPost(OBIEEBroker.java:106)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         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.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
         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)
    Caused by: java.lang.ClassNotFoundException: oracle.apps.fnd.applcore.common.ApplSession
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
         ... 38 more
    Please suggest how to make it work.

    Hi,
    Thanks for providing the online help URL, i have already completed the steps mentioned in URL
    I am able to import metadata using view object but getting above error("[nQSError: 77031] Error occurs while calling remote service ADFService11G. Details: Runtime error for service -- ADFService11G - oracle/apps/fnd/applcore/common/ApplSession".") while validating the data.
    It fails at step 5 of "To import metadata from an ADF Business Component data source:" section of above URL.

  • Problem with view object for global variables

    Hi,
    I'm using jdeveloper 11.1.2.3.0
    We are using view object with transient attributes for global variables.
    we defined the view as explained here:
    http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    also we defined one of the attributes as primary key.
    When we start to test our application with disable connection pooling we got some problems.
    sometimes the row in the global view object is deleted.
    (for example after using executeEmptyRowSet on other view object).
    it looks strange, we couldn't fוnd why does it happen.
    Any idea?

    As Timo said, it is very hard to help without source.
    Are you sure that you do the next step:
    After the call to super.prepareSession(), add code to create a new row in the transient view object and insert it into the view object.

  • Problem exposing Accessor Methods on View object (ViewRowImpl.java)

    JDeveloper 9.03
    I have a view link, ViewLinkSourceDest, that links two view objects Source and Destination. Each view object has its respective ViewRowImpl.java file created.
    I have selected "Generate Accessor in View Object" in View link Properties of the View Link Wizard for both source and destination view objects.
    The correct Accessor methods are available in both the source and destination ViewRowImpl files.
    When I access the Source accessor method from the DestinationViewRowImpl object I receive the following error:
              ORA-00904: invalid column name
              It is also is displaying the Source view object's SQL statement with the (:1 = Destination.ID) where clause.
    The error is occurring when trying to retrieve the view object using this type of method call:
              Row r = this.getSourceView();
    After further investigation I have found an example set of view objects in which the error does not occur. The difference was in the ViewLink.xml file.
    The ViewLink.xml file that accesses the Accessor with the error begins like this:
              <ViewLink     
                   Name="ViewLink"
                   Where=":1 = Destination._ID" >
    The ViewLink.xml file that accesses the Accessor with no error begins like this:
              <ViewLink     
                   Name="ViewLink"
                   EntityAssociation ="SourceDestAssociation" >
    suggesting that the use of an association would resolve this problem.
    I was not able to create a View link based on an association that would generate a ViewLink.xml file that ressemble the successful file above. I could however manually add the correct entry to the xml file that caused the error and sucessfully access the Accessor method in the source object. This is not the final answer because the IDE will regenerate the ViewLink.xml file to its original state even if created with the appropriate Association.
    Is this a bug?
    Is the way the ViewLink.xml file created different in JDev 9.03 than in 9.02
    Is there something I am missing that is causing the ViewLink.xml file to generate incorrectly?
    Any suggestions would be helpful.
    Rob

    Steps to recreate:
    1 Create SomeSuperEntityImpl.java extended by SourceEntityImpl.java and DestinationEntityImpl.java entity objects.
    2 Create SourceView and DestinationView objects
    3 Create SourceDestinationAssociation linking the entity object Source PK to Destination FK
    4 Create SourceDestinationView linking Source and Destination view using the SourceDestinationAssociation
    View the SourceDestinationView.xml file and you will see that the viewlink has Where=":1 = source.src_id"
    This is the scenario that causes the initial problem with the Accessor Methods.
    If the SomeSuperEntityImpl.java is removed as the super class and the same procedure is followed you will get the desired 'EntityAssociation = "package.SourceDestinationAssociation"' in the SourceDestinationView.xml file .
    Hope this is a little clearer.
    Rob

  • Problem in using View Object for validation

    Hi,
    I have defined a simple swing form to practice. It has one Entity Object and two View objects. One of these view objects is an updatable VO based on the EO and the other one has a simple "select count(*)" from a table. I defined a method validation on one of the EO attributes to see how can i use the VO for validation. On the other hand i defined the Application Module to use both of my views. As far as i undrestood, when i define a VO for AM, the AM will instantiate it the first time it starts running. Here is the code inside the method validation for FirstName attribute:
    /**Validation method for FirstName
    public boolean validateFirstName(String data) {
    ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("CountEmployeeInstance");
    if (vo == null) {
    System.out.println("vo is null");
    else {
    vo.executeQuery();
    if (vo.hasNext()){
    System.out.println("count = " + ((CountEmployeeRowImpl) vo.next()).getCount());
    else {
    System.out.println("vo has no next");
    return true;
    The problem is that vo.executeQuery() does not return any record. In fact the vo.hasNext() returns false and i get the message "vo has no next" on the console. Please pay attention that the VO's sql statement is SELECT COUNT(*) and it always returns a record. I found that if i use vo.closeRowSet() before vo.executeQuery() everything works fine.
    Please tell me that what is my problem and why is it working like this?
    Best Regards,
    Alireza Vali

    Chris,
    1- Every thing is fine with the ADF model layer in this practice. I have tested it by using Test option on AM and it works. It works exactly the same as how it works throug swing UI that i use for it.
    2- The VO is beeing found and as you see in the code, i have tested it by "if (vo == null)" just after the statement which finds it and vo is not null which means it has been instantiated by AM as it was supposed to.
    3- The VO's SQL statement is "SELECT COUNT(*) FROM EMPLOYEE" with no where clause. I have 14 records in this table.
    Every thing is OK with swing form. It runs and shows the records and all the binded operations like "next record", "previous record" and so on work perfectly on the records.
    4- The code i used is a combination of two examples. Example 9-7 and 9-8 in pages 9-12 and 9-13 of mentioned document.
    Now my findings:
    I changed the code to the following:
        /**Validation method for FirstName
        public boolean validateFirstName(String  data) {
            ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("MaxEmployeeIdInstance");
            if (vo == null) {
                System.out.println("vo is null");
            else {
                //vo.closeRowSet();
                vo.executeQuery();
                System.out.println("Row Count = " + vo.getRowCount());
                System.out.println("Default Slot = " + vo.getCurrentRowSlot());
                vo.next();
                System.out.println("Slot after next() = " + vo.getCurrentRowSlot());
                vo.reset();
                System.out.println("Slot after reset() = " + vo.getCurrentRowSlot());
                vo.first();
                System.out.println("Slot after first() = " + vo.getCurrentRowSlot());
                vo.last();
                System.out.println("Slot after last() = " + vo.getCurrentRowSlot());
                System.out.println("----------------------");
                vo.executeQuery();
                System.out.println("Deafault index = " + vo.getCurrentRowIndex());
                vo.next();
                System.out.println("Index after next() = " + vo.getCurrentRowIndex());
                vo.reset();
                System.out.println("Index after reset() = " + vo.getCurrentRowIndex());
                vo.first();
                System.out.println("Index after first() = " + vo.getCurrentRowIndex());
                vo.last();
                System.out.println("Index after last() = " + vo.getCurrentRowIndex());
                System.out.println("Slot Before First = " + vo.SLOT_BEFORE_FIRST);
                System.out.println("Slot Beyound Last = " + vo.SLOT_BEYOND_LAST);
            return true;
        }Here are the results :
    Row Count = 1
    Default Slot = 0
    Slot after next() = 3
    Slot after reset() = 0
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = 0
    Index after next() = -1
    Index after reset() = 0
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyound Last = 3
    As you see, after the execution of the statement "vo.executeQuery()" the The RowIterrator pointer is not pointing to the slot before the first record but it is pointing to the first record itself. And that is why the statement "if (vo.hasNext()" returns false because we just have one record and RowIterrator Index is standing on that record and there is no next record present. The very important thing is that even reset() method does not set the index to the slot before the first record and it sends it to the first record.
    After that, i took the statemet "vo.closeRowSet()" out of the comment and here are the results:
    Row Count = 1
    Default Slot = 2
    Slot after next() = 0
    Slot after reset() = 2
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = -1
    Index after next() = 0
    Index after reset() = -1
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyond Last = 3
    These are the exact things that we expected from the first. After query execution, the pointer is set to the slot before first record and the reset() method does its defined job which is sending the pointer to the slot before the the first record.
    My Assumptions:
    The Rowset which is created by AM is somehow different from the RowSet which you create in your program. I am absolutely sure that this functionality is not a bug but a design decission. I look at my simple program and see that when it runs, the data is queried and shown on the screen which is all done by AM by instantiating my VO and executing the query on it. AM reasonably must put the RowSet pointer on the first record and not the slot before first record. And i am sure that if i use reset() method on the shown RowSet, the pointer goes to the first record and the data on the screen does not get cleared. Whe we use vo.closeRowSet() and execute the query again, the AM made RowSet is closed and a new one is created and the new RowSet is your's not AM's so it functions as you expect.
    Best Regards,
    Alireza Vali

  • Error using View Object in a optionList ?

    Hello,
    I'm use JDeveloper 9.0.3, BC4J+UIXml, and I have a Create form with a optionList tag, populating with a Object View.
    I create a Object View called TipoLocalView.
    My code:
    <bc4j:messageChoice name="Tipo" attrName="SeqTipoLocalCampus"
    prompt="Tipo Local:">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="TipoLocalView"/>
    </contents>
    </bc4j:messageChoice>
    The error message:
    java.lang.NullPointerException
    at oracle.cabo.data.jbo.ui.data.ViewObjectDataProvider.init(Unknown Source)
    at oracle.cabo.ui.data.provider.TableDataProvider.init(Unknown Source)
    at oracle.cabo.ui.data.provider.CachingDataProvider.init(Unknown Source)
    at oracle.cabo.ui.data.provider.DataProviderStack.addDataProvider(Unknown Source)
    at oracle.cabo.ui.LogicalNodeRenderingContext.addDataProvider(Unknown Source)
    at oracle.cabo.ui.composite.CompositeRenderingContext.addDataProvider(Unknown Source)
    at oracle.cabo.ui.laf.base.DataScopeRenderer.prerender(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(Unknown Source)
    My questions:
    1. The v0Name used in a optionList must be the same of the tag bc4j:viewObjectDef...> on top of page ?
    2. What I need make for dynamic optionList operate with Object View ? I need create just Entity Object+View Object ? Or, I need create Entity Object+View Object+Application Module ? What I do for solving this problem ?
    thanks,
    Danilo

    "1. The v0Name used in a optionList must be the same of the tag bc4j:viewObjectDef...> on top of page ?"
    yes. but don't forget: you need a particular viewobject for your optionlist. so if you want to manipulate data in in one viewobject using an optionlist, you must have 2 viewobjects.
    "2. What I need make for dynamic optionList operate with Object View ? I need create just Entity Object+View Object ? Or, I need create Entity Object+View Object+Application Module ? What I do for solving this problem ?"
    depending on your business model you don't necessarly need an entity object, but if you are working with database tables, you usually do. to populate your viewobject, you need an application module.
    see the following thread for information sources about bc4j: BC4J must-read ?
    trevi

  • [Urgent] using javafx object in java project

    Suppose I here created a very simple java project and the main file is like below,
    public class test {
        public static void main(String[] args){
                System.out.println("Hello World!");
    }and in this particular java project, I need to use another javafx object which is defined as (the javafx and java file are in the same package),
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    var stage: Stage = Stage {
        title: "Declaring Is Easy!"
        scene: Scene {
            width: 300
            height: 250
            content: [
                Circle {
                    centerX: 150  centerY: 120 radius: 80
                    fill: Color.MAROON
                    stroke: Color.INDIANRED
                    strokeWidth: 10.0
                }, //Circle
                Rectangle {
                    x: 25, y: 80 width: 250, height: 80
                    arcWidth: 20 arcHeight: 20
                    fill: Color.web("#6699ff")
                    stroke: Color.web("#003399")
              strokeWidth: 5.0
                } //Rectangle
            ] //Content
        } //Scene
    } //StageSo how could I achieve this?
    Regards.

    Thanks for your reply.
    But would you please elaborate on this sentence: create the fx class using Class.forName("....").newInstance()?
    Indeed I implemented an interface which was extended by the javafx class, and in the main java file I need to write following codes to use this object,
    Context context = FXLocal.getContext();
            FXClassType instance = context.findClass("packageName.JavaFXClass");
            ObjectValue obj = (ObjectValue)instance.newInstance();
            JavaInterface ji = (JavaInterface)obj.asObject();The problem that I encountered right now is, the exception was thrown at context.findClass("javatest.MyChart");, since it's not able for the compiler to find the JavaFXClass.class.
    I checked the folder build\classes\packageName and noticed that both my main JavaClass and JavaInterface have been compiled with .class file, while the JavaFXClass was not, which means the file JavaFXClass.class doesn't exist.
    What's the solution?

  • Use View Object with Alternative Data Sources in View Link

    In my case, I created a view object based on alternative data source (not with SQL query). I have setQuery(null) in the override create() function for this View Object. When I use this View Object at the destination end of the View Link, the setQuery(null) will raise Jbo-26016 exception (You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.) which does not allow me to do that. I looked Avrom's Framework for Database API-Based ADF BC, in which he override the DBTransaction and CallableStatement in order to intercept the default query clause set by the View Link. I'd like to see if there is any alternative ways to achieve my objective?

    Just following up what I found so far. I'm trying to use customized View Object based on alternative data source at the destination end of View Link with ADF 10.1.3.
    1. For the View Object at the destination end of View Link, I can not call setQuery() which will raise Jbo-26016 exception.
    2. I can omit the setQuery(null) call in my customized ViewObjectImpl, and as long as there is no SQL statement in the View Definition XML, it won't cause problem when calling the executeQueryForCollection() of the super class.
    3. The override executeQueryForCollection() must call the super.executeQueryForCollection() in order to get appropriate result (I tried to skip the call and it does not give back any results)
    4. The funny thing is, when I make getQuery() call in my customized ViewObjectImpl (I'm just trying to double check if the Query object is clean or not), the query object is set to "SELECT FROM" following the getQuery() call, and which causes the exceptions when I call super.exeuteQueryForCollection(). I found out later from the Javadoc API which is implemented in that way.
    So I guess my case is resolved by not making specific call to setQuery(null).

  • How do I programmatically get the display name for a view object in Java?

    When you define a view object, there is a display name that is configured. I would like to retrieve that in Java. Can someone tell me how?
    Thanks, -Klaus

    Klaus,
    you can use the attribute definitions which you get using
    getAttributeDefs
    AttributeDef[] getAttributeDefs()This method is accessible via the vo.
    If you need this information in a bean, you can use EL like you see if you drop a vo on a page.
    Timo

  • Problem refreshing View Object

    Hi all,
    I have one problem with refreshing VO. I am adding rows in the VO programatically but i am not commiting the data. If I add more then 10 records in the VO I cant view all the rows. I am only getting the rows from the first page (the first 10 rows). I dont get the option to navigate and cant go to other pages in the table. But if I commit the data I can go trought all pages in the table.
    Anyone has solution for this???
    Thanks

    I just discovered that i can only have 10 rows of uncommitted data in the view object. The others are not shown in the table but they exist in the VO
    Any ideas???
    BTW I'm using version 10.1.3.4
    Edited by: ScarfaceMkd on Mar 9, 2010 6:44 AM

  • BC4J: problems creating view object with multiple entity objects

    Hi,
    I working with a view object which contains two entity objects with parent-child relationship like this:
    ViewObject - ParentEntityObject - PId
    PAttribute
    CId (FK)
    (- ParentChildAssociation)
    - ChildEntityObject - CId
    - CAttribute
    The 'Read Only' and 'References' options are checked for the association in the view object.
    I'm creating a new row using this view object. The parent object should be created new and the child object already exists in the database, so I'm setting only the attributes of the parent object (including foreign key).
    After creating the row I display it in a jbo:DataTable and only those attributes coming from the parent object are displayed. The attributes of the child object are not set. After a commit all attributes appear.
    The problem is, that I want to display the new row with all attributes to the users BEFORE they commit.
    I tried to set the child attributes, but they are read only by definition and even when I unchecked the 'Read Only' option and set the attributes to 'Always Updateable' in the view object it is giving me
    JBO-27008: Attribute set for CAttribute in view object ViewObject failed.
    Is there a way to make all attributes of the child object visible in the view object without committing changes?
    (JDev 9.0.2.822)
    Any help would be appreciated.
    Regards,
    Christian

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • Throwing error using view objects in Table

    Hi,
    I am making use of 2 different view objects to assign column values for table region.
    it is throwing me error that particular attribute is not defined.
    cann't we use two different view objects in table?
    - Mithun

    No, this is not possible. Table component is used for tabular representation of data derived from the contents of a single view instance. Also, you cannot have two tables in the same page with the same view instance unless this is read-only view.

  • How to use Oracle objects in java code

    Hi all!
    I'm reading an xls and i need to fill me oracle objects with java code:
    OBJECT_NAME OBJECT_TYPE
    LETTURA_OBJ TYPE
    LETTURA_OBJ TYPE BODY
    In the past weeks i've been using both java code into oracle and oracle objects, but new i need to write those objects with data i read with java, anybody can help me?
    I know that the easiest work around would be to put the data i read from the excel file into a table and then fill the oracle objects, but now i want to learn how to write directly those objects with a command like the following one:
    a sample of the code i'm tryng to write:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED REPORT."Manage_Excel_ASMBS" AS
    import java.io.*;
    import java.io.IOException;
    import jxl.*;
    public cass ....
    #sql{  variabili_globali.var_ER_F3.Tipo_Lettura := 5}
    thanks,
    Massimo
    Edited by: LinoPisto on 16-mag-2011 16.38

    mmmh i'm not understanding so much....
    well... as i told before i'm working in oracle database environment and i'm developing a java procedure.
    now, i have this object
    CREATE OR REPLACE
    TYPE REPORT.FATTURA_OBJ AS OBJECT (
    POD VARCHAR2(1000),
    ID_FATTURA NUMBER,
    ID_FILE NUMBER,
    COERENZA_EA_F VARCHAR2(1000),
    COERENZA_ER_F VARCHAR2(1000),
    COERENZA_EA_M VARCHAR2(1000),
    COERENZA_EF_M VARCHAR2(1000),
    ANOMALIA VARCHAR2(1000),
    MOTIVO_INVALIDAZIONE VARCHAR2(1000),
    MATRICOLA_CONTATORE VARCHAR2(1000),
    POTENZA_DISPONIBILE VARCHAR2(1000),
    MEMBER PROCEDURE pulisci
    /and i need to work with it inside this procedure:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED REPORT."Manage_Excel_ASMBS" AS
    import java.io.*;
    import java.io.IOException;
    import java.io.StringWriter;
    public class Manage_Excel_ASMBS
    public static void read_Excel(String inputFile,int var_Id_Caricamento, int var_Id_Distributore, String var_Distributore) throws SQLException, IOException
              **here i need to put what i'm reading inside the excel file into oracle objects**
    /can you please give me a sample ?
    thanks

  • How to use view objects in entity impls?

    Hi!
    I would like to access a view object to implement business logic
    in an entity impl class method. How can this be done? More
    precisely I would of course like to do this in the context of
    the "current" Application Module the Entity "lives" in. I think
    this has to be possible because you can use a list validator for
    an entity objects attribute, which gets it's data out of a view
    object.
    Any help would be very welcome!
    Regards
    Stefan

    Stephan,
    Just to make things clear, View Objects access Entity Objects
    and you should implement your busines logic in the entity
    objects. This is the way BC4J was designed. It allows for
    reuse of your components and build different views (View
    Objects) ontop of Entity Objects.
    View objects do query the database and populate the entity
    objects. However, it is from the cached data in the entity
    objects where DML occurs (insert, update, delete). You want to
    put your validation at this level because you do not want to
    make a trip to the database if it does not validate.
    I recommend reading a whitepaper on J2EE development and
    BC4J. The URL
    http://otn.oracle.com/products/jdev/htdocs/j2ee_with_bc4j/j2ee_wi
    th_bc4j.html.
    Happy Reading!
    Hi!
    I would like to access a view object to implement business logic
    in an entity impl class method. How can this be done? More
    precisely I would of course like to do this in the context of
    the "current" Application Module the Entity "lives" in. I think
    this has to be possible because you can use a list validator for
    an entity objects attribute, which gets it's data out of a view
    object.
    Any help would be very welcome!
    Regards
    Stefan

Maybe you are looking for

  • How can I attach a whole album to an email?  Thanks!

    Can I do that?  If so, how?

  • Exchange Rate is copied from Contract to sales order

    Dear SD Guru, Good Day! I have an issue with the currency. The sales order picks up the exchange rate in the contract and it might not be correct. The contract was created a year ago and the sales order is still referring to the old exchange rate bec

  • Javascript not working when pdf is rendered in the browser IE9

    I have a javascript on the initialize event of a field and it works fine when doing a Preview PDF but not when i render the PDF in the browser if(F.Page_1.field1.rawValue == null)            F.Page_1.field1.presence = "invisible";            F.Page_1

  • Drag & Drop from Media Inspector crashes iWeb

    Could somebody please tell me what the Media Inspector in iWeb is for if I can't drag and drop files from it? Every time I try to drag and drop even the shortest clip from the Media Inspector into iWeb, the latter hangs/crashes and I have to exit the

  • Error message Message no. FB687

    hi when i do the vendor balance confirmation via f.18 t code then one error appear that error is (Company code xxxx  is not a correspondence company code ) and error message is  Message no. FB687, how to solve this error and  i will which t code use