Entity Based View Object ROWID

Hi,
This might be a little hard to explain, but I have an entity object, and a view object that is based off of that EO. The EO is using a ROWID for its primary key. Now, the view object I have is querying a view in the database, but when I do not include the ROWID attribute in my view object, the LOV using the view object works.
However sometimes I get this error:
"oracle.jbo.PersistenceException, msg=JBO-26028: View object SponsorVwView does not include a primary key attribute RowId of entity base SponsorVw."
And in the view object I get:
"The attributes that represent the primary key of SponsorVw are missing from your query"
So when I add the ROWID which is the primary key the LOV does not work.
Does anyone have any ideas?

Tullio:
Sorry but I don't understand the workaround : if I
insert my row in both VO I'll find it 2 times when I
commit.You won't. The view row from the second VO will point to the same entity row as the row from the first VO. When you commit, we will only insert one database row.
Thanks.
Sung

Similar Messages

  • Error while Insert new Row in Entity Base View Object

    Hi,
    can someone tell me the reason of following problem? :
    There is a Entity Base View object, which is Binded as ADF Table in a JSFX Page.
    I took the standard operations from the Control Panel: CreateInsert, Commit and Rollback.
    Places them a ADF Buttons.
    Whenever i am trying to insert a Row, after commit i am getting the ORA Error: ORA-01410: invalid ROWID.
    By the way: The Entity Object is using the RowID as Primary Key.
    When i press commit a second time, the the Row is inserted in the Database.
    Any Idea, how to workarround this ORA Error?
    Thank You!

    n by default if you had no pkconstrainst in db,
    in jdev default rowid as prim key.
    as john said make the key as proper.
    and do it.
    if you have db constrainst in db.
    it can be achived by dbconstrainstname with ora.
    what am saying dbconstranist name will map it ora.
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvgen.htm#BABEFGCI

  • Implementing History types on query based view object attributes

    Hi All,
    I have to implement the history types
    created on,
    created by,
    modified on,
    modified by
    in my application, but I have all the Query based view objects in my work space, but according to my research History types can only be implemented on the Entity Objects attributes. So how can I do this for my application ? Any Solution ? Any alternative  please ?
    (NOTE: I have all the entity objects available in my common Model work space ).

    @TimoHahn, I have the following master view object query, which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?
    SELECT  NVL(A.STYP,0) STYP,A.DAT,C.BATNO,C.ITST, B.DEMNO,B.ITEM,LTRIM(RTRIM(D.ITEMNAME))ITEM_NAME,0 TRINQ,D.UOM ABRV,P.DAT DDAT,
        A.CSNO,PARTY,NVL(CSRAT,0)+(NVL(CSRAT,0)*NVL(B.GST,0))/100 GSTCSRAT,CSRAT,
        A.PDAYS DAYS, DECODE(C.CSTERM,1,'CASH',2,'CREDIT',3,'DD',4,'PAY ORDER',5,'ADVANCE%',6,'CHEQUE') ,B.GST,E.MASTDS PNAME,NVL(SUM(B.RQTY),0)DRQTY,DEPT.SEC_NAME DEPTDS,SUM(STOK.QTY) BAL,P.TRNO,C.EBY, C.SYSIP, C.TDAT
                  FROM ACCSTORE.STAC_CSM A, ACCSTORE.STAC_CSD B,ACCSTORE.ST_STAC_DEM_APRVD C,ACCSTORE.VITEMS D, ACC_MAST E,ACCSTORE.PRE_DEMANDM P,ACCSTORE.VSECTIONS DEPT,
                  (SELECT STYP,ITEMID,SUM(BALANCE) QTY FROM ACCSTORE.VITEMSTOCK GROUP BY STYP,ITEMID) STOK
                  WHERE A.CSNO=B.CSNO AND B.CSNO=C.CSNO AND B.DEMNO=C.DEMNO AND B.ITEM=C.ITEM AND B.STYP=C.STYP  AND C.PDEMNO=P.TRNO(+) AND P.DEPT=DIVNO AND P.SEC_NO=DEPT.SECNO(+)
                              AND C.STYP=STOK.STYP AND C.ITEM=STOK.ITEMID
                    AND C.STYP=D.STYP AND C.ITEM=D.ITEMID AND C.PARTY=E.MASTCD  AND B.APP=1 AND NVL(C.PONO,0)=0 
                    AND C.ITST=DECODE(C.STYP,0,11,14)
                    GROUP BY NVL(A.STYP,0),A.DAT,C.BATNO,C.ITST,B.DEMNO,B.ITEM,D.ITEMNAME,A.CSNO,PARTY,P.DAT,DEPT.SEC_NAME,P.TRNO,C.EBY, C.SYSIP, C.TDAT,
                    CSRAT,A.PDAYS,C.CSTERM,B.GST,E.MASTDS,D.UOM ORDER BY A.CSNO,D.ITEMNAME
    ORDER BY "DAT" DESC
    which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?

  • Issues in persisting dynamic entity and view objects using MDS

    Hi All,
    I'm trying to create dynamic entity and view objects per user session and to persist these objects throughout the session, I'm trying to use MDS configurations(either file or Database) in adf-config.xml.
    I'm facing following two errors while trying to run the app module:
    1. MDS error (MetadataNotFoundException): MDS-00013: no metadata found for metadata object "/model/DynamicEntityGenModuleOperations.xml"
    2. oracle.mds.exception.ReadOnlyStoreException: MDS-01273: The operation on the resource /sessiondef/dynamic/DynamicDeptEntityDef.xml failed because source metadata store mapped to the namespace / DEFAULT is read only.
    I've gone through the following links which talks about the cause of the issue, but still can't figure out the issue in the code or the config file. Please help if, someone has faced a similar issue.
    [http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG |http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG ]
    [http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm|http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm]
    Attached is the code for dynamic entity/view object generation and corresponding adf-config.xml used.
    ///////////App Module Implementation Class/////////////////////////
    public class DynamicEntityGenModuleImpl extends ApplicationModuleImpl implements DynamicEntityGenModule {
    private static final String DYNAMIC_DETP_VO_INSTANCE = "DynamicDeptVO";
    * This is the default constructor (do not remove).
    public DynamicEntityGenModuleImpl() {
    public ViewObjectImpl getDepartmentsView1() {
    return (ViewObjectImpl) findViewObject("DynamicDeptVO");
    public void buildDynamicDeptComp() {
    ViewObject internalDynamicVO = findViewObject(DYNAMIC_DETP_VO_INSTANCE);
    if (internalDynamicVO != null) {
    System.out.println("OK VO exists, return Defn- " + internalDynamicVO.getDefFullName());
    return;
    EntityDefImpl deptEntDef = buildDeptEntitySessionDef();
    ViewDefImpl viewDef = buildDeptViewSessionDef(deptEntDef);
    addViewToPdefApplicationModule(viewDef);
    private EntityDefImpl buildDeptEntitySessionDef() {
    try {
    EntityDefImpl entDef = new EntityDefImpl(oracle.jbo.server.EntityDefImpl.DEF_SCOPE_SESSION, "DynamicDeptEntityDef");
    entDef.setFullName(entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setName(entDef.getName());
    System.out.println("Application Module Path name: " + getDefFullName());
    System.out.println("EntDef :" + entDef.getFileName() + " : " + entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setAliasName(entDef.getName());
    entDef.setSource("DEPT");
    entDef.setSourceType("table");
    entDef.addAttribute("ID", "ID", Integer.class, true, false, true);
    entDef.addAttribute("Name", "NAME", String.class, false, false, true);
    entDef.addAttribute("Location", "LOCATION", Integer.class, false, false, true);
    entDef.resolveDefObject();
    entDef.registerSessionDefObject();
    entDef.writeXMLContents();
    entDef.saveXMLContents();
    return entDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private ViewDefImpl buildDeptViewSessionDef(EntityDefImpl entityDef) {
    try {
    ViewDefImpl viewDef = new oracle.jbo.server.ViewDefImpl(oracle.jbo.server.ViewDefImpl.DEF_SCOPE_SESSION, "DynamicDeptViewDef");
    viewDef.setFullName(viewDef.getBasePackage() + ".dynamic." + viewDef.getName());
    System.out.println("ViewDef :" + viewDef.getFileName());
    viewDef.setUseGlueCode(false);
    viewDef.setIterMode(RowIterator.ITER_MODE_LAST_PAGE_FULL);
    viewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
    viewDef.setSelectClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.setFromClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.addEntityUsage("DynamicDeptUsage", entityDef.getFullName(), false, false);
    viewDef.addAllEntityAttributes("DynamicDeptUsage");
    viewDef.resolveDefObject();
    viewDef.registerSessionDefObject();
    viewDef.writeXMLContents();
    viewDef.saveXMLContents();
    return viewDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private void addViewToPdefApplicationModule(ViewDefImpl viewDef) {
    oracle.jbo.server.PDefApplicationModule pDefAM = oracle.jbo.server.PDefApplicationModule.findDefObject(getDefFullName());
    if (pDefAM == null) {
    pDefAM = new oracle.jbo.server.PDefApplicationModule();
    pDefAM.setFullName(getDefFullName());
    pDefAM.setEditable(true);
    pDefAM.createViewObject(DYNAMIC_DETP_VO_INSTANCE, viewDef.getFullName());
    pDefAM.applyPersonalization(this);
    pDefAM.writeXMLContents();
    pDefAM.saveXMLContents();
    ////////adf-config.xml//////////////////////
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
    xmlns:sec="http://xmlns.oracle.com/adf/security/config">
    <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults useBindVarsForViewCriteriaLiterals="true"/>
    <startup>
    <amconfig-overrides>
    <config:Database jbo.locking.mode="optimistic"/>
    </amconfig-overrides>
    </startup>
    </adf-adfm-config>
    <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="TestDynamicEC-8827"/>
    </adf:adf-properties-child>
    <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore" credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
    </sec:adf-security-child>
    <persistence-config>
    <metadata-namespaces>
    <namespace metadata-store-usage="mdsRepos" path="/sessiondef/"/>
    <namespace path="/model/" metadata-store-usage="mdsRepos"/>
    </metadata-namespaces>
    <metadata-store-usages>
    <metadata-store-usage default-cust-store="true" deploy-target="true" id="mdsRepos">
    <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
    <property name="metadata-path" value="/tmp"/>
    <!-- <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
    <property name="jndi-datasource" value="jdbc/TestDynamicEC"/>
    <property name="repository-name" value="TestDynamicEC"/>
    <property name="jdbc-userid" value="adfmay28"/>
    <property name="jdbc-password" value="adfmay28"/>
    <property name="jdbc-url" value="jdbc:oracle:thin:@localhost:1521:XE"/>-->
    </metadata-store>
    </metadata-store-usage>
    </metadata-store-usages>
    </persistence-config>
    </adf-config>
    //////////////////////////////////////////////////////////////////////////////////////////////////////////

    Hi Frank,
    I m trying to save entity and view object xml by calling writeXMLContents() and saveXMLContents() so that these objects can be retrieved using the xmls later on.
    These methods internally use MDS configuration in adf-config.xml, which is creating the issue.
    Please share your thoughts on resolving this or if, there is any other way of creating dynamic entity/view objects for db tables created at runtime.
    Nik

  • How to access query based view object in backing bean

    Hi
    I am using JDev11.1.2.1.0
    I want to use the query result of query based view object in backing bean.
    How can i do the same
    Please Solve this
    Thanks

    Hi,
    Assuming ADF is in the picture
    1. Create a PageDef file for the page (right mouse click "Go to Page Definition")
    2. In the Executable section, create an iterator for the View Object
    3. In the managed bean:
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCIteratorBinding iter = (DCIteratorBinding ) bindings.get("name of Iterator");
    iter.execute();
    // ... navigate the iterator rows ...//
    Frank

  • Newbie question about entity and view objects

    Hi everyone,
    My first ADF application in JDeveloper is off to a difficult start. Having come from a forms background, I know that it is necessary avoid using post-query type lookups in order to have full filtering using F11/Ctrl+F11. This means creating an CRUDable view and getting as much of the lookup data as possible into the view without losing the ability to modify the data. In JDeveloper, I do not know how to build my data model to support that. My thought was to start with a robust updateable view as my main CRUD EO and then create a VO on top of that with additional EOs or VOs. But, I have found that I cannot add VOs to another VO. However, if I link the VOs then I have a master-detail which will not work for me.
    For example, I have two joins to CSI_INST_EXTEND_ATTRIB_V shown in the queries below and need to have that show in the table displaying the CRUD VO’s data. It seemed that the best way to do this is to create a CSI_INST_EXTEND_ATTRIB_V entity object and view object. The view object would have two parameters, P_INSTANCE_ID and P_ATTRIBUTE name. Both the building and the unit are needed on the same record, and this is not a master-detail even though it might look that way. (A master-detail data control will not work for me because I need all this data to appear on the same line in the table.) So, I need help figuring out the best way to link these to the main (CRUD) view; I want as much of this data as possible to be filterable.
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'BUILDING NAME'
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'UNIT NAME'
    Ultimately, I need to display a ton of data in each record displayed in the UI table, so a ton of joins will be needed. And, I need to be able to add records using the UI table also.
    James

    Hi Alejandro,
    Sorry if I caused confusion with my first post. What I had in mind assumed that I could have a single CSI_INST_EXTEND_ATTRIB_V EO with a BuildingVO and UnitVO on top of it. So, I wrote the queries individually to show how I would invoke each view. When I realized that confused the issue, I rewrote the query to explain things better.
    Now having seen your 2 queries. You need to create 2 EO. One for each table. Then create an association between the 2 aeO (this will be the join you are talking about). Then, you need to create a VO based on one of the EO and after you can modify and add the second EO (in here you select the join type).
    After your done with this, youll have 1 VO that supports CRUD in both tables.
    There were three tables in the query: CIEAV_BUILDING, CIEAV_UNIT, and T -- the main CRUD table. When you say that I should create two EOs, do you mean that they are to be for CIEAV_BUILDING and CIEAV_UNIT? Or, CIEAV and T? Assuming CIEAV and T, that sounds like it would allow me to show my building or unit on the record but not both.
    By the way, everything is a reference except for the main CRUD table.
    Look forward to hearing from you. Thanks for your help (and patience).

  • New view object row does not get committed to DB

    Hi guys,
    on a taskflow with a new transaction I have a form to enter a new record on an entity-based view object.
    Before the page is called I call the CreateInsert Operation to create the new record on that view object.
    There are quite a few attributes that have default values which I determine in the ViewRowImpl's create method (using populateAttributeAsChanged to set the values).
    Now if none of the inputValues in the form is filled manually and I want to save the data (default values are sufficient to save the record) the taskflow return action commit does not commit the data to the db. As soon as I manually enter one value into any field the same return action commits the record correctly to the db. There is no error message and the new record is visible in the application because it is inserted into the view's iterator...
    Is there any way to mark the new row as changed/insert if only the default values are filled? Or am I doing something wrong?
    Using JDev 11.1.1.5
    Achim

    Add the following method in your RowImpl class:
    public void setNewRowState(byte b) {
         if (b != Row.STATUS_INITIALIZED ||
             getNewRowState() != Row.STATUS_NEW) {
             super.setNewRowState(b);

  • Triansient view objects vs updatable views...

    In the SRDEMO, they use the transient view objects to create a new request,They never used the eupdatable entity objects in create mode.Can i know the advantages of using transient views over the updatable views...

    There are no real advantages. Transient view objects are one technique to save per-user pending session state that different pages need to see. The create pages could have also been implementing using a straightforward entity-based view object using the Create built-in operation. The demo did it that way since it was the closest ADF BC equivalent to the way that the parallel EJB version of the demo.
    Section 13.6 "Creating an Input Form" of the ADF Developer's Guide for Forms/4GL Developers covers the Create-based way of making an input/create form.

  • Can Designer generate ADF Entity Objects, View Objects and Apps Module ?

    Hi all,
    On what way can Designer integrate with JDeveloper (+ ADF) ?
    Can Designer generate ADF Entity Objects, View Objects and Apps Module ?
    Thank you for your help,
    xtanto

    Designer itself has no direct integration with JDeveloper. However, there are three options. First of all, you can get a JDeveloper extension (download this separately) that lets you create a Connection to a Designer repository. From that Connection you can find modules that you defined in Designer and generate Entity and View objects for the tables and columns that you used in those modules, and an Application Module. It does not create JSPs or other user interface objects.
    Another option is to buy JHeadstart from Oracle. This contains a set of code generators and ADF extensions that include an ability to get information from a Designer repository. JHeadstart works fine for non-Designer users too, but was built by the same people who wrote Designer Headstart - they know the repository API intimately.
    The third option is to download Oracle Designer Extension Builder (ODEB) which was just recently made available. This is a product of a collaboration between Designer users from the Oracle Development Tools Users Group (ODTUG) and Oracle to extend the capabilities of Designer with user written tools and utilities. You could use ODEB to write your own generators for ADF Business Components. Or you could wait and see if someone else in the user community does this. I hope that you or whoever does such a generator will be willing to share it with us all.

  • Dynamically subsetting a LOV based on a View Object

    Hi,
    Hoping you guys can help out. I am having issues with Partial Page Refresh and Dynamically
    STATUS table ( STATUS_ID NUMBER, STATUS_NAME VARCHAR2(10)) with values 1 = Open, 2 = Won, 3 = Lost
    ACTIVITIES ( ACTIVITY_ID NUMBER, ACTIVITY_NAME VARCHAR2(20), STATUS_ID NUMBER)
    The list of permissible activities is dependent on the value of the Status Id and both are shown as LOV's in the same popup/dialog.
    I've created EO's and VO's for both tables. I've created a query based view object called voPermissableActivities with sql "select * from activities act where act.status_id = :pStatusId " and have set up the bind variables, etc.
    Against the Activities VO I created a LOV for the ActivityId using the voPermissableActivities.
    I've set the autosubmit property of the Status Id LOV to true and created a ValueChangeListener for the Status LOV in the backing bean. I've also set the partialRefresh property of the Opportunity LOV to point to the Status LOV
    In the StatusChange listener I
    1. get the a DCIteratorBinding which points to the view iterator underpinning the two LOV's
    2. using the iterator I get the value of the Status LOV
    3. I then grab a reference to the ViewObject for voPermissableActivities and set the bind variable pStatusId to reflect the value of the Status LOV using the following code snippet
    ViewRowSetImpl vOppRSI = (ViewRowSetImpl) currentRow.getAttribute ( "voAccountOpportunity1");
    ViewObject voOpportunities = vOppRSI.getViewObject();
    voOpportunities.setNamedWhereClauseParam("StatusId", currentRow.getAttribute("StatusId"));
    System.out.println ( "Est. Row Count : "+voOpportunities.getEstimatedRowCount());
    voOpportunities.executeQuery();
    System.out.println ( "VO Query: "+voOpportunities.getQuery());
    I've got a tonne of debugging code in the method and can see the server log accurately reflecting changes at the UI layer - so I know it's working properly - also the estimatedRowCount returns values I would expect to see. However, the values in the LOV based on the voPermissableActivities view are not changing. So, I'm guessing that the LOV does not properly get refreshed !? or at least, the ADF framework does not automatically refresh it. So, I then found the following snippet to pogrammetically refresh the LOV -
    System.out.println ( "Getting ADF Context");
    AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
    System.out.println ( "Calling PPR") ;
    adfFacesContext.addPartialTarget(getLovOpportunityId());
    System.out.println ( "after calling ppr");
    Any ideas? This is driving me crazy !!!

    Cheers Frank,
    That works fine where I have a discrete and manageably small set of potential values - in the snippet I included there were 3 potential values - and it is feasible to prepare three VO's to drive the LOV. However, in the PRODUCTION version of what I'm trying to do I may have many more.
    Any other thoughts?
    One approach I wanted to explore was dynamically creating the VO at run time. Would that work?

  • Using a polymorphic view object with binding

    Hi,
    I'm hoping there's something simple I'm missing when trying to setup up the bindings for a ADF/struts page using a polymorphic view object.
    I'm using Entity and VO polymorphism to create a Question which has different types - boolean, multi-choice, likert, etc. I have the various question types created as sub type entity and view objects and added to the app module - when added to the app module the question types are subtypes of QuestionView so they don't actually appear in the Data Controls palette. This setup is like that used in Steve Muench's examples (blog at http://radio.weblogs.com/0118231/stories/2003/02/06/constructingTheDesiredEntityInAPolymorphicViewObject.html and the related undocumented one)
    My question is, how do I get to the data and have jdev create the necessary bindings for the extra attributes the subtype questions have? Since they don't appear as available data controls I can't create a binding iterator or anything for them - short of adding them as spearate view objects (which destroys the whole point of using polymorphism in this case) is there a way to do this?
    Really, the only reason I want to use the polymorphism is so I can have different types of entity validation depending on the type. Should I just simplify this to be one entity object with one VO and put all the validation into "if else's" based on a discriminator?
    Assistance appreciated...
    - Nathaniel

    How else are you planning to associate a JUTableBinding to the 'common' iterator containing all four types of rows and then selectively display them? Perhaps you'd need a custom model over the JUTabelModel that'd filter the rows out.
    I'm not sure if all that trouble is worth it given that your datasets (as far as mentioned in this post) are not large. If these tables/data has to be refreshed/executed a number of times, then you may see the overhead of four queries otherwise it should be fine as database is always faster in filtering rows than doing that in memory.

  • View Object Transient attribute, refresh problem.

    I have a VO which contains 3 entities joined. I added it a transient attribute with Groovy expression. My expression is : ReplyView.count("ReplyId"); , it counts two VO relationship. it counts normally but, when i insert a new reply, it doesnt refresh/update/recalculate the value. Whats the problem?

    The dependency values referred to are accessed when you edit the transient attribute in the view object. On the left hand panel select dependencies and shuttle the columns that the transient is dependent on. I don't think this matters for non-entity based views since the SQL is fixed but for entity based views this assures the dependent columns are added to the query even if they are not needed by the page.
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcentities.htm#ADFFD20177

  • Using SQL view object to create ADF table

    Hi,
    I have created a column called "Month" (which extracts month from the date column) and another column to count the no. of requests.
    i want to create an ADF table with 2 columns, a column showing the month and another is showing the no. of requests for that month.
    However, now I only managed to achieve the ADF table to show the overall total requests, which means if i add up all the requests for all the months and i get 500
    My ADF table shows this:
    Jan: 500
    Feb: 500
    Mar: 500
    How should I create the view or what should I do to make it such that the no. of request is based on the month?
    Please advice.
    Thanks (:

    Hi,
    For the given situation you can create a Query Based View Object with the following query
    SELECT
    COUNT(TEMP1.DT) REQUEST,
    TO_CHAR(TEMP1.DT, 'Mon') MONTH
    FROM
    TEMP1
    GROUP BY
    TO_CHAR(TEMP1.DT, 'Mon')
    where DT is the date column and temp1 is the name of the database table.
    Following are the steps that i followed to get this query :
    i have taken the following sample table :
    create table temp1
    (srno number primary key,
    dt date)
    *Note you may use any existing column instead of srno or use dt only (i took an extra column as u know we need a primary key /row id)
    the following is the sample data
    insert into temp1 values (1,sysdate);
    insert into temp1 values (2,sysdate);
    insert into temp1 values (3,add_months(sysdate,1));
    insert into temp1 values (4,add_months(sysdate,1));
    insert into temp1 values (5,add_months(sysdate,3));
    insert into temp1 values (6,add_months(sysdate,5));
    the table appears as follows
    SRNO DT
    1 22-JUN-12
    2 22-JUN-12
    3 22-JUL-12
    4 22-JUL-12
    5 22-SEP-12
    6 22-NOV-12
    To start with ADF View Object Creation (Using Jdeveloper 11.1.2):
    Create the view object using Create View Object wizard
    In Step 1. Name window
    set the value for Name : Viewab (you can use any of ur choice)
    In the data source section : select query
    In Step 2. Query window
    a. Click Query builder (it will pop up sql statment window)
    b. In the SQL Statement window
    in quick-pick objects section -> select temp1 table -> shuttle the columns from available list to selected list
    in select clause section -> select srno column from select list-> choose count() function from function drop down list -> insert function -> set alias to REQUEST-> click validate
    now select dt column from select list -> choose to_char() function -> click insert function -> alter the function to to_Char(temp1.DT,'Mon') -> set alias to Month -> click validate
    in the group by clause section -> Click the green symbol to add -> from the expression palette insert dt column -> insert the to_char function -> alter the function to to_char(temp1.DT,'Mon') -> click validate
    in the Entire SQL Query section -> click test query -> in the test query window -> click query result-> you will see the result -> click close -> click ok
    Click next
    Step 3: Bind Variables
    Click Next
    Step 4: Attribute Mappings
    click Finish
    So the view object is ready :)

  • View Object is invalid due to SYSTEM.MODE is not recognized inside SQL

    Hi All,
    I tried recreating a Oracle form 9i to ADF BC using Jheadstart 10.1.3.3.81, JHS converted the form(converted .xml) generating the Entity and View Objects.
    But among the generated View Objects few are invalid due to which the generated .jspx page is partial in result compared to Original form.
    I have pasted the SQL generated from one of the View Object which is invalid. I tried fixing this SQL from SQL Navigator but I get Invalid function error for SYSTEM.MODE and Not an Object or REF for :INSHST.FACILITY_ID. Can anyone help me out in fixing this Issue?
    SELECT VSLHST.LAST_UPDATE_LOGIN,
    VSLHST.LAST_UPDATE_DATE,
    VSLHST.LAST_UPDATED_BY,
    VSLHST.CREATION_DATE,
    VSLHST.CREATED_BY,
    VSLHST.POST_VOLUME,
    VSLHST.POST_LEVEL_PERCENT,
    VSLHST.POST_TEMPERATURE,
    VSLHST.POST_GAS_PRESSURE,
    VSLHST.POST_LEVEL,
    VSLHST.EQUIPMENT_ID,
    VSLHST.EQUIPMENT_INSTALLATION_ID,
    VSLHST.EQUIPMENT_FACILITY_ID,
    VSLHST.INSTALLATION_HISTORY_ID,
    VSLHST.INSTALLATION_ID,
    VSLHST.FACILITY_ID,
    VSLHST.VESSEL_HISTORY_ID,
    (select DSP_DI_WATER_VOLUME
    from (SELECT EQU.EQUIPMENT_CODE L_EQUIPMENT_CODE,
    EQU.DESCRIPTION DSP_DESCRIPTION,
    EQ.FACILITY_ID L_FACILITY_ID,
    EQ.INSTALLATION_ID L_INSTALLATION_ID,
    EQ.EQUIPMENT_ID L_EQUIPMENT_ID,
    EQ.DI_VESSEL_NUMBER DSP_DI_VESSEL_NUMBER,
    EQ.EQUIPMENT_CODE DSP_EQUIPMENT_CODE,
    EQ.DI_FULL_LEVEL DSP_DI_FULL_LEVEL,
    EQ.CAPACITY_QUANTITY DSP_CAPACITY_QUANTITY,
    EQ.UNIT_OF_MEASURE DSP_UNIT_OF_MEASURE,
    EQ.DI_WATER_VOLUME DSP_DI_WATER_VOLUME
    FROM CP_EQUIPMENTS EQ, CP_X_EQUIPMENT_TYPES EQU
    WHERE (((:SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_QWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_QWC_END VSLHST.EQ */
    )) OR ((NOT :SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_VWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_VWC_END VSLHST.EQ */
    AND EQ.EQUIPMENT_CODE = EQU.EQUIPMENT_CODE
    ORDER BY L_EQUIPMENT_CODE) LOVQUERY
    where 1 = 1
    and LOVQUERY.L_FACILITY_ID = VSLHST.EQUIPMENT_FACILITY_ID
    and LOVQUERY.L_INSTALLATION_ID = VSLHST.EQUIPMENT_INSTALLATION_ID
    and LOVQUERY.L_EQUIPMENT_ID = VSLHST.EQUIPMENT_ID) AS DSP_DI_WATER_VOLUME,
    (select DSP_UNIT_OF_MEASURE
    from (SELECT EQU.EQUIPMENT_CODE L_EQUIPMENT_CODE,
    EQU.DESCRIPTION DSP_DESCRIPTION,
    EQ.FACILITY_ID L_FACILITY_ID,
    EQ.INSTALLATION_ID L_INSTALLATION_ID,
    EQ.EQUIPMENT_ID L_EQUIPMENT_ID,
    EQ.DI_VESSEL_NUMBER DSP_DI_VESSEL_NUMBER,
    EQ.EQUIPMENT_CODE DSP_EQUIPMENT_CODE,
    EQ.DI_FULL_LEVEL DSP_DI_FULL_LEVEL,
    EQ.CAPACITY_QUANTITY DSP_CAPACITY_QUANTITY,
    EQ.UNIT_OF_MEASURE DSP_UNIT_OF_MEASURE,
    EQ.DI_WATER_VOLUME DSP_DI_WATER_VOLUME
    FROM CP_EQUIPMENTS EQ, CP_X_EQUIPMENT_TYPES EQU
    WHERE (((:SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_QWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_QWC_END VSLHST.EQ */
    )) OR ((NOT :SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_VWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_VWC_END VSLHST.EQ */
    AND EQ.EQUIPMENT_CODE = EQU.EQUIPMENT_CODE
    ORDER BY L_EQUIPMENT_CODE) LOVQUERY
    where 1 = 1
    and LOVQUERY.L_FACILITY_ID = VSLHST.EQUIPMENT_FACILITY_ID
    and LOVQUERY.L_INSTALLATION_ID = VSLHST.EQUIPMENT_INSTALLATION_ID
    and LOVQUERY.L_EQUIPMENT_ID = VSLHST.EQUIPMENT_ID) AS DSP_UNIT_OF_MEASURE,
    (select DSP_CAPACITY_QUANTITY
    from (SELECT EQU.EQUIPMENT_CODE L_EQUIPMENT_CODE,
    EQU.DESCRIPTION DSP_DESCRIPTION,
    EQ.FACILITY_ID L_FACILITY_ID,
    EQ.INSTALLATION_ID L_INSTALLATION_ID,
    EQ.EQUIPMENT_ID L_EQUIPMENT_ID,
    EQ.DI_VESSEL_NUMBER DSP_DI_VESSEL_NUMBER,
    EQ.EQUIPMENT_CODE DSP_EQUIPMENT_CODE,
    EQ.DI_FULL_LEVEL DSP_DI_FULL_LEVEL,
    EQ.CAPACITY_QUANTITY DSP_CAPACITY_QUANTITY,
    EQ.UNIT_OF_MEASURE DSP_UNIT_OF_MEASURE,
    EQ.DI_WATER_VOLUME DSP_DI_WATER_VOLUME
    FROM CP_EQUIPMENTS EQ, CP_X_EQUIPMENT_TYPES EQU
    WHERE (((:SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_QWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_QWC_END VSLHST.EQ */
    )) OR ((NOT :SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_VWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_VWC_END VSLHST.EQ */
    AND EQ.EQUIPMENT_CODE = EQU.EQUIPMENT_CODE
    ORDER BY L_EQUIPMENT_CODE) LOVQUERY
    where 1 = 1
    and LOVQUERY.L_FACILITY_ID = VSLHST.EQUIPMENT_FACILITY_ID
    and LOVQUERY.L_INSTALLATION_ID = VSLHST.EQUIPMENT_INSTALLATION_ID
    and LOVQUERY.L_EQUIPMENT_ID = VSLHST.EQUIPMENT_ID) AS DSP_CAPACITY_QUANTITY,
    (select DSP_DI_FULL_LEVEL
    from (SELECT EQU.EQUIPMENT_CODE L_EQUIPMENT_CODE,
    EQU.DESCRIPTION DSP_DESCRIPTION,
    EQ.FACILITY_ID L_FACILITY_ID,
    EQ.INSTALLATION_ID L_INSTALLATION_ID,
    EQ.EQUIPMENT_ID L_EQUIPMENT_ID,
    EQ.DI_VESSEL_NUMBER DSP_DI_VESSEL_NUMBER,
    EQ.EQUIPMENT_CODE DSP_EQUIPMENT_CODE,
    EQ.DI_FULL_LEVEL DSP_DI_FULL_LEVEL,
    EQ.CAPACITY_QUANTITY DSP_CAPACITY_QUANTITY,
    EQ.UNIT_OF_MEASURE DSP_UNIT_OF_MEASURE,
    EQ.DI_WATER_VOLUME DSP_DI_WATER_VOLUME
    FROM CP_EQUIPMENTS EQ, CP_X_EQUIPMENT_TYPES EQU
    WHERE (((:SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_QWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_QWC_END VSLHST.EQ */
    )) OR ((NOT :SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_VWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_VWC_END VSLHST.EQ */
    AND EQ.EQUIPMENT_CODE = EQU.EQUIPMENT_CODE
    ORDER BY L_EQUIPMENT_CODE) LOVQUERY
    where 1 = 1
    and LOVQUERY.L_FACILITY_ID = VSLHST.EQUIPMENT_FACILITY_ID
    and LOVQUERY.L_INSTALLATION_ID = VSLHST.EQUIPMENT_INSTALLATION_ID
    and LOVQUERY.L_EQUIPMENT_ID = VSLHST.EQUIPMENT_ID) AS DSP_DI_FULL_LEVEL,
    (select DSP_DESCRIPTION
    from (SELECT EQU.EQUIPMENT_CODE L_EQUIPMENT_CODE,
    EQU.DESCRIPTION DSP_DESCRIPTION,
    EQ.FACILITY_ID L_FACILITY_ID,
    EQ.INSTALLATION_ID L_INSTALLATION_ID,
    EQ.EQUIPMENT_ID L_EQUIPMENT_ID,
    EQ.DI_VESSEL_NUMBER DSP_DI_VESSEL_NUMBER,
    EQ.EQUIPMENT_CODE DSP_EQUIPMENT_CODE,
    EQ.DI_FULL_LEVEL DSP_DI_FULL_LEVEL,
    EQ.CAPACITY_QUANTITY DSP_CAPACITY_QUANTITY,
    EQ.UNIT_OF_MEASURE DSP_UNIT_OF_MEASURE,
    EQ.DI_WATER_VOLUME DSP_DI_WATER_VOLUME
    FROM CP_EQUIPMENTS EQ, CP_X_EQUIPMENT_TYPES EQU
    WHERE (((:SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_QWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_QWC_END VSLHST.EQ */
    )) OR ((NOT :SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_VWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_VWC_END VSLHST.EQ */
    AND EQ.EQUIPMENT_CODE = EQU.EQUIPMENT_CODE
    ORDER BY L_EQUIPMENT_CODE) LOVQUERY
    where 1 = 1
    and LOVQUERY.L_FACILITY_ID = VSLHST.EQUIPMENT_FACILITY_ID
    and LOVQUERY.L_INSTALLATION_ID = VSLHST.EQUIPMENT_INSTALLATION_ID
    and LOVQUERY.L_EQUIPMENT_ID = VSLHST.EQUIPMENT_ID) AS DSP_DESCRIPTION,
    (select DSP_DI_VESSEL_NUMBER
    from (SELECT EQU.EQUIPMENT_CODE L_EQUIPMENT_CODE,
    EQU.DESCRIPTION DSP_DESCRIPTION,
    EQ.FACILITY_ID L_FACILITY_ID,
    EQ.INSTALLATION_ID L_INSTALLATION_ID,
    EQ.EQUIPMENT_ID L_EQUIPMENT_ID,
    EQ.DI_VESSEL_NUMBER DSP_DI_VESSEL_NUMBER,
    EQ.EQUIPMENT_CODE DSP_EQUIPMENT_CODE,
    EQ.DI_FULL_LEVEL DSP_DI_FULL_LEVEL,
    EQ.CAPACITY_QUANTITY DSP_CAPACITY_QUANTITY,
    EQ.UNIT_OF_MEASURE DSP_UNIT_OF_MEASURE,
    EQ.DI_WATER_VOLUME DSP_DI_WATER_VOLUME
    FROM CP_EQUIPMENTS EQ, CP_X_EQUIPMENT_TYPES EQU
    WHERE (((:SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_QWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_QWC_END VSLHST.EQ */
    )) OR ((NOT :SYSTEM.MODE = 'ENTER-QUERY') AND
    ( /* CG$MDTU_VWC_START VSLHST.EQ */
    (EQ.facility_id = :INSHST.FACILITY_ID and
    EQ.installation_id = :INSHST.INSTALLATION_ID and
    (EQ.installed_date <= sysdate and
    (EQ.removal_date is null or
    EQ.removal_date >= sysdate) and
    (EQ.stop_fill_date is null or
    EQ.stop_fill_date >= sysdate))) /* CG$MDTU_VWC_END VSLHST.EQ */
    AND EQ.EQUIPMENT_CODE = EQU.EQUIPMENT_CODE
    ORDER BY L_EQUIPMENT_CODE) LOVQUERY
    where 1 = 1
    and LOVQUERY.L_FACILITY_ID = VSLHST.EQUIPMENT_FACILITY_ID
    and LOVQUERY.L_INSTALLATION_ID = VSLHST.EQUIPMENT_INSTALLATION_ID
    and LOVQUERY.L_EQUIPMENT_ID = VSLHST.EQUIPMENT_ID) AS DSP_DI_VESSEL_NUMBER
    FROM DI_VESSEL_HISTORIES VSLHST
    WHERE exists
    (select 1
    from CP_EQUIPMENTS EQ
    where (VSLHST.EQUIPMENT_FACILITY_ID = EQ.FACILITY_ID)
    and (VSLHST.EQUIPMENT_ID = EQ.EQUIPMENT_ID)
    and (VSLHST.EQUIPMENT_INSTALLATION_ID = EQ.INSTALLATION_ID)
    and EQ.FACILITY_ID = :b_INSHST_FACILITY_ID
    and EQ.INSTALLATION_ID = :b_INSHST_INSTALLATION_ID
    and (EQ.INSTALLED_DATE <= sysdate and
    (EQ.REMOVAL_DATE is null or EQ.REMOVAL_DATE >= sysdate) and
    (EQ.STOP_FILL_DATE is null or EQ.STOP_FILL_DATE >= sysdate)))
    Thanks In Advance,
    --Muniraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

    Muniraj,
    System.mode is forms specific, the Forms2ADFGenerator should convert this part of the SQL statement and put it between brackets.
    For references to block.item, it creates bind variables. Apparently, that did not happen. Can you send the <form_name>_
    extracted.xml file that is located in the root Java source direvtory of the model project to [email protected]?
    Thanks,
    Steven Davelaar,
    JHeadstart Team.

  • How to reset a particular view object alone to it's initial state??

    Hi,
    My application contains view objects with custom data source implementation. One of my requirement is to reset the particular view object alone to it's initial state. I can't use rollback since it is at Db Transaction level. I searched in forums and finally written the following coding to achieve it. It works fine during sometime but sometimes i am getting the exception oracle.jbo.DeadEntityAccessException: JBO-27101: Attempt to access dead entity in Person, key=oracle.jbo.Key[1 -10 ]
        public void resetPersonViewObject(String voName) {
            Iterator dirtyItr = this.getEntityDef(0).getAllEntityInstancesIterator(this.getDBTransaction());
            while (dirtyItr.hasNext()) {
                Object obj = dirtyItr.next();
                if (obj instanceof EntityImpl) {
                    EntityImpl entity = (EntityImpl)obj;
                    String state = null;
                    byte entityState = entity.getEntityState();
                    switch (entityState) {
                    case Entity.STATUS_INITIALIZED:
                        state = "Initialized";
                        // Don't do anything
                        break;
                    case Entity.STATUS_UNMODIFIED:
                        state = "Un-Modified";
                        // Don't do anything
                    case Entity.STATUS_DEAD:
                        state = "Dead";
                        // Don't do anything
                        break;
                    case Entity.STATUS_DELETED:
                        state = "Deleted";
                        entity.revert();
                        // entity.refresh(Entity.REFRESH_CONTAINEES);
                        break;
                    case Entity.STATUS_MODIFIED:
                        state = "Modified";
                        entity.refresh(Entity.REFRESH_UNDO_CHANGES);
                        break;
                    case Entity.STATUS_NEW:
                        state = "New";
                        entity.refresh(Entity.REFRESH_FORGET_NEW_ROWS);
                        entity.refresh(Entity.REFRESH_REMOVE_NEW_ROWS);
                        break;
                    System.err.println("State : " + state);
            getDBTransaction().clearEntityCache(getEntityDef(0).getFullName());
            getViewObject().clearCache();
    }Questions:
    1. How to achieve my requirement? Is there any code correction required?
    2. How to reset the row which is actually deleted by the user?
    3. The sample code shown above is applicable for all the view object instances which are created from the same entity? What should i do if i want to reset a particular instance of a view object (I may use different instance of same view object at various screens whereas i want to reset only one)
    Can anyone help on this??
    Thanks in advance.
    Raguraman
    Edited by: Raguraman on Apr 24, 2011 8:48 PM

    Hi,
    As per my requirement, i use various instances of same view object in various dynamic tabs only. Since each tab has its own transaction, refreshing an EO of a particular transaction will refresh only the VO instances which comes under that transaction. So it will not cause any issue for my requirement i hope.
    Requirement: Need to reset a particular entity driven view object instances.
    Tried Schema: Departments table of HR Schema. Tried using the Application Module tester.
    Code i use:
        // Client Interface method of DepartmentsViewImpl
        public void resetView() {
            Iterator dirtyItr =
                this.getEntityDef(0).getAllEntityInstancesIterator(this.getDBTransaction());
            while (dirtyItr.hasNext()) {
                Object obj = dirtyItr.next();
                if (obj instanceof EntityImpl) {
                    EntityImpl entity = (EntityImpl)obj;
                    byte entityState = entity.getEntityState();
                    switch (entityState) {
                    case Entity.STATUS_UNMODIFIED:
                        break;
                    case Entity.STATUS_INITIALIZED:
                        break;
                    case Entity.STATUS_DEAD:
                        break;
                    case Entity.STATUS_DELETED:
                        entity.refresh(Entity.REFRESH_WITH_DB_FORGET_CHANGES);
                        break;
                    case Entity.STATUS_MODIFIED:
                        entity.refresh(Entity.REFRESH_UNDO_CHANGES);
                        break;
                    case Entity.STATUS_NEW:
                        entity.refresh(Entity.REFRESH_FORGET_NEW_ROWS);
                        entity.refresh(Entity.REFRESH_REMOVE_NEW_ROWS);
                        break;
            getDBTransaction().clearEntityCache(getEntityDef(0).getFullName());
            getViewObject().clearCache();
    Issue i have:
    1. Add a blank row (Soon transaction has become dirty). Call the resetView() client interface. It gives me JBO-25303: Cannot clear entity cache model.eo.Departments because it has modified rows
    2. Modify any row and then delete the same row. Call the resetView(). It gives me JBO-27101: Attempt to access dead entity in Departments, key=oracle.jbo.Key[10 ]
    [NOTE:  Above code works fine when for simple deletion of rows, modification of existing rows, new rows]
    Edited by: Raguraman on Apr 24, 2011 8:48 PM

Maybe you are looking for

  • How do i find out the DPI of a photo ?

    i want to enter a photo in a 'contest'  ... the rule is that the photo has to be at least 300 DPI .... how do i determine what DPI my photo is ? i have iPhoto 9.2.3 thank you Donna

  • Wlc 2504 7.4.100 to 7.4.110 upgrade fails

    Hello, I've got a strange behaviour while upgrading my 2504 wlc from 7.4.100 to 7.4.110. I used the gui procedure to transfer the updated aes file to the wlc. The procedure started fine, finished downloading, and then the wlc got completely stuck on

  • What is the transaction to fill Setup tables for 2LIS_08TRFKZ

    Hello Friends, I am using OLI8BW setup table transaction for 2LIS_08TRFKZ extractor. Is this transaction correct?  Its not just working. Thanks Simmi

  • Ink levels in brand new cartridges not at 100%.

    I just installed several new cartridges in my HP Photosmart D7460 printer.  I need to print some important papers so I printed the Self Test Diagnostic Page immediately after installation.  Nothing else had been printed, nor did I do any of the clean

  • Config Check During IDOC Processing

    Hello experts: I am attempting to extend a material to a plant with IDOC.  I can get it to work, however I was bumping into required fields that I do not see, and are not altered to, being required when I enter values manually in SAP.  For example if