Separate App Module, View Object based on Select not EO: Best practice?

Hi,
I have a list of base tables(parameters) that are used everywhere in my application for selection components (List, Combo, Radio).
I'm considering creating a separate app module with a view object based on query for each table.
I have created a BaseTableAM application module for managing those tables, Entity objects and View Objects in update mode.
Those tables are rarely changed.
Example of table:
ItemType
item_type_id = primary key
name = description
In the BasetableAM:
ItemTypeEO entity object
ItemTypeVO updateable view object based on related entity object.
Now in my project I will create combo boxes for selection of the item_type_id.
Separate application module:
SelectionViewAM composed of View Objects based on Select statements and not on Entity Objects.
Example of view object ItemTypeViewVO:
SELECT ItemType.ITEM_TYPE_ID,
ItemType.NAME
FROM ITEM_TYPE ItemType
All view objects in this application module will be read-only and for selection only.
By basing all those View Objects on select statements not based on Entity Objects I suppose there will be no locking and "value changed" management => less overhead.
Is this a good practice?
Being read-only I could have based those View Object on Entity Object with flag updateable set to no, what would you recommend?
By creating a separate Application Module for those selection view objects, I know that update will not be possible.
Thank you for your advice.
Frederic

See this article for View Object tuning tips:
http://www.oracle.com/technology/products/jdev/tips/muench/voperftips/index.html
Are you planning to use this AM as a nested AM inside other application modules?
If you don't the "selection AM" will have its own, separate database connection/transaction.
If you do, it will share connection, transaction with its containing "root" AM.
It may not be relevant to your application, but just realize (which is explained in the article I point to above) that view objects that are not related to entity objects do not "see" pending changes in the current transaction. That feature depends on the VO/EO cooperation. It's fine to build VO's without an EO -- in fact we've made it easier to do this in 10.1.2 in the Design Time wizards -- but you just want to make sure you realize what features it's giving up. If you don't need those EO-related features, then by all means create an Expert Mode VO that's not related to EO's.

Similar Messages

  • App module view object row currency and task flows

    Hello -
    Using JDev 11gR1. My application uses ADF Rich Faces with ADFBC.
    I have case where I want to
    a. select a row in a table based on a view object
    b. hit a button to invoke a method in an application module.
    c. in the app mod method, call getMyViewObject().getCurrentRow() to get the row selected by the user
    d. "do something" with the row
    In 10.1.3, this worked fine.
    In 11gR1, I am having problems:
    1. The above situation works fine if I have a regular page.
    HOWEVER,
    2. The above situation does NOT work if my table is in a page fragment in a task flow. (The getCurrentRow() returns NULL.)
    For case #2 I've checked the following:
    * verified that the selectedRowKeys and selectionListener attributes were set on the table in the page
    * verified that I'm using the correct app module instance (I have nested application modules).
    * experimented w/various transaction and data control scope settings in the task flow definition.
    So... from those details is there something obvious I am doing wrong? It looks like cases #1 and #2 above use different row set iterators. Is there a way to grab the correct row set from within my app module method? Does this have something to do with the data control scope defined by the task flow? (For 11g do I need to "rethink" sticking logic in the app module and instead placing it within a managed bean get access to my ADFBC objects via the bindings layer?)
    Thank you for reading my question,
    -- Scott

    See this article for View Object tuning tips:
    http://www.oracle.com/technology/products/jdev/tips/muench/voperftips/index.html
    Are you planning to use this AM as a nested AM inside other application modules?
    If you don't the "selection AM" will have its own, separate database connection/transaction.
    If you do, it will share connection, transaction with its containing "root" AM.
    It may not be relevant to your application, but just realize (which is explained in the article I point to above) that view objects that are not related to entity objects do not "see" pending changes in the current transaction. That feature depends on the VO/EO cooperation. It's fine to build VO's without an EO -- in fact we've made it easier to do this in 10.1.2 in the Design Time wizards -- but you just want to make sure you realize what features it's giving up. If you don't need those EO-related features, then by all means create an Expert Mode VO that's not related to EO's.

  • Problem with 2 View Objects based on One Entity -Probably a Bug in ADF BC

    Hi
    I am using JDeveloper 10.1.3(SU5) and adf faces and ADF BC and to explain my problem I use HR schema.
    First, I created 2 view objects based on countries table named as TestView1 and TestView2. I set TestView1 query where clause to region_id=1 and TestView2 query where clause to region_id!=1 in the view object editor and then I created 2 separated form on these 2 view objects by dragging and dropping from data control palette.
    Now when I insert a record in the form based on TestView1 with region_id set to 1 and commit the record and go to the next form I can see the record in the second form which is completely wrong since it is against the where clause statement of the second form.
    I am really confused and the situation is very wired and it seems to me something like bug in adf bc.Am I right.Is there any work around or solution for solving this problem.
    Any help would be highly appreciated.
    Best Regards,
    Navid

    Dear Frank,
    Thank you very much for your quick response.
    Reading your helpful comments now I have some questions:
    1- I have commited the record in the database so shouldn't the query of view objects be re-queried?
    2- We try to use ClearVOCaches (entity_name,false) in afterCommit of the base entity object but unfortunately it does not work correctly. after that,We got root app module and used findViewObject method to find all the view of that entity (we have found them by using name not automaticlly) and called executeQuery of all views. From my point of view it has 2 big disadvantages. First suppose that this entity is an important entity and 4 or 5 viow objects are based on it. Now, For inserting one record we should re-execute 4 or 5 view which I think makes some performance issues. Besides, If during the development one programmer add a new view object based on this entity and don't add the executeQuery in the afterCommit for this view, again we have the same problem. Isn't there at least a way that automatically refresh all related view objects however the performance issue still exists.
    3- You mentioned that this issue is handled in the developer guide. Could you kindly give me a refrence which developer guide you mean and which section I should read to overcome this problem.(I have ADF Developer's Guide for Forms/4GL Developer's Guide , however I search for clearVOCaches and surprisingly nothing was found!!!)
    4- Could you please give me some hints that from your point of view what is the best method to solve this problem with minimum performance effect.
    Any comment would be of some great help.
    Thanks in advance,
    Navid

  • Filter transient view object based SOC

    i have a SOC in a popup which is built on a Transient VO in a page on which popup is displayed.
    i need to filter contents of this SOC based on value selected in another SOC.
    both SOCs are based on same transient VO which is denormalized from a relationship point of view.
    transient vo rows are populated programatically.
    what is the best way to filter a transient view object whose rows will be displayed in UI as SOC.
    VO does not have any EO or SQL query defined. only attributes which are populated programatically.

    Hi!
    I encountered the same problem, and found out that each param[] entry is itself an Object[]. So with the following code you can find the contents:
    Object[] bindvar = (Object[])params[0];
    String varName = (String)bindvar[0];
    Object varValue = bindvar[1];Hope this helps,
    Jeroen

  • Programmatically populate ADF BC view object based on user's JAZN roles

    I currently have a ADF BC read-only view object that is based on an sql query.
    I would like to assign values to the bind variables based upon the user's JAZN
    roles. My problem is that I am uncertain how to obtain the roles the user has.
    Any help would be appreciated.
    Thanks,
    Kenrick

    I do believe this topic is discussed in detail in the 4GL Developer's Guide. Section 30.8 describes everything how to obtain user info programatically. Aside from pointing you in a direction that will get you where you need to be, I can't be of much help. I'll be crossing that hurdle in the coming months.
    Download the guide from this page:
    http://www.oracle.com/technology/documentation/jdev/b25947_01/index.html. I printed and bound it and use it as my bible.
    Good Luck,
    Jeff

  • How to add row in multiple view object based on common entity object.

    Hi ,
    I have
    Jdeveloper version - 10.1.3.3.0
    Oracle Database - 11g R2
    I have a situation where i have to show data from one table in three adf tables on jsf page depending on a flag value in a column in table. For this purpose i have done the following steps
    a) Created an entity object on the database table .
    b) Created three view objects on this entity object and edited the view object's SQL and included the where clause
                       WHERE  A.USER_PERSONAL_NO = :P_USER_PERSONAL_NO AND
                           A.AUTH_TYPE = 'LF'
                       The auth_type cloumn decided in which view object the data will be shown
    Now, when i query the data from database by executing the query of these view objects the data is shown correctly in all three view objects. Till here there seems every thing ok
    Now , i have to provide the logic to add records in the adf tables for this i have provided add button in action facet of all three tables which are binded to methods in managed bean,
    when i add a record in a adf table by add button the new row which is created is shown in all three tables . I cant understand why this is happening , please help me to solve this problem.
    How can i make it possible so that the record appears only in that adf table in which the record is added.
    The method for adding record is
                Row rw = currentAM.getWfRecommAuths().createRow();
                rw.setAttribute("UserPersonalNo",this.getQuery_personal_no().getValue());
                rw.setAttribute("AuthPersonalNo","");
                rw.setAttribute("AuthType","LX");
                currentAM.getWfRecommAuths().last();
                currentAM.getWfRecommAuths().insertRow(rw);
               Please help , thanks in advance.

    Hi,
    have a look at polymorphic view objects
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvvo.htm#CEGDCCCB
    Frank

  • BC Archive - problem with opening view object based on entity from archive

    We have encountered a weird problem with a reusable BC library on different PCs.
    Library was imported into a project following steps in section 25.7 of the ADF guide.
    A view object was created using some of the entities from the library.
    Model tested successfully with view object (using AppModule tester).
    Page developed with no problems.
    Application copied to a different PC.
    BC JAR files set up in lib folder and removed/readded to application model project. When attempting to open view object, get the error below.
    However, the View object still tests successfully using the AppModule tester.
    The page using the View object still runs successfully.
    I believe the problem is that when the archive was originally imported, it was imported from a different location. The Containees tag in the project .jpx file references that path name. But even when I edited the path name, I still could not open the view object. Do we have to remove and redo the import of the library each time the application is copied to a different machine?
    Error when attempting to edit View Object:
    oracle.jbo.dt.objects.JboException: The following object(s) referred to objects that could not be found:
    com.guideworkstv.ibo.webstagemodel.AcctReqForReviewViewObj
    com.guideworkstv.ibo.webstagemodel.AcctReqForReviewViewObj
    Could not find the following referenced object(s):
    com.guideworkstv.ibo.model.webstage.entities.IboAccountRequest
    com.guideworkstv.ibo.model.webstage.entities.IboAccountRequest
         at oracle.jbo.dt.objects.JboException.throwException(JboException.java:81)
         at oracle.jbo.dt.objects.JboPackage.loadResolveReferencesXML(JboPackage.java:1397)
         at oracle.jbo.dt.objects.JboPackage.finishObjectsLoad(JboPackage.java:1042)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:972)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:951)
         at oracle.jbo.dt.objects.JboBaseObject.loadFromXMLFile(JboBaseObject.java:2615)
         at oracle.jbo.dt.objects.JboPackage.loadFromXMLFile(JboPackage.java:880)
         at oracle.jbo.dt.objects.JboPackage.checkForLoad(JboPackage.java:451)
         at oracle.jbo.dt.objects.JboPackage.findContainedObjectByName(JboPackage.java:440)
         at oracle.jbo.dt.objects.JboPackage.findObjectByName(JboPackage.java:1999)
         at oracle.jbo.dt.objects.JboApplication.findObjectByName(JboApplication.java:959)
         at oracle.jbo.dt.objects.JboUtil.fileURLToObject(JboUtil.java:510)
         at oracle.jbo.dt.jdevx.ui.JdxJboAddin$1.handleCopy(JdxJboAddin.java:997)
         at oracle.jdeveloper.compiler.CopyTranslator.handledByListeners(CopyTranslator.java:125)
         at oracle.jdeveloper.compiler.CopyTranslator.translate(CopyTranslator.java:263)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(UnifiedBuildSystem.java:300)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(UnifiedBuildSystem.java:516)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProject(UnifiedBuildSystem.java:609)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(UnifiedBuildSystem.java:666)
         at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.run(UnifiedBuildSystem.java:894)

    We have resolved this problem by making sure that all machines have identical paths for both the working and the lib directories. It would be nice not to have to do this though.

  • View Object with ?-style query parameters - best place to locate code

    I am using a View Object with ?-style parameters, with a JClient applet. The query
    paramters are filled in from user-entered data:
    viewObject.setWhereClauseParams(parms); /* parms is the user data*/
    viewObject.executeQuery();
    Right now the above code is located in the applet. Is it more efficient to code this as a
    method in the ViewObject (or Application Module), then call the method from the Client with
    the supplied parameters?
    I'm still unclear as to how network traffic is affected by running code like this on the client
    as opposed to the server. Maybe someone could point me to a comprehensive dic that covers this.
    Thanks

    I am using a View Object with ?-style parameters, with a JClient applet. The query
    paramters are filled in from user-entered data:
    viewObject.setWhereClauseParams(parms); /* parms is the user data*/
    viewObject.executeQuery();
    Right now the above code is located in the applet. Is it more efficient to code this as a
    method in the ViewObject (or Application Module), then call the method from the Client with
    the supplied parameters?
    I'm still unclear as to how network traffic is affected by running code like this on the client
    as opposed to the server. Maybe someone could point me to a comprehensive dic that covers this.Yes, the above two methods will turn into two network roundtrips.
    You may run your application in Events profiler to get a list of 'roundtrip' calls being made in your app.
    Select Project-Settings->Profiler panel->Events panel.
    Deselect all events, expand BC4J events and select REMOTE_METHOD_CALL event type (1016). Then Profile your app using the event profiler and the profiler will list all the calls that BC4J roundtrip calls. You may use this info to narrow down the roundtrips by batching up operations in an exported method etc.
    Thanks

  • Select One Choice attribute' LoV based on two bind variables, best practice

    Hello there,
    I am in the process of learning the ADF 11g, I have following requirement,
    A page must contain a list of school names which is needed to be fetched based on two parameters, the parameters are student information been inserted in the previous page.
    I have defined a read only view "SchoolNamesViewRO", it's query depends on two bind variables :stdDegree and stdCateg.
    added that RO View as a view accessor to the entity to which the name attribute belongs, and then add LoV for the name attribute using the ReadOnly view,
    added the name attribute as Select One Choice to page2,
    and now I need to pass the values of the bind variables of the ReadOnly view,
    the information needed to be passed as the bind variables is inserted in the previous page, I could have the data as bindings attribute values in the page2 definition
    I have implemented the next two appraoches but both resulted in an empty list :
    * added ExecuteWithParams Action to the bindings of the page and then defined an Invoke Action (set refresh condition) in the executable s, set the default values of the parameters to be the attributes values' input value,
    in the trace I code see that the binding fetches correct values as supposed , but the select list appears empty, does the this execution for the query considered to be connected to the list ?
    * added a method to the ReadOnly view Imp java class to set the bind variables, then I define it as a MethodAction in the bindings , and then create an Invoke action for it , also the select is empty,
    if the query been executed with the passed variables, then why the list is empty? is it reading data from another place than the page!
    and what is the best practice to implement that requirement?
    would the solution be : by setting the default value of the bind variables to be some kind of Expression!
    please notice that query execution had the bound variables ( I see in the trace) are set to the correct values.
    would you give some hints or redirect me to a useful link,
    Thanks in advance
    Regards,

    please give me any example using backing bean .for example
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:selectOneChoice label="Label 1" id="soc1" binding="#{Af.l1}"
    autoSubmit="true">
    <af:selectItem label="A" value="1" id="si1"/>
    <af:selectItem label="B" value="2" id="si2"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Label 2" id="soc2" disabled="#{Af.l1=='2'}"
    partialTriggers="soc1">
    <af:selectItem label="C" value="3" id="si3"/>
    <af:selectItem label="D" value="4" id="si4"/>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    package a;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class A {
    private RichSelectOneChoice l1;
    public A() {
    public void setL1(RichSelectOneChoice l1) {
    this.l1 = l1;
    public RichSelectOneChoice getL1() {
    return l1;
    is there any mistake

  • How to view information based on selection from table

    I currently have a roles table, usersinroles table, and a users table. The users table has a user ID, the roles table has a Role ID, and the usersinroles table has Role ID and user ID as foreign keys. Many users can have many roles. On one page I have the users first name and last name displayed in a read-only table. a user can be selected in which they are directed to a page to view the users details. How can I display on that page the selected user's roles he/she has? I've tried a view but it displays ALL the users and their roles.
    Thanks,
    Adam

    Hi,
    create a bind variable in the users VO and then pass the authenticated username as an argument to the ExecuteWithparams operation. This queries the VO to only show the user you are interested in. The developer guide is a good source of information and inspiration
    http://download-uk.oracle.com/docs/html/B25947_01/toc.htm
    Frank

  • Transient View Object based on a RefCursor?

    Hi!
    I have a ViewObject named VO1 which is based on an EO mapped to a db table. Now I have a Transient ViewObject TVO2 which is based on a PL/SQL ref cursor. The example on Steve Muench site is a ViewObject based on an EO but overrides the viewobject framework functions to make it ref cursor based. What I am trying to do is different from the example, so I'm wondering if this is possible?
    I had a viewlink to connect VO1 and TVO2 because the viewlink attribute values from VO1 will be input parameters to the PL/SQL function in TVO2. When I tested this scenario, I get a ClassCastException inside the overriden function
    executeQueryForCollection(...) {
    ... params[0] //when this line executes I get a ClassCastException Ljava.lang.Object...
    super.executeQueryForCollection(...);
    }

    Hi!
    I encountered the same problem, and found out that each param[] entry is itself an Object[]. So with the following code you can find the contents:
    Object[] bindvar = (Object[])params[0];
    String varName = (String)bindvar[0];
    Object varValue = bindvar[1];Hope this helps,
    Jeroen

  • View link creation on two view objects, and both view objects are populated program(not from sql)

    I have master and detail VO , both views data is loaded in program. Now for show/hide feature, I create View Link Object and using one element from both child and master VO , View Link Object created properly.
    But I can not able to add that view link object into AM.
    Now because of that , I cannot say what is a instance name of that view link object.
    Hence getting following error  -- Invalid or missing view link. Please attach view link with the bean.
    Please can you provide some directions.

    I have master and detail VO , both views data is loaded in program. Now for show/hide feature, I create View Link Object and using one element from both child and master VO , View Link Object created properly.
    But I can not able to add that view link object into AM.
    Now because of that , I cannot say what is a instance name of that view link object.
    Hence getting following error  -- Invalid or missing view link. Please attach view link with the bean.
    Please can you provide some directions.

  • DVCProHD Tape-Based Capture /  Transfer to Avid - Best Practices?

    I may seem to be going a little "old-school" with this question, so please bear with me.
    I am fairly adept in tape-less acquisition and on-set media management, however this next project has me working with several Panasonic HDX900's (tape-based).
    The production has decided to use Premiere for the initial Transfer and Avid for the editing (facilities decision).
    We will be shooting in the DVCProHD codec.
    My question is:
    When capturing in Premiere 5.5, what is the best quality codec to use which is cross-platform compatible with Avid Media composer.
    I was thinking of having the initial tape capture and audio sync in Premiere and exporting an AAF.
    Any comments/suggestions would be much appreciated.
    Thank you,
    Matt Efsic
    Ventura, CA
    AC / DMT / Now being asked to incorporate Post Workflow.

    The production has decided to use Premiere for the initial Transfer and Avid for the editing (facilities decision).
    This seems a needlessly poor decision.
    I can't imagine why the facility would make this choice, aside from
    possibly avoiding a scheduling conflict by not using the AVID suite for capturing.
    When capturing in Premiere 5.5, what is the best quality codec to use which is cross-platform compatible with Avid Media composer.
    You have no selectable control over the capture codec in Premiere.
    I have not tested it, but AVID will likely have no problem editing media captured in Premiere.
    I Would suggest running a test before you commit to that workflow.

  • Sales hierarchy . role based reports and Data access, Best practice and sol

    Dear all,
    Currently working on a solution for Sales. There a geography and sales position hierarchy.
    e.g. (USA,EU,ASIA) --> EU head -->UK head -->Northern UK head -->London head -->East london--> Postal codes in east london.
    so altogether 7 roles and 7 positions, all these users can see data at it's level and below.
    Also the summary report/ Prompts/ subject area columns for each of these users must be at their corresponding level and just 1 level below.
    e.g. EU head by default must see column EU and country UK, UK head will see report only for UK and Northern UK region and so on.
    After lots of thinking i am planing to take approach of creating 6 sets of similar dashboard/ different prompts/ different global filters/ reports.
    Data level access is not at all issue i am easily able to manage.
    Request experts to guide is there is any other better approach to take for objects in catalog.?
    many thanks in advance.
    Regards,
    Yogen

    Dear Srini,
    Data level Security is not at all issue for me. Have already implement it and so far not a single bug in testing is caught.
    It's about object level security and that too for 6 different types of user demanding different reports i.e. columns and detailed drill downs are different.
    Again these 6 types of users can be read only users or power users (who can do ad hoc analysis) may be BICONSUMER and BIAUTHOR.
    so need help regarding that...as we have to take decision soon.
    thanks,
    Yogen

  • Upgraded to CS5, CS4 apps still in place. OK to remove? Best practice?

    No problem to report just a minor dilema.
    Upgrade to CS5 is completed and all the previous CS4 application folders are still in place and functional.
    What is the best practice regarding the previous version?
    Leave them be.
    Move to trash.
    Uninstall (when provided).
    Thanks for your help.
    Pete
    iMac • Intel Core i7 • 2.8 GHz • 8 GB RAM • OS X 10.6.7

    Bob,
    One follow-up question. What about the earlier Acrobat component? Backward compatibility isn't problematic in the case of Acrobat correct?
    Thanks for your time.
    Pete
    iMac • 2.8 GHz Intel Core i7  •  8 GB RAM  • OS X 10.6.7
    Adobe CS5.x Design Premium

Maybe you are looking for