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

Similar Messages

  • 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.

  • How to use lock object? what we lock either total ztable or only record?

    Hi
    How to use lock object? what we lock either total ztable or only particular record?
    Don't tell create lock object on se11 with E letter & acll it in program with eENQUEUE & DEQUEUE.
    just tell me we will lock only particular record or total ztable?
    specify with example.
    Thanks.

    Hi
      Go to SE11, in the option 'Lock object' enter the name of your lock,
    begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
    table name where the record you want to lock exist and select the
    lock mode. Lock mode can be shared and exclusive. If 'shared',
    when you lock the record, other can also read data, but can not
    modify. If 'exclusive', when you lock the record, other can neither
    read nor modify the record. After save and activate, you will get two
    function module.'ENQUEUE_EXXXX' to lock record,
    'DEQUEUE_EXXXX' to release lock on one record.
    When use this function module it only lock one record at a time. It
    does not lock the table.

  • How to use swf object

    Hi have been trying to get my head around how to use swf object, I know very little javascript and so am having difficulty in modifying the code to suit my needs.  This is my page which I have used dreamweaver cs3 and have used insert>media>flash and it is working well but does not validate.  I would really appreciate if somebody could write the exact html code I need to convert this to swf object.
    http://www.kimberleywebdesign.com.au/Links.html

    You should be able to just declare a variable outside of the onComplete function and assign it the loaded object when the file loads...
    var loadedSWF:MovieClip;
    function loadComplete(e:Event):void {
         removeChild(old_mc);
         addChild( DisplayObject(LoaderInfo(e.target).content) );
         loadedSWF = MovieClip(e.currentTarget.content);
    function doStuffToSWF(){
          loadedSWF.something....

  • How to use views in sql script report?

    All all
    Can any one tell how to use views in sql script report?

    Most of the views are based on tables (or other views which are based on tables).
    The view typically shows one org at a time based on the context that is set.
    If you need records for all orgs, you need to use the underlying tables. Oracle typically names the tables with a _all suffix.
    e.g. PO_HEADERS will show records for one org at a time. PO_HEADERS_ALL will show records for all orgs.
    Hope this answers your question,
    Sandeep Gandhi

  • How to use  Business Object like Vendor or PurchasingInfo

    Hi,
    How to use Business Object ( like Vendor or PurchasingInfo ) from my Object?
    For example:
    CLASS myEntity DEFINITION.
              PUBLIC SECTION.
                   METHODS: getVendor EXPORTING pVendor TYPE Vendor.
               PRIVATE SECTION.
               DATA: aVendor TYPE REF TO Vendor.
    ENDCLASS.
    CLASS myEntity IMPLEMENTATION.
    METHOD getVendor
               pVendor = aVendor .
    ENDMETHOD.
    ENDCLASS

    Hi,
    I am giving u a demo Program for ur doubt.
    REPORT demo_class_counter .
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS: set IMPORTING value(set_value) TYPE i,
                 increment,
                 get EXPORTING value(get_value) TYPE i.
      PRIVATE SECTION.
        DATA count TYPE i.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD set.
        count = set_value.
      ENDMETHOD.
      METHOD increment.
        ADD 1 TO count.
      ENDMETHOD.
      METHOD get.
        get_value = count.
      ENDMETHOD.
    ENDCLASS.
    DATA number TYPE i VALUE 5.
    DATA cnt TYPE REF TO counter.
    START-OF-SELECTION.
      CREATE OBJECT cnt.
      CALL METHOD cnt->set EXPORTING set_value = number.
      DO 3 TIMES.
        CALL METHOD cnt->increment.
      ENDDO.
      CALL METHOD cnt->get IMPORTING get_value = number.
      WRITE number.
    For more demo programs type 'abapdocu' in the command field
    U will be getting some demo programs.
    There select the abap objects.
    Regards,
    Jagadish

  • How to create View Object with Multiple Updatable Entity Objects

    I want both the entities in the view object to support creating new rows but when i give create insert it allows to insert only on the parent and not the child. I found this link
    http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#CEGCAJCI which overrides the exiting classes. but i would like to do it declarative . Is there any other way to do it?
    I am using Jdeveloper 11g version 2.
    Thanks in advance,
    Rakesh

    But when i tried to add a new row it showed this error
    oracle.jbo.AttrValException: JBO-27014: Attribute LookupTypeId1 in FoundationModuleAM.VikLookupTypeBaseVO is required.
         at oracle.jbo.server.JboMandatoryAttributesValidator.validate(JboMandatoryAttributesValidator.java:224)
         at oracle.jbo.server.EntityDefImpl.validate(EntityDefImpl.java:3095)
         at oracle.jbo.server.EntityCache.validate(EntityCache.java:3599)
         at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:2285)
         at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:2464)
         at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4515)
         at oracle.insurance.viking.foundation.model.common.VikingDBTransactionImpl.validate(VikingDBTransactionImpl.java:46)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2008)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
         at oracle.insurance.viking.foundation.model.common.VikingDBTransactionImpl.commit(VikingDBTransactionImpl.java:37)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:112)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

  • 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

  • How to reset View Object row state to Unmodified

    Hi,
    My requirement is as follows. In my home page, I have a table listing master records with links to a master detail page. In this master detail page, the master is displayed in a form, and details in an editable table. There is also a button that is used to "Add 5 New Detail Rows". User will use this button to add multiple new detail records for insertion.
    Anyway, when user visits this master detail page, I should also programmatically add 5 new detail rows. For this, I define a custom method in the master view object class (called add5MoreRows()...see below), define the binding to this custom method and add invokeAction executable in the page definition.
    public void add5MoreRows() {
    DlistHdrVORowImpl row = (DlistHdrVORowImpl) getCurrentRow();
    createMoreLineDetailRows(row, 5);
    // Need to reset the master row state to Unmodified
    public void createMoreLineDetailRows(DlistHdrVORowImpl row, int howMany) {
    RowSet detailRowSet = (RowSet) row.getDlistLnVO();
    for (int i=0;i<howMany;i++) {
    Row detailRow = detailRowSet.createRow();
    detailRowSet.insertRow(detailRow);
    detailRow.setNewRowState(Row.STATUS_INITIALIZED);
    The problem here is when I add these detail records, ADF sets the master record to "dirty". My question is how do we reset the state of the master view object row to "Unmodified".

    Frank,
    That's my first thought. But I cannot find STATUS_UNMODIFIED in View Object. I understand the status can be set in Entity Object. How do we get ahold of Entity Object from View Object?
    Thanks.
    Message was edited by:
    user489605

  • Two View Objects & One Entity Object

    Has anyone ever had it where they create a row from a view object, set some attributes, insert it into that view object, and it shows up in another view object (as well as the one the row was actually inserted on)? Both of these view objects are using the same single entity object, it's just that their where clauses are slightly different. When I do a commit and then executeQuery, all is good and the new row only shows up in the intended view object.
    Here is the code in my app module to do a row insertion on one of the view objects.
    public void addQCNote(int userID, Number theStudyID, String theNote)
              try
                   //StudyFtsViewObjImpl freeTextVO = getStudyFtsViewObj();
                   StudyFtsQCOnlyViewObjImpl freeTextVO = getStudyFtsReadOnlyViewObj();
                   freeTextVO.setWhereClauseParam(0, theStudyID);
                   DBSequence freeTextTypeCode = null;
                   StudyFTSQCCodeValueViewObjImpl freeTextCodeValue = getStudyFTSCodeValueViewObj();
                   freeTextCodeValue.executeQuery();
                   Row[] freeTextCodeValueCurrentRowArray = freeTextCodeValue.getAllRowsInRange();
                   // There SHOULD only be one ... but if there is more, pick one - geeez.
                   for (int i = 0; i < freeTextCodeValueCurrentRowArray.length; i++)
                        Row currentFTRow = freeTextCodeValueCurrentRowArray[0];
                        freeTextTypeCode = ((DBSequence) (currentFTRow.getAttribute(StudyFTSQCCodeValueViewObjRowImpl.CODEVALUE1)));
                   Row freeTextRow = freeTextVO.createRow();
                   // Sets up default values for insertion into db at commit time
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.PARENTENTITYID, theStudyID);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.PARENTENTITYNAME, "STUDY");
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.FREETEXT, theNote);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.FREETEXTTYPECD, freeTextTypeCode);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.CREATEDID, new Number(userID));
                   freeTextVO.insertRow(freeTextRow);
                   freeTextVO.setCurrentRow(freeTextRow);
              catch (Exception ex)
                   System.out.println("Exception in AR3MainAppModule.addQCNote: " + ex.toString());
    -brian

    Did you read this?
    Re: Row created in one ViewObject added to all VOs based on the same Entity
    Why don't you search this forum before posting?
    Sascha

  • How to filter View Objects on Main Page - Unbounded Task Flow

    Hi All,
    Version: 11.1.1.4
    I have a scenario where I am trying to filter the Employee information by EmployeeID and show their related Items. I can do this if I encapsulate Employee and / or Items in bounded task flows and expose their view Criteria in methods that I am setting on the App Module. I could also add the bind variable to the View Object queries. The problem I am having is that I want to display a pop up based on the item they select. My issue is that I can't seem to figure out how to either grab the item row selected and pass it to the pop up (Can't create a control flow from a page fragment to a page - which as far as I can understand the pop up in the task flow has to be a page and not a page fragment) or drop the employee view object and item view object on the main page and have them be filtered.
    So basically two issues:
    1. If I use the Employee and Item bounded task flows and place them as regions on the main page then I am having difficulties passing the row selection (item selected) and pass it to my pop up window (another task flow).
    2. If I place the employee and item view objects on my main page the original methods I am using to filter the data are not getting called at all. I have tried placing them in the adf-config task flow prior to my main page view and going into my main page page def and adding them as method calls in the binding.
    I am sure I am doing something wrong or maybe even creating an invalid approach, but I should be able to filter my employee and item data on load within my unbounded task flow or use the data within my bounded task flows and generate a popup with data I am collecting from my item row.
    As always greatly appreciate the feedback....still really ignorant with ADF.
    --S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I figured out the issue Shay. I didn't have my pageFlowScope value set on the task-flow-call. So I had the parameter name and value set on the input of my downstream bounded task flow, but when I add the control to call the task flow I didn't have the task-flow call value set. That piece was not intuitive to me. It makes sense that it would have to know how to pass the value.....just wasn't sure where it should be set.
    --S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to create view object for a predefined Oracle view

    Trying to create an entity object with no success,,,
    I have an Oracle view(complex query in PL/SQL) that I need to encapsulate as a View Object then represent a column from this view as a '' | | linkcolumn | | ''
    then get a reference of the requestParameter "p" in this case that I need to use as whereclause parameter on another view object that is part of the ListPage.jsp.
    The application is basically a page of organization links that when click filters their reports as a list,
    In Jdeveloper's context webBean(RowSetBrowser list [org links] to RowSetBrowser [org report list])
    Can I implement this functionallity using the wizards or possibly writing custom code using the standard webBeans.

    Jerry,
    First, you can create an entity object based on an Oracle view. If you check the "Views" checkbox in the EO wizard, you'll see a list of database views. Then you can create a view object based on your entity object, and use it like any other view object.
    As for getting the page into the format you want, I suggest you start by generating your page using the BC4J JSP wizard, then customize the generated JSP.
    Thanks
    Blaise

  • 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

  • How to refresh view object in doDML

    How can i refresh an view object in the doDML Method?

    How are you changing the key? - is it using the iterator or attribute value in bindings (or) directly thru the view object.
    if you are doing directly on the view object, on commit - you might have to refresh the iterator by calling executeQuery method on it.
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCIteratorBinding dcIter = (DCIteratorBinding) bindings.get("DEPARTMENTS_VO1Iterator");
    if(dcIter != null){
    dcIter.executeQuery();
    }Thanks,
    Navaneeth

  • How to use a object(in MXML - in FLEX 4) in multiple way.

    This is my object in MXML:
    <mx1:Canvas id="menuElement" visible="true" rotationY="-15">
         <mx1:Canvas mask="{imageMask}">
              <mx1:Image id="menuImage" visible="true"/>
              <s:BorderContainer id="menuBackground" width="70" visible="true"  borderVisible="false">
                    <s:Label id="menuDescription" fontSize="30" fontWeight="bold" rotation="-90" />
                        <s:backgroundFill>
                             <s:LinearGradient rotation="90">
                                  <s:entries>
                                       <s:GradientEntry  id="backgroundColor" color="0x000010" alpha="0.6"/>
                                  </s:entries>
                             </s:LinearGradient>
                        </s:backgroundFill>
                   </s:BorderContainer>
              </mx1:Canvas>
         <mx1:Canvas id="imageMask" backgroundColor="#FF0000"/>
    </mx1:Canvas>
    I use this object (one time) with configuration in actionscript (positions, source of picture etc.) and I receive something like on a picture below:
    Now, I need to create 4 elements like below. I don't wan't to copy 4 times this block of program. Anybody have idea how can I make it and how can
    I recall of each element from actionscript?
    Regards

    if you run nw04s SP8, it's a limitation. you can create your own simple types and use them in your entities. but the custom data structures you create in the dictionary don't show in list of available structures when you want to create a new complex attribute

Maybe you are looking for

  • How can I distinguish a JMenuItem , JPopupMenu and TopLevelMenu?

    I used the following methods to get the component who (a menu)gains the focus: JComponent com = JFrmame.getFocusOwner(); or MenuSelectionManager menuMgr = MenuSelectionManager.defaultManager(); MenuElement[] menuPath = menuMgr.getSelectedPath(); if(m

  • Calling a method in BPM Object from jsp page

    hi all, I try to call a method from BPM Object using <f:invokeUrl > I change server side method properties to yes. and then how can i get request and response object inside the BPM method. Thanks.

  • Cannot See Components Added To JComponent

    Hi, It seems that components added to direct descendents of JComponent are not visible. Please see the following pseudocode: // In the following b is NOT visible: class MyComponent extends JComponent{} b = JButton("OK") p = MyComponent() p.add(b) f =

  • How to handle events for Tab Control

    Hi, I have a Tab control with 4 tabs and I would like when I go to a specific tab all the contents of that tab being updated. Could you please help me with this? How should I set the event structure Thanks

  • ORA-14400  error

    when am loading the data to one infocube,I am gettin ORA-14400 error,Could any one of you please help me?