ADF: use of view link Accessor in Entity Object = always null?

Hi,
JClient 9.0.5.2, adf model.
I would like to use the view link accessor method in the master EO to retrieve detail EO values and the view link accessor method in the detail EO to retrieve master EO values.
Detail Rule:
In the detail EO an attribute is derived from an attribute of the master EO: detail attribute = master attribute.
Master Rule:
In the master EO an attribute is derived from the detail EO: master atribute set to 0 if detail EO exist else set to 0.
Tables:
Table Master => MasterEO => MasterVO
- masterPK (not updateable)
- masterField (not updateable)
- hasDetailsFlag
Table Detail => DetailEO => DetailVO
- detailPK (not updateable)
- masterPK => foreign key (not updateable)
- masterField (query only)
MasterDetailLink based on foreign key.
In link wizard I asked for the generation of following accessors in the source & destination Entity Objects:
In DetailEO accessor name: RetrieveFromMaster
In MasterEO accessor name: RetrieveFromDetail
In the DetailEO, I asked for the generation of the DetailEOImpl file, accessors and create method.
As wriiten in the file, before the create method:
** Add attribute defaulting logic in this method. **
I tought this is the place to retrieve the master attribute:
The code:
MasterVORowImpl masterVO = getRetrieveFromMaster();
if (masterVO == null)
System.out.println("MasterVORowImpl masterVO create NNNNNNNNNNNUUUUUUUULLLLLLLLLL");
The masterVO is always null?
I suppose I didn't understand something, my guest is that ViewObjects may not be used for default logic?
I know how to implement those rules in the database with triggers.
I think that the data I need for implementing those rules exist somewhere at the ADF level so retrieving the data from the db is not necessary?
Could somebody give some clues?
I didn't find a similar example in the Business Rules in BC4J document.
Your help will be appreciated
Frederic

Hi,
Detail Rule, copy attribute value form master.
In DetailEOImpl:
protected void create(AttributeList attributeList)
setAttribute(MASTERFIELD,this.getMaster().getMasterField());
super.create(attributeList);
Master rule, set flag to 0 if no details else set to 1.
In the MasterEOImpl added method to check if detail row exists based on Row Iterator => no db retrieval?
This method also sets the flag accordingly:
protected void checkHasOtherDetails()
oracle.jbo.RowIterator ri = this.getRetrieveFromdetail();
ri.last();
// last() must be called else hasNext() returns true even on last delete ???
Number hasDetails = Constants.NUMBER_NO; // = 1
if (ri.hasNext() || ri.hasPrevious())
hasDetails = Constants.NUMBER_YES; // = 0
if (!getHasDetailsFlag().equals(hasDetails)) {
this.setHasDetailsFlag(hasDetails);
I call this method in the remove method of the detailEOImpl:
public void remove()
this.getRetrieeFromMaster().checkHasOtherDetails();
super.remove();
To set the flag I added follwoing code in the create method of the DetailEOImpl:
protected void create(AttributeList attributeList)
setAttribute(MASTERFIELD,this.getMaster().getMasterField());
**** ADDED ***
Number masterHasDetailsFlag = getRetrieveFromMaster().getHasDetailsFlag();
if (!masterHasDetailsFlag.equals(Constants.NUMBER_YES)) {
getRetrieveFromMaster().setHasDetailsFlag(Constants.NUMBER_YES));
super.create(attributeList);
One more question:
Is there a danger of calling last() on row iterators in create/update/remove methods of *Impl files?
=> current row changed => any effect on display in JPanel
Thanks
Frederic
PS All variable/method/class names have been manually renamed in this code so some small syntax problems may exist.

Similar Messages

  • View link accessor passes a ViewRowSetImpl

    9.0.5.1
    If I add a View link between a SQL only view object (A) and a View object (B) based on an entity object (cardinality 1 to 1) and request accessor methods are added to the view object (B) and the corresponding entity
    I get an accessor in view object (B)
    oracle.jbo.Row getXXXX - which seems okay
    I get in the entity object
    ViewRowImpl getXXXX - which also seems okay
    However when getXXXX is called in the entity object a ViewRowSetImpl object is being passed back and so the cast fails.
    I've checked the data and there is definitely only a one to one relationship between the data.
    Anyone have any ideas what could be wrong?

    I have the same problem with cardinality * to 0..1.
    The created view link accessor return a ViewRowImpl but at runtime it returns a ViewRowsetImpl and I get a ClassCastException
    I used following workaround:
    Define an association and read from the association accessor instead of the View Link accessor.
    ADF 10.1.2
    Thanks
    Frederic

  • How to get the view link definition from the view link accessor

    Hi,
    I am using Jdev 10.1.3 and ADF BC. I am trying to do deep copy in a master/details view, after the new child record is created, I want to update the foreign key attribute. I know I can get the list of attribute definitions from the row in the view object, which include the view link accessors, I am wondering if I can get the view link definition from the view link accessors, so that I can get the source and destination attribute names.
    Thanks!

    Hi,
    you should get this through
    ViewObject vo = this.findViewObject("LocationsView1");
    int indx = vo.getAttributeIndexOf("DepartmentsView");
    ViewAttributeDefImpl vAttrDefImpl = (ViewAttributeDefImpl) vo.getAttributeDef(indx);
    ViewLinkDefImpl vdefImpl = (ViewLinkDefImpl) vAttrDefImpl.findViewLinkDefImpl();
    Note that this code starts from the ApplicationModuleImpl class, which is why I used this.findViewObject().
    Frank

  • TP4 ADF BC [BUG] view link are not updated after database synchronization

    I have a table with a recursive relationship.
    By mystake, I created a recursive foreign key for the same attribute (deptid->deptid instead of deptid->parentdeptid).
    I generated entity, view and application module from this schema.
    When compiling, errors was produced indicating the problem.
    I corrected the problem in offline database, generate the changes into the database successfully.
    I ask to synchronize the entity with the database, the changes was identified correctly and a new association was created.
    First remark: the old one still there and it was necessary to delete it and rename the new generated one (to be consistent with other name). May be an option to overwriting the old one will be more pleasant, may be asking if the new one has to replace an existing one and show a list of existing ones.
    Regenerating the association was correct and one error was removed when compiling again. The error on the view link still there.
    I would like to delete the assoc and recreate it from the entity assoc but it was not possible easily because the view link is used in the application module !!!!
    It will be nice to permit to regenerate an existing view link from an entity association without deleting it.
    May be it is a better way to synchronize ? I would be very interesting to know how to achieve it as the best !

    Was the inability to have the synchronization remove the key specific to the existing association's being self-referential, or if your initial association was from DeptId to some other attribute (which you then corrected) would the synchronize have fixed the problem?
    The simplest way to achieve what you want given existing features would be to have delete the view link instance, view link, and association, follow by resynchronizing (I believe), then recreating the viewlink and adding back the view link instance.

  • View link accessor for master view object with bind variables

    Is there a way to set bind variables for a view object to which a view link accessor is used to retrieve a view row from a detail view row in a master-detail relationship ?
    I understand that RowSet (or Row) returned by a view link accessor originates from an "internally created" view object instance.
    I am using 10.1.3.0.4 JDeveloper.

    Thanks! that's right the bind variables when i use it on where clause must be required, so i change my sql to:
    Select /*+ use_nl(p p2) */
    'F' tipo_persona,
    p.ID_PERSONA, p.TDOC, p.NDOC, p.DENO
    From SINT_PERSONA p,
    ( Select /*+ index(a SINT_PERSONA_IX2) */
    a.ID_PERSONA
    From SINT_PERSONA_DOCUMENTO a
    where ( NDOC = :p_cuit
    and :p_cuit <> 0 )
    ) p2
    Where p.id_persona = p2.id_persona
    AND (deno = decode(:p_deno,'null',null,upper(:p_deno)) or
    :p_deno = 'null')
    AND (NDOC = decode(:p_ndoc,0,null,:p_ndoc) or
    :p_ndoc = 0)
    and grado_confiab > 0
    and my bind variables:
    p_ndoc required default value 0
    p_cuit required default value 0
    p_deno required default value null
    and works ok!
    thanks a lot !!!!

  • How to extend VO which is use in VIEW LINK and VL is created dynamically.

    Hi All,
    I wants to extend VO.
    This VO is used in VIEW LINK.
    This VL name set dynamically, conditionally in one of the controller of page.
    i.e if some condition satisfied than xyz VL will use otherwise abc VL will use.
    Now,
    I have extend VO as well as VL and substitute both, but I am getting null value for some of the field and also I am not able to insert/update new value.
    So,
    I have created VORowImpl class file which extend VOROWImpl of seeded file and chage the row class of VO.xml file to new class. i.e. modified seeded .xml code and achieve what I want.
    But Is this correct way ?
    Is there any other way ?
    --Tushar Topiwala                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi pratap,
    thanx for your reply.
    intially i've done that also. i.e. extend only VO and substitute it but i'm getting null values in some field as well as nt able to insert/update new value.
    the error is related to VL.
    --tushar topiwala                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • ADF BC : Polymorphic View Link

    hi
    If I generate Business Components from Tables for EMP and DEPT in the SCOTT schema, I get an Association "FkDeptnoAssoc" and a View Link "FkDeptnoLink" based on this Association.
    This allows me to select "EmpView via FkDeptnoLink" in the Data Model pane of the Application Module Editor (in the tree below "DeptView").
    After this I added a View Object "BigMoneyDeptView" that extends "DeptView" with a where clause "Dept.DEPTNO IN (SELECT DEPTNO FROM EMP WHERE SAL >= 3000)".
    Because "BigMoneyDeptView" extends "DeptView" I would expect to be able to select "EmpView via FkDeptnoLink" for the "BigMoneyDeptView" node in the Data Model pane of the Application Module Editor, but that is not the case.
    Should I create a new View Link to be able to use the detail EMP records for "BigMoneyDeptView"?
    thanks
    Jan Vervecken

    Thanks for your reply Steve, and for creating a screencast.
    Using the previous release of JDeveloper 11g (11.1.1.0.0), build 5156, it looks to me like the issue still remains (see also PolymorphicVLThread319915In11g5156AppDM.png).
    I don't know what might be different with my examples, but I have made them available for download:
    - using JDeveloper 10g (10.1.3.4.0), build 4270, see PolymorphicVLThread319915App-v0.01.zip, results in PolymorphicVLThread319915AppDM.png
    - using JDeveloper 11g (11.1.1.0.1), build 5188, see PolymorphicVLThread319915In11gApp-v0.01.zip, results in PolymorphicVLThread319915In11gAppDM.png
    - using JDeveloper 11g (11.1.1.0.0), build 5156, see PolymorphicVLThread319915In11g5156App-v0.01.zip, results in PolymorphicVLThread319915In11g5156AppDM.png
    Any suggestions?
    regards
    Jan

  • View all rows in Entity object

    please I have a problem can I one help me
    I want to get all rows from specific Entity object
    example
    I am now in validate method in XXX Entity Object and i want to get all the rows in XXX table from validate method(all rows)
    can any one help me to do that
    thanks in advance

    ya sire
    I want from validate method in EO XXX to validate all the rows in the table XXX
    so I want to get all the rows from validate methods in the EO XXX
    thanks in advance

  • View links

    Hi,
    I have defined a view link between 2 entity objects, based on the primary key of the source(master), and the foreign key of the destination(details) which have a one-many relationship. I am trying to traverse from a destination row to the master row by using the getXXXview() on the detail row.
    Any ideas on the following stack trace of the exception that is thrown:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT PerEo.PERIDN, PerEo.NATOFPER, PerEo.PERSTAT, PerEo.PERSTATCHGD, PerEo.PERXMTSTAT, PerEo.NATNPOPGRPCD, PerEo.POSTADDR1, PerEo.POSTADDR2, PerEo.POSTADDR3, PerEo.POSTADDR4, PerEo.POSTADDR5, PerEo.POSTCDPOST, PerEo.POSTADDRCORIND, PerEo.ADDRCHGD, PerEo.STREETADDR1, PerEo.STREETADDR2, PerEo.STREETADDR3, PerEo.STREETADDR4, PerEo.POSTCDSTREET, PerEo.DCEEADDR, PerEo.BUSORSURNAME, PerEo.HOLDCMPREGTN, PerEo.TRADENAME, PerEo.PERIDNPROX, PerEo.PERIDNREP, PerEo.NOFBRANCHES, PerEo.INITIALS, PerEo.AREACD, PerEo.PERMOVEIND, PerEo.PERSUSPECTIND, PerEo.DTOWN, PerEo.TIMESTAMP, PerEo.RECSTAT FROM NATIS.PER PerEo WHERE (? = AliasEo.PERIDN)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:607)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:2600)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:521)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2197)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1141)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:2240)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:287)
         at oracle.jbo.server.ViewAttributeDefImpl.get(ViewAttributeDefImpl.java:302)
         at oracle.jbo.server.ViewRowStorage.getAttributeInternal(ViewRowStorage.java:800)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:570)
         at enatis.per.AliasViewRowImpl.getPerView(AliasViewRowImpl.java:297)
         at enatis.per.PerIdSmImpl.doBrGetPerRow(PerIdSmImpl.java:827)
         at enatis.per.PerIdSmImpl.isValidIdDocN(PerIdSmImpl.java:372)
         at enatis.per.PerIdSmImpl.doBrPerIdVoOnSet(PerIdSmImpl.java:265)
         at enatis.per.PerIdSmImpl.setPerIdVo(PerIdSmImpl.java:226)
         at enatis.per.PerChangeParticularsTmImpl.setPerIdVo(PerChangeParticularsTmImpl.java:96)
         at enatis.per.ui.actions.PerIdPost.execute(PerIdPost.java:62)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:536)
    ## Detail 0 ##
    java.sql.SQLException: ORA-00904: "ALIASEO"."PERIDN": invalid identifier
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:241)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2267)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2525)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:452)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:382)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:549)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:2600)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:521)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2197)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1141)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:2240)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:287)
         at oracle.jbo.server.ViewAttributeDefImpl.get(ViewAttributeDefImpl.java:302)
         at oracle.jbo.server.ViewRowStorage.getAttributeInternal(ViewRowStorage.java:800)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:570)
         at enatis.per.AliasViewRowImpl.getPerView(AliasViewRowImpl.java:297)
         at enatis.per.PerIdSmImpl.doBrGetPerRow(PerIdSmImpl.java:827)
         at enatis.per.PerIdSmImpl.isValidIdDocN(PerIdSmImpl.java:372)
         at enatis.per.PerIdSmImpl.doBrPerIdVoOnSet(PerIdSmImpl.java:265)
         at enatis.per.PerIdSmImpl.setPerIdVo(PerIdSmImpl.java:226)
         at enatis.per.PerChangeParticularsTmImpl.setPerIdVo(PerChangeParticularsTmImpl.java:96)
         at enatis.per.ui.actions.PerIdPost.execute(PerIdPost.java:62)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:536)

    Thanks,
    (I removed irrelevent attributes on the following XML files.)
    <?xml version="1.0" encoding='windows-1252'?>
    <!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
    <Entity
    Name="PerEo"
    DBObjectType="table"
    DBObjectName="NATIS.PER"
    AliasName="PerEo"
    BindingStyle="Oracle"
    UseGlueCode="false"
    CodeGenFlag="4"
    RowClass="enatis.per.PerEoImpl" >
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="9.0.3.10.7" />
    <AttrArray Name="_publishEvents">
    </AttrArray>
    </DesignTime>
    <Attribute
    Name="PerIdN"
    IsNotNull="true"
    Precision="12"
    Type="java.lang.String"
    ColumnName="PERIDN"
    ColumnType="CHAR"
    SQLType="VARCHAR"
    TableName="NATIS.PER"
    PrimaryKey="true"
    RetrievedOnUpdate="true"
    RetrievedOnInsert="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="12" />
    </DesignTime>
    </Attribute>
    <ViewLinkAccessor
    Name="AliasView"
    ViewLink="enatis.per.PerAliasVl"
    ViewLinkEnd="enatis.per.PerAliasVl.AliasView"
    ViewLinkOtherEnd="enatis.per.PerAliasVl.PerView"
    Type="PerViewRowImpl"
    IsUpdateable="false" >
    </ViewLinkAccessor>
    <Key
    Name="SysC006164" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.PerEo.PerIdN" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C006164" />
    <Attr Name="_checkCondition" Value="&#34;PERIDN&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="PereoPrimaryKey" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.PerEo.PerIdN" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="PEREO_PRIMARY_KEY" />
    <Attr Name="_isPrimary" Value="true" />
    </DesignTime>
    </Key>
    </Entity>
    <?xml version="1.0" encoding='windows-1252'?>
    <!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
    <Entity
    Name="AliasEo"
    DBObjectType="table"
    DBObjectName="NATIS.ALIAS"
    AliasName="AliasEo"
    BindingStyle="Oracle"
    UseGlueCode="false"
    CodeGenFlag="4"
    RowClass="enatis.per.AliasEoImpl" >
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="9.0.3.10.7" />
    <AttrArray Name="_publishEvents">
    </AttrArray>
    </DesignTime>
    <Attribute
    Name="IdDocTypeCd"
    IsNotNull="true"
    Precision="2"
    Type="java.lang.String"
    ColumnName="IDDOCTYPECD"
    ColumnType="CHAR"
    SQLType="VARCHAR"
    TableName="NATIS.ALIAS"
    PrimaryKey="true"
    RetrievedOnUpdate="true"
    RetrievedOnInsert="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="2" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="IdDocN"
    IsNotNull="true"
    Precision="13"
    Type="java.lang.String"
    ColumnName="IDDOCN"
    ColumnType="CHAR"
    SQLType="VARCHAR"
    TableName="NATIS.ALIAS"
    PrimaryKey="true"
    RetrievedOnUpdate="true"
    RetrievedOnInsert="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="13" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="PerIdN"
    IsNotNull="true"
    Precision="12"
    Type="java.lang.String"
    ColumnName="PERIDN"
    ColumnType="CHAR"
    SQLType="VARCHAR"
    TableName="NATIS.ALIAS"
    RetrievedOnUpdate="true"
    RetrievedOnInsert="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="12" />
    </DesignTime>
    </Attribute>
    <ViewLinkAccessor
    Name="PerView"
    ViewLink="enatis.per.PerAliasVl"
    ViewLinkEnd="enatis.per.PerAliasVl.PerView"
    ViewLinkOtherEnd="enatis.per.PerAliasVl.AliasView"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false" >
    </ViewLinkAccessor>
    <Key
    Name="SysC005807" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.AliasEo.IdDocTypeCd" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C005807" />
    <Attr Name="_checkCondition" Value="&#34;IDDOCTYPECD&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC005808" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.AliasEo.IdDocN" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C005808" />
    <Attr Name="_checkCondition" Value="&#34;IDDOCN&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC005809" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.AliasEo.PerIdN" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C005809" />
    <Attr Name="_checkCondition" Value="&#34;PERIDN&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="AliaseoPrimaryKey" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.AliasEo.IdDocTypeCd" />
    <Item Value="enatis.per.AliasEo.IdDocN" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="ALIASEO_PRIMARY_KEY" />
    <Attr Name="_isPrimary" Value="true" />
    </DesignTime>
    </Key>
    </Entity>
    <?xml version="1.0" encoding='windows-1252'?>
    <!DOCTYPE ViewLink SYSTEM "jbo_03_01.dtd">
    <ViewLink
    Name="PerAliasVl"
    Where="? = AliasEo.PERIDN" >
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="9.0.3.10.7" />
    </DesignTime>
    <ViewLinkDefEnd
    Name="PerView"
    Cardinality="1"
    Owner="enatis.per.PerView"
    Source="true" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.PerView.PerIdN" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_minCardinality" Value="1" />
    <Attr Name="_isUpdateable" Value="true" />
    <Attr Name="_finderName" Value="PerView" />
    <Attr Name="_accessor" Value="true" />
    <Attr Name="_entityAccessor" Value="true" />
    </DesignTime>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd
    Name="AliasView"
    Cardinality="-1"
    Owner="enatis.per.AliasView" >
    <AttrArray Name="Attributes">
    <Item Value="enatis.per.AliasView.PerIdN" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_isUpdateable" Value="true" />
    <Attr Name="_finderName" Value="AliasView" />
    <Attr Name="_accessor" Value="true" />
    <Attr Name="_entityAccessor" Value="true" />
    </DesignTime>
    </ViewLinkDefEnd>
    </ViewLink>
    The code for the create etc has been removed but it looked like this.
    ViewLinkImpl perAliasVl = (ViewLinkImpl) getPerAliasVl1();
    PerViewImpl perView = (PerViewImpl) perAliasVl.getSource();
    AliasViewImpl aliasView = (AliasViewImpl) perAliasVl.getDestination();
    PerViewRowImpl perRow = (PerViewRowImpl) perView.createRow();
    AliasViewRowImpl aliasRow = (AliasViewRowImpl) aliasView.createRow();
    perRow.setPerIdN("new key");
    perView.insertRow(perRow);
    aliasRow.setIdDocTypeCd("1");
    aliasRow.setIdDocN("new doc");
    aliasView.insertRow(aliasRow);
    AttributeValException: AliasEo.PerIdN.....

  • Problem trying to access Detail VO via View Link  - Req/Distributions

    Hi,
    I'm attempting to access a detail VO using a View Link accessor. I'm not sure if I'm approaching this the right way, but here is what I am doing:
    oaAcctVORowImpl = (PoRequisitionLinesVORowImpl)aaAcctVO.getRowAtRangeIndex(q);
    RowIterator distRS = oaAcctVORowImpl.getPoReqDistributionsVO();
    No rows are returned although I am expecting rows.
    The getPoReqDistributionsVO is the accessor method of the Destination on the View Link (i.e. the detail VO).
    under oracle\apps\icx\por\req\server
    Any ideas would be greatly appreciated!
    Thanks,
    Teri

    The VO's and VL's are part of the OA framework - i.e. they were pre-generated.
    Here's the VL xml contents:
    <?xml version="1.0" encoding='windows-1252'?>
    <!DOCTYPE ViewLink SYSTEM "jbo_03_01.dtd">
    <!-- $Header: ReqLineToDistributionsVL.xml 115.0 2003/08/26 23:04:58 rileung noship $ -->
    <ViewLink
    Name="ReqLineToDistributionsVL"
    EntityAssociation="oracle.apps.icx.por.schema.server.ReqLineToDistributionsAO" >
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="9.0.3.11.3" />
    </DesignTime>
    <ViewLinkDefEnd
    Name="PoRequisitionLinesVO"
    Cardinality="1"
    Owner="oracle.apps.icx.por.req.server.PoRequisitionLinesVO"
    Source="true" >
    <AttrArray Name="Attributes">
    <Item Value="oracle.apps.icx.por.req.server.PoRequisitionLinesVO.RequisitionLineId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_minCardinality" Value="1" />
    <Attr Name="_isUpdateable" Value="true" />
    <Attr Name="_finderName" Value="PoRequisitionLinesVO" />
    <Attr Name="_accessor" Value="false" />
    </DesignTime>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd
    Name="PoReqDistributionsVO"
    Cardinality="-1"
    Owner="oracle.apps.icx.por.req.server.PoReqDistributionsVO" >
    <AttrArray Name="Attributes">
    <Item Value="oracle.apps.icx.por.req.server.PoReqDistributionsVO.RequisitionLineId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_isUpdateable" Value="true" />
    <Attr Name="_finderName" Value="PoReqDistributionsVO" />
    <Attr Name="_accessor" Value="true" />
    </DesignTime>
    </ViewLinkDefEnd>
    </ViewLink>

  • Should ADF Entity Object Map to Database Table or View?

    We are building a new 3-tier JClient/ADF application. We have mapped most entity objects directly to database tables. Now that we are preparing to deploy, our DBA is angry; he believes that all entity objects should be mapped to database views. The developers see this as a headache, UML can not forward/reverse changes, and now we have another layer of abstraction, which doesn't seem to serve a useful purpose. What is the best practice in a new 3-tier application?

    Hi,
    I'm still having problems but I found out why these tables are returning errors. The username I've been given by the DBA to connect to the database is CONSULTA, but this user is only for querying purposes, the actual objects reside on a differente schema, of course, which is PROD. So the line:
    "CONSULTA"."ESTADOS"@"PROD@AYADEV_LOCATION" "ESTADOS"
    raises an exception because the table ESTADOS is not located on that schema, but on PROD. If I query the table from SQL Plus with:
    SELECT *
    FROM [email protected]@AYADEV_LOCATION
    then there's no problem at all.
    Why is this? How do I instruct OWB to point to the correct schema or to avoind fully qualifying the table name?
    Please help me, I'm kind of confused here.
    Best Regards,
    --oswaldo.
    [osantos]

  • ADF VIEW LINKS

    Hi,
    I have 3 tables table1, table2 and table3 EO and VO are there.
    My screen has 2 regions as below
    one top region with listing of records from table1 <<<< this works well
    bottom region has 2 tabs
    First tab has the table2 records corresponding to above row of table1 (using a VIEW LINK between table1 and table2) <<<<< THIS WORKS WELL
    Second tab needs to have the table3 records corresponding to the top listing from table1. How do I do that.
    View of table1 (used in the top region)
    ------ view of table2 <<<< VIEW LINK used in first tab
    ------ view of table3 <<<< VIEW LINK used in second tab
    I am not able to create the above table3 view link.
    Any ideas please.

    Have you tried defining ViewLink between table1 and table 3?If yes, what is the behavior you are seeing when you select tab2?

  • To find the view link in the attribute definition

    Hi, I am using Jdev 10.1.3.2 and ADFBC. I have two master/detail view objects which have view link defined between them. Now I am trying to do deep copy, but I don't want to hard code the view link accessor name in the code. Here is the part of the code to get the list of attributes:
    ParentVORow newRow = (ParentVORow)parentVO.createRow();
    StructureDef def = newRow.getStructureDef();
    AttributeDef[] attrs = def.getAttributeDefs();
    Now view link accessor is in attrs, but how can I tell which attribute in attrs is a view link accessor without comparing to the attribute name?
    Thanks!

    Please see section "25.3.4.1 Determining the Attribute Kind at Runtime" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html for more information on this.

  • Problem with af:table and view links

    I want to display a table with data from a database table called PERSON, so I'm using af:table tag.
    The PERSON table has the next fields:
    PERSON_CODE
    PERSON_NAME
    PERSON_COD_STATE
    The field PERSON_STATE is a foreign key to other table called PERSON_STATE:
    PERSON_COD_STATE
    DESCRIPTION
    I've created a view to get data from PERSON table (personView). Because I want to show the person state description in the af:table , I've created another view to get data from PERSON_STATE table (personStateView). And I've also created a view link between personView and personStateView.
    In the column of the af:table that represents the person state I drop the field 'description' of the state view linked to the person view.
    When I run the JSP the state is not shown properly. All the persons are shown with the same state.
    When testing directly with the application module, the view link works properly.
    Does view links work inside a af:table?
    I'm working with ADF 10g.
    Thanks

    Thanks for your reply.
    The second alternative works, but I would be interested in the first one (using a view link).
    The foreign key is defined properly:
    PERSON.PERSON_CODE is a primary key.
    PERSON.PERSON_COD_STATE is a foreign key.
    PERSON_STATE.PERSON_COD_STATE is a primary key.
    I have created a view link based on that foreign key.
    When usign af:table to show the records of PERSON table, all the data of PersonView is properly shown. But the STATE of the person is not ok. It seems as the view link is not working.
    Why?
    Thanks

  • Possible?Multi-Entity View Object with one Entity Object that is Read-only.

    I know this sounds crazy, but I would like to create a multi-entity view object, where one entity object is based on a table in my application (we'll call it "Users", which basically stores the primary key for the person from the institutional people database), and the other table is a entity object based on a view of the institutional people database table (read only access), which we can call "People".
    I know that since no updates will be done to the People table, it really should be a read-only View Object, but I would lose the ability to sort on attributes like Last Name, Hire date, etc, since those would be transient attributes in my ViewObject for the Users. By having People as an entity object, I can then create a multi entity view object and have the ability to join Users to People and be able to sort on the above mentioned fields (like Last Name).
    The problem is that when I use the JDev (I'm currently using 10.1.2.1) AppModule BC4J tester, when I click on the multi-entity view object that I added to the AppModule it gives me an error:
    oracle.jbo.RowCreateException) JBO-25017: Error while creating a new entity row for People.
    ----- LEVEL 1: DETAIL 0 -----
    (java.lang.InstantiationException) null
    I have tried to change all the attributes to updateable in my entity object, but no create method, and I have tried to make them all read-only, but no effect, I get the same error (probably because the People view is read-only in my schema).
    Is there a way to change the entity object so that it will not try to create a new row when it runs the Tester? So that the multi entity view object behaves more like a view link, but gives me the added bonus of being able to sort on the Last Name column from the People table?
    Thanks for any help on this subject...at worst, I will have to use the view link method to get the job accomplished, but it would be "cooler" if this would work!
    Jeremy.

    Steve, thanks for your quick response to my question.
    To answer your questions, I was trying to create the Multi-entity View Object to give me more flexibility when working with my User table, and my People view. The flexibility I desired was that I would be able to sort my Users based on attributes in the People view. This is not possible when the there is only one Entity in my VO, and the People view data are all transient attributes, because they are not in the SQL statement.
    Ultimately, after working with one of my colleagues, we decided to use the approach that you mentioned by creating a read-only VO with the SQL query we want to display to the user (contains both User and People data fields), and then use a different ViewObject when performing other actions on the User Table (such as inserts/updates/deletes). By using the setWhereClauseParam() method in the handleLifeCycle() for the JSP page, we should be able to navigate between the different View Objects, so that the user does not see any difference.
    Thanks! Oh, and by the way, I have read your article you included before, and I have used it many times before to tune my View Objects! Thanks!

Maybe you are looking for

  • 7200 RPM hd on 15"

    Finally Core2 Duos! ive been waiting since august to buy a new MBP. But i noticed that the 15" C2D MPBs dont have the 7200rpm HD option that the Core duos have, any reason why? is there anyway i can request one when i purchase? I would much rather ha

  • Recommendations Needed

    Greetings! My company deals in PDFs. We send them to clients to be reviewed via our website. They download/print them, mark them up, and fax them back. We call the client, discuss the changes, then make the changes. The process repeats until we get a

  • USB Mouse not waking display on Macbook Pro

    Only a minor bug in Lion but when my display is in sleep the USB Mouse does not wake it. I have to move my finger on the Trackpad in order to wake the display. Tried with several mice. Same result each time. Anyone else noticed this?

  • Matrox x.tools y adobe encore

    Hola a todos. Con Matrox x.tools 6122 instalado adobe encore 1.5 no funciona correctamente, no se visualizan bien las ventanas y cuando intento renderizar los menus y botones animados no lo hace y visualizo el mensaje os error-2147024809. Puedo traba

  • Required Two PL/SQL Developers

    Hi All, We need 2 pl/sql developers with 1-2 years of experience. Mail Your Resume: [email protected] Company: Indiamart Intermesh Limited Location: Noida, India Plz specify following details in mail: Current Company Relevant Exp Current CTC Expected