Bug in view link creation

Here's an interesting bug in JDev 9.0.3.1, Win2k:
I'm working with a view link using the Edit View Link dialog. It links two view objects, ViewA and ViewB, in a 1:* relationship. Entities EntityA and EntityB are the respective underliers of ViewA and ViewB. Under the View Link Properties node in the dialog, the only accessor generated is for the Destination view object.
When I click OK, the column constants at the top of EntityA.java become messed up!!
To be specific, all of the accessor column constants defined on the entity object are removed and then re-defined one line above the beginning of the column constants declaration section. They also are renumbered starting with zero, which causes them to have the same value as the first n column constant definitions. Naturally, this causes a "duplicate case label" compile error for the EntityA.java file.
Even worse is if the column constant definitions start on the same line as the opening brace for the class, like so:
public class EntityAImpl extends EntityImpl
{ protected static final int COLUMN_1 = 0;
protected static final int COLUMN_2 = 1;
// etc.
The effect of clicking OK in the Edit View Link dialog is then to produce a ParseException error as the dialog is dismissed. Looking at the EntityA.java file, it's clear why:
public class EntityAImpl extends EntityImpl
protected static final int ACCESSOR_1 = 0;
protected static final int ACCESSOR_2 = 1;
// etc.
{ protected static final int COLUMN_1 = 0;
protected static final int COLUMN_2 = 1;
// etc.
What puzzles me is:
* Why is the entity object being affected at all, since the accessor was only supposed to be generated in ViewA?
* Why are all the accessors being removed and re-added, even those that have nothing to do with the view link being edited?
* Why, when the accessors are re-added, are the constant values duplicated?

Please send a test case. I'm unable to reproduce this in a simple project in 9.0.3.1 or 9.0.3.2.
Is there entity inheritance involved?
Do your entity XML files mention _superAttr anywhere in them? If so, you might be hitting a known issue with 9.0.3 relating to entity inheritance at design time and the accessor attributes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Bug in View Link editor

    When creating a many-to-many view link based on a many-to-many association, the view object on the left must be based on the entity that was on the left when creating the association. Why is this? Surely it shouldn't matter.

    Just to add to this:
    If the view object on the left of the link is not based on the entity that was on the left when creating the underlying association then the accessors for the association will not be visible under the view in the link editor.

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

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

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

  • View Link Bug!  - JDEV Developers please read.

    This has to be a bug. When I am done with my project for the day I check in the files into PVCS. After check in the files are deleted off my local drive. When I recheck out my project and do a rebuild on the project, I get several View link XML files that say that they are not correct. However when I pull them up in the editor and relink them, there is NO CHANGE to the XML file that stores the DEF. Below is a sample of one of the files. If I go into this view link with the visual editor and reselect the linking nodes, all is fine in JDEV.
    Is this a bug that is being worked on for the next version?
    SAMPLE
    <?xml version='1.0' encoding='windows-1252' ?>
    <!DOCTYPE ViewLink SYSTEM "jbo_03_01.dtd">
    <ViewLink Name="RequestCauseLookupVL">
    <DesignTime>
    <Attr Name="_isCodegen" Value="true"/>
    <Attr Name="_version" Value="10.1.3.36.73"/>
    </DesignTime>
    <ViewLinkDefEnd Name="RequestVO" Cardinality="1"
    Owner="dataAccess.Request.RequestView" Source="true">
    <AttrArray Name="Attributes">
    <Item Value="dataAccess.Request.RequestView.CauseCd"/>
    </AttrArray>
    <DesignTime>
    <Attr Name="_finderName" Value="RequestVO"/>
    <Attr Name="_accessor" Value="true"/>
    <Attr Name="_minCardinality" Value="1"/>
    <Attr Name="_isUpdateable" Value="true"/>
    <Attr Name="_entityAccessor" Value="true"/>
    </DesignTime>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd Name="ReqCause_LOV" Cardinality="1"
    Owner="dataAccess.lov.ReqCause_LOV">
    <AttrArray Name="Attributes">
    <Item Value="dataAccess.lov.ReqCause_LOV.LookupId"/>
    </AttrArray>
    <DesignTime>
    <Attr Name="_finderName" Value="ReqCause_LOV"/>
    <Attr Name="_accessor" Value="true"/>
    <Attr Name="_isUpdateable" Value="true"/>
    <Attr Name="_entityAccessor" Value="true"/>
    </DesignTime>
    </ViewLinkDefEnd>
    </ViewLink>

    Hi Steve,
    JDev appears to be updating the viewlink files. I have not edited any of them and they all have the timestamp of when i closed JDev last Friday:
    -rw-rw-rw-   1 user     group        1236 Sep  1 16:45 ApprovalDetailsFkLink.xml
    -rw-rw-rw-   1 user     group        1224 Sep  1 16:45 InvestigatorsFkLink.xml
    -rw-rw-rw-   1 user     group        1260 Sep  1 16:45 MulticentreProjectsFkLink.xml
    -rw-rw-rw-   1 user     group        1258 Sep  1 16:45 PrjWorklistItemsFkLink.xml
    -rw-rw-rw-   1 user     group        1200 Sep  1 16:45 FieldBasedFKLink.xml
    -rw-rw-rw-   1 user     group        1195 Sep  1 16:45 GmAnimalsFKLink.xml
    -rw-rw-rw-   1 user     group        1225 Sep  1 16:45 HarmfulFKLink.xml
    -rw-rw-rw-   1 user     group        1032 Sep  1 16:45 ObservationFKLink.xml
    -rw-rw-rw-   1 user     group        1226 Sep  1 16:45 OtherInvestigatorsFKLink.xml
    -rw-rw-rw-   1 user     group        1196 Sep  1 16:45 OtherPartiesFKLink.xml
    -rw-rw-rw-   1 user     group        1028 Sep  1 16:45 PermitsFKLink.xml
    -rw-rw-rw-   1 user     group        1206 Sep  1 16:45 ProjectPartiesFKLink.xml
    -rw-rw-rw-   1 user     group        1042 Sep  1 16:45 RespInvestigatorsFkLink.xml
    -rw-rw-rw-   1 user     group        1012 Sep  1 16:45 SurgeryFKLink.xml
    -rw-rw-rw-   1 user     group        1190 Sep  1 16:45 TeachingFKLink.xmlthe CVS looks like this (August 24 was when i deleted them all from CVS and re-added them):
    -r--r--r--    1 banstey  dba          1347 Aug 24 09:51 ProjectPartiesFKLink.xml,v
    -r--r--r--    1 banstey  dba          1172 Aug 24 09:51 PermitsFKLink.xml,v
    -r--r--r--    1 banstey  dba          1337 Aug 24 09:51 OtherPartiesFKLink.xml,v
    -r--r--r--    1 banstey  dba          1367 Aug 24 09:51 OtherInvestigatorsFKLink.xml,v
    -r--r--r--    1 banstey  dba          1176 Aug 24 09:51 ObservationFKLink.xml,v
    -r--r--r--    1 banstey  dba          1399 Aug 24 09:51 PrjWorklistItemsFkLink.xml,v
    -r--r--r--    1 banstey  dba          1401 Aug 24 09:51 MulticentreProjectsFkLink.xml,v
    -r--r--r--    1 banstey  dba          1365 Aug 24 09:51 InvestigatorsFkLink.xml,v
    -r--r--r--    1 banstey  dba          1377 Aug 24 09:51 ApprovalDetailsFkLink.xml,v
    -r--r--r--    1 banstey  dba          1325 Aug 24 09:51 AnimalFKLink.xml,v
    -r--r--r--    1 banstey  dba          1331 Aug 24 09:51 TeachingFKLink.xml,v
    -r--r--r--    1 banstey  dba          1186 Aug 24 09:51 RespInvestigatorsFkLink.xml,v
    -r--r--r--    1 banstey  dba          1341 Aug 30 11:37 AnimalCareFKLink.xml,v
    -r--r--r--    1 banstey  dba          1341 Aug 30 11:38 FieldBasedFKLink.xml,vTimestamps of my associations are all over the place, which is consistent with the creation process.
    Will do an unchanged commit and post the results.
    regards,
    Brenden

  • Bug in bc4j?, view links at runtime, multi table relationships, accessor name

    The following seems like a bug in the business components framework
    to me:
    To make things simple, I will use view objects aV, bV, cV,
    corresponding rows aR, bR, cR and row iterators aI (not used though),
    bI, cI.
    I create two view links from aV to bV and from bV to cV at runtime,
    with the accessor names "Bs" and "Cs".
    ViewLink a2b = createViewLinkBetweenViewObjects(..., "Bs", ...);
    ViewLink b2c = createViewLinkBetweenViewObjects(..., "Cs", ...);
    First of all this code works perfectly fine:
    ViewObject aV = a2b.getSource();
    ViewObject bV = a2b.getDestination();
    ViewObject cV = b2c.getDestination();
    while(aV.hasNext())
    Row aR = aV.next();
    System.err.println("aR");
    while(bV.hasNext())
    Row bR=bI.next();
    System.err.println(" bR");
    while(cV.hasNext())
    Row cR=cI.next();
    System.err.println(" cR");
    Using the accessor name "Bs" at the first level is ok, too:
    ViewObject aV = a2b.getSource();
    while(aV.hasNext())
    Row aR = aV.next();
    System.err.println("aR");
    RowIterator bI=(RowIterator)aR.getAttribute("Bs");
    while(bI.hasNext())
    Row bR=bI.next();
    System.err.println(" bR");
    HOWEVER, USING THE ACCESSOR "Cs" AT THE SECOND LEVEL OF THE MULTITABLE
    RELATIONSHIP IN THE FOLLOWING CODE, GIVES ME AN EXCEPTION
    oracle.jbo.NoDefException: JBO-25002: Definition Cs of type Attribute
    not found. THE SEEMS LEGAL USAGE OF THE ACCESSOR "Cs" TOO ME THOUGH,
    THEREFORE MY SUSPICION OF A BUG.
    ViewObject aV = a2b.getSource();
    while(aV.hasNext())
    Row aR = aV.next();
    System.err.println("aR");
    RowIterator bI=(RowIterator)aR.getAttribute("Bs");
    while(bI.hasNext())
    Row bR=bI.next();
    System.err.println(" bR");
    RowIterator cI=(RowIterator)bR.getAttribute("Cs");
    while(cI.hasNext())
    Row cR=cI.next();
    System.err.println(" cR");
    (By the way, could make your window for filling in the message a little bit wider,
    making it easier to cope with the line breaks).
    Feedback is appreciated.
    Andreas Reuleaux
    Klopotek & Partner
    [email protected]
    null

    Your results are as expected per the imlementation. Basically you've established (two) ViewLinks between two sets of two instances of VOs.
    Now you try and get an accessor to return a set of details. You need to establish a link between that detail set and it's details to use the accessor on the second detail to get the desired results. Basically you've to establish the chaining between appropriate instances of VOs and not just the outer VOs or VO members of your AM.

  • Can I use View Link in ADF Creation Forms Jdev 10.1.3

    Hi...
    I created a view link of two tables. Then I created a ADF form with Master Object to show some informations.. and I created a ADF Creation form with the detail Object
    I'm trying to submit the informations added in the Detail forms.
    but no records are created in Database..
    Can I submit a creation form using detail object?
    Thanks

    I figured out "partially" the problem, I tried to overrid the create method, and for any reason the commit operation wasn´t working.
    I was trying to set a value for a proprety, but it did not work as a wish.
    My intention was.... when an user execute the form. one specific field brings a value.. however I cannot set default value. cause it´ll change sometimes.
    it´s something like this
    protected void create(AttributeList attributeList) {     
    super.create(attributeList);
    setMyProperty(new Number(0));
    do you know how can I figure out this problem?

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

  • "Previous View" Links not Working

    I have a document ( a multi-page process flowchart) that has "Previous View" links embedded into it.  When I view the document in the Adobe Acrobat reader app for iPhone, the "Previous View" links do not work.  My other links (links to specific document pages) however, work fine.  Is this a bug in the app, or could this be a compliance problem with my document?

    Within Adobe Acrobat 10 (full version -- not just the reader), if you click on the link tool, you can highlight an area on the doument.  You can then define the link appearance and actions (such as go to a specific page number, open a file, go to a URL, etc). If you select "Custom" for the action, you can then specify from a whole list of diffent menu items (zoom in, zoom out, first page, last page, previous view, last view, etc...).
    I find that my previous view links works great in a web browser on my PC or Mac (works in IE7,Safari, Firefox), but not in Acrobat for IOS.

  • View links in oracle ADF/query featching from Database

    Please any one help for this query
    I have two tables Emp, Dept
    I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
    Query is fetching like this
    Empno Ename job Salary Comm deptno deptno dname      Loc
    15 i1     support     50000     11     5     5     IT          sss
    15 i1     support     50000     11     3     3     Account     sss
    16 i2     support     8000     10     5     5     IT          sss
    16 i2     support     8000     10     3     3     Account     sss
    16 i2     support     8000     10     3     3     Software      sss
    16 i2     support     8000     10     4     4     Operation      sss
    Query is fetching 6 rows.
    but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
    Here is the example (My Requirement):
    This is first row:
    Empno Ename job Salary Comm
    15 i1     support 50000     11
    Deptno dname      Loc
    5     IT          sss
    3     Account     sss
    This is second row:
    Empno ename job Salary Comm
    16 i2     support     8000     10
    Deptno dname      Loc
    5     IT     sss
    3     Account     sss
    2     Software sss
    4     Operation sss
    i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
    plz any one can help
    thanks

    Please any one help for this query
    I have two tables Emp, Dept
    I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
    Query is fetching like this
    Empno Ename job Salary Comm deptno deptno dname      Loc
    15 i1     support     50000     11     5     5     IT          sss
    15 i1     support     50000     11     3     3     Account     sss
    16 i2     support     8000     10     5     5     IT          sss
    16 i2     support     8000     10     3     3     Account     sss
    16 i2     support     8000     10     3     3     Software      sss
    16 i2     support     8000     10     4     4     Operation      sss
    Query is fetching 6 rows.
    but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
    Here is the example (My Requirement):
    This is first row:
    Empno Ename job Salary Comm
    15 i1     support 50000     11
    Deptno dname      Loc
    5     IT          sss
    3     Account     sss
    This is second row:
    Empno ename job Salary Comm
    16 i2     support     8000     10
    Deptno dname      Loc
    5     IT     sss
    3     Account     sss
    2     Software sss
    4     Operation sss
    i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
    plz any one can help
    thanks

  • View Link between two query views

    Hi is it possible to create a view link between two views having the where clause bind variables.
    How you set the bind variables at the run time for the View objects. It is giving hard time for me to use the Master view in the XmlData bean to generate the Xml document.
    I am able to set the Master views bind variables, but for view link destination view
    where clause bind variables are not able to set ( link object link condition bind variables are binded run time but the views where chause bind variables of destination view are unable to setand bind)
    Thanks
    null

    Easiest way to do this is to add additional transient attributes to your master view object, and then include those additional transient attributes in the list of source attributes for your view link. This way, you can get BC4J to automatically refer to their values with no additional code on your part.

  • [SOLVED] Multiple Dynamic View Objects and View Links - ADF Tree Table

    Hi all,
    I've got a method that creates 3 dynamic viewobjects using this:
                ViewDefImpl Level1ViewDef = new ViewDefImpl("Level1View");
                Level1ViewDef.addViewAttribute("LevelDescription","LEVEL1_DESCRIPTION",String.class);
                Level1ViewDef.addViewAttribute("SetOfBooksId","SET_OF_BOOKS_ID",Number.class);
                Level1ViewDef.addViewAttribute("CodeCombinationId","CODE_COMBINATION_ID",Number.class);
                Level1ViewDef.addViewAttribute("Level1","LEVEL1",String.class);
                Level1ViewDef.addViewAttribute("AccountType","ACCOUNT_TYPE",String.class);
                Level1ViewDef.addViewAttribute("PeriodYear","PERIOD_YEAR",Number.class);
                Level1ViewDef.addViewAttribute("PeriodNum","PERIOD_NUM",Number.class);
                Level1ViewDef.addViewAttribute("PeriodName","PERIOD_NAME",String.class);
                Level1ViewDef.addViewAttribute("PtdActual","PTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("YtdActual","YTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("LtdActual","LTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("BudgetName","BUDGET_NAME",String.class);
                Level1ViewDef.addViewAttribute("BudgetVersionId","BUDGET_VERSION_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdBudget","PTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("YtdBudget","YTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("LtdBudget","LTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("EncumbranceType","ENCUMBRANCE_TYPE",String.class);
                Level1ViewDef.addViewAttribute("EncumbranceTypeId","ENCUMBRANCE_TYPE_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdCommitment","PTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("YtdCommitment","YTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("LtdCommitment","LTD_COMMITMENT",Number.class);
                Level1ViewDef.setQuery(sql_level1);
                Level1ViewDef.setFullSql(true);
                Level1ViewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
                Level1ViewDef.resolveDefObject();
                Level1ViewDef.registerDefObject();
                ViewObject vo1 = createViewObject("Level1View",Level1ViewDef);I can create the view objects fine and create a single viewlink between two of them, however i'm getting problems with 2 view links.
    This is how I'm creating a view link:
                ViewLink Level2Level1FKLink = createViewLinkBetweenViewObjects("Level2Level1FKLink1",
                                                        "Level2View",
                                                        vo1,
                                                        new AttributeDef[]{
                                                          vo1.findAttributeDef("Level1")
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level1")
                                                        "LEVEL1 = :Bind_Level1");
                ViewLink Level3Level2FKLink = createViewLinkBetweenViewObjects("Level3Level2FKLink1",
                                                        "Level3View",
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level2")
                                                        vo3,
                                                        new AttributeDef[]{
                                                          vo3.findAttributeDef("Level2")
                                                        "LEVEL2 = :Bind_Level2");I can get the data to display on an adf tree table if i'm only using a single view link, but when i try and implement 2 view link (for 3 levels on the adf tree table) i'm getting problems displaying the data.
    I'm getting the following error:
    Aug 10, 2007 2:44:39 PM oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer encodeAll
    SEVERE: Error during partial-page rendering
    oracle.jbo.NoDefException: JBO-25058: Definition Level3View of type Attribute not found in Level2View_Level2Level1FKLink1_Level2ViewThe thing is, Level3View isn't in the Level2Level1FKLink viewlink.
    I've been reading about something similar here
    BC4J Master-Detail-Detail
    but I am still unsure of what the problem is.
    Thanks in advance.

    I found the answer here:
    http://radio.weblogs.com/0118231/stories/2004/06/10/correctlyImplementingMultilevelDynamicMasterDetail.html

  • View objects, view links, does not search properly

    Hi,
    I am using Jdev 11.1.2.0
    I have created a search criteria based on view objects and view links. It has entities and entity associations as base. The structure is as follow:
    vo1 ->vl (1 to 1) - > vo2
    ->vl ( 1 to many) -> vo3
    Any search attribute which is not from vo1 return bad result. It happens in running app module and in the jspx page. In app module, it sometimes complains about populating the wrong attribute for the named criteria.
    The search criteria is using "exists" statement for vo2 and vo3 for adding the conditions. It has many attributes within the exist statement.
    So what is the problem. Why it does not join properly? Why does it return bad result when search attribute is from vo2 and vo3? Please help.
    Any more information requires to solve the problem?
    Thanks,
    Arthur

    Hi,
    Two more information: vo1 is composed of Entity1 (1..M) Entity2 and Entity1 (1..1) Entity 3. vo2 is composed of Entity 2 and vo3 is composed of Entity 4.
    I follow the information from http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcquerying.htm#BCGIFHHF
    to create the search criteria.
    Arthur

  • EJB Finder View Links and CMR

    Hi,
    Can someone please give me some input on the following warning in the JDeveloper online help!
    "Warning: You cannot create an EJB finder view link that expresses the same relationship as a CMR."
    I'm new to EJB, BC4J and JDeveloper. I created container managed entity beans with local interfaces only to represent my data and relationships. No problems with the mapping so far.
    To test the beans I used Session Facades with remote interfaces and build a sample test client.
    Now I thought I could create EJB Entity Facades, EJB Finder View Objects, EJB Finder View Links and EJB Application Modules to make use of the BC4J framework in order to speed up programming clients (JSP and JClient).
    So I've started studying the JDeveloper online help (which seems to be very useful) and found the above mentioned warning.
    Well, better a warning than nothing at all, but some more explanations would have been even better.
    Is there no need to use view links with CMR?
    How to achieve the same functionality (synchronizing two view objects in a master-detail-relationship) with CMR?
    Do you know any examples? I couldn't find any examples using EJB entity facades in the "sample code" area on OTN.
    Any comments about other (better) architectures are also welcome. Would it be better to use BMP entity beans in conjunction with BC4J?
    Many thanks for your help!
    Regards,
    Eric

    Steven,
    thank you for your reply and suggestions - I'll count on that. If I find time I'll read this book. It seems to be very interesting.
    For educational purposes I'd like to look at both persistence implementation strategies. I agree that it looks definitly easier to use entity objects. Certainly it's also performancewise a better choice.
    Anyhow, could you give me some useful tips for cmp entity beans and finder view objects?
    Is there something which works completely different if I use BC4J on top of it?
    How to implement a master-detail relationship in JClient (Swing) for example?
    What about writing an ejbfinder which doesn't return all, but all data where the foreign key is equal to a parameter passed to the finder method and use this as the source for a detail view object. This could be the primary key of the selected master. Well, I don't know whether this is doable. But that's what comes to my mind spontaneously.
    Would this be a solution? I'm still thinking about the aforementioned warning in the online help regarding view links.
    I guess the problem is that the foreign key is not part of the entity bean as it's not a cmp-field. Instead you have accessor methods to retrieve a related object or a collection of objects.
    I'm sure my questions are not too complicated to answer. It's only hard for a beginner to get an overview.
    I'm quite confident that I'll manage this if I give my best and get some help from knowledgeable people like you Steven.
    Regards,
    Eric

  • ADF BC: both ID and view link object as getter/setter in row impl

    I notice something when generating the row implementation of VO that have links to other VO. I can't seem to find the logic behind it...
    Following model:
    users( id, address_id,name,firstname,...)
    address(id, street,number,...)
    their is an assosiation between the UsersEO and the addressEO. Their is also a view link between the UsersVO and the AddressVO based upon the assosiation of the EO's.
    When we create the row implementation of the UsersVO we find a getter and setter for both the address_id as well as the address row object.
    Why is this?
    We have this issue because i added the UsersVO and the addressVO to the app module but i haven't added the link to the appModule but when i create the SDO from the appModule, the Users has both the address_id as the address row object.
    THis does not seem to make sense. How do you use it correctly? Do you just need to set the address_id and can leave the row object null or do they both need to have the same? What if you set the address_id to 1 but the id in the address row object is set to 5...
    How do the databindings handle these things?
    To me it seems more logical that the VO only has a getter and setter for the address object and handles the address_id in the background according to the values in the address object.
    Can someone explain me why this is implemented this way and how to handle it correctly?
    Edited by: Yannick Ongena on Sep 27, 2010 5:29 PM

    Yannick Ongena wrote:
    When we create the row implementation of the UsersVO we find a getter and setter for both the address_id as well as the address row object.
    Why is this? The definition of the VL allows you to optionally generate accessors for the underliying VOs, i.e. getAddressVO() in the UsersVO and getUsersVO() in the addressVO.
    We have this issue because i added the UsersVO and the addressVO to the app module but i haven't added the link to the appModule but when i create the SDO from the appModule, the Users has both the address_id as the address row object. You should add the addressVO to the AM using the VL instead and not by itself.
    THis does not seem to make sense. How do you use it correctly? Do you just need to set the address_id and can leave the row object null or do they both need to have the same? What if you set the address_id to 1 but the id in the address row object is set to 5...
    As mentioned above, once you add the addressVO to AM using the VL, the framework will take care setting the value of the row objects accordingly.

  • View Link on two programmatic view objects

    Hello,
    I use Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407
    I have two programmatic View Objects with data from other sources (an ArrayList in my example).
    Now I would like to create a View Link on it. How can I do this?
    I'm quite new on Java and ADF...
    I know it is possible because I already found Steve's example 132 here [http://blogs.oracle.com/smuenchadf/examples/|http://blogs.oracle.com/smuenchadf/examples/]
    But could somebody create a simple example based on my example classes below (which is understandable for a newbie like me ;-) ?
    Has been asked already here, but I did not found a solution as yet.
    Error with view link and ADF table Tree
    This is my example code for the view objects:
    Employee.java:
    private Number empno;
    private String ename;
    private Number dept;
    with getters and setters...
    Department.java
    private Number deptno;
    private String dname;
    with getters and setters...
    public class StaticDataDepartmentsImpl extends ViewObjectImpl {
    int rows = -1;
    private List<Department> departments = new ArrayList<Department>();
    protected void executeQueryForCollection(Object rowset, Object[] params,
    int noUserParams) {
    // Initialize our fetch position for the query collection
    setFetchPos(rowset, 0);
    super.executeQueryForCollection(rowset, params, noUserParams);
    // Help the hasNext() method know if there are more rows to fetch or not
    protected boolean hasNextForCollection(Object rowset) {
    return getFetchPos(rowset) < rows;
    // Create and populate the "next" row in the rowset when needed
    protected ViewRowImpl createRowFromResultSet(Object rowset,ResultSet rs) {
    ViewRowImpl r = createNewRowForCollection(rowset);
    int pos = getFetchPos(rowset);
    populateAttributeForRow(r, 0, departments.get(pos).getDeptno());
    populateAttributeForRow(r, 1, departments.get(pos).getDname());
    setFetchPos(rowset, pos + 1);
    return r;
    // When created, initialize static data and remove trace of any SQL query
    protected void create() {
    super.create();
    // Setup string arrays of codes and values from VO custom properties
    initializeStaticData();
    rows = (departments != null) ? departments.size() : 0;
    // Wipe out all traces of a query for this VO
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    // Return the estimatedRowCount of the collection
    public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
    return rows;
    // Subclasses override this to initialize their static data
    protected void initializeStaticData() {
    Department d1 = new Department();
    d1.setDeptno(new Number(10));
    d1.setDname("IT");
    Department d2 = new Department();
    d2.setDeptno(new Number(20));
    d2.setDname("HR");
    departments.add(d1);
    departments.add(d2);
    // Store the current fetch position in the user data context
    private void setFetchPos(Object rowset, int pos) {
    if (pos == rows) {
    setFetchCompleteForCollection(rowset, true);
    setUserDataForCollection(rowset, new Integer(pos));
    // Get the current fetch position from the user data context
    private int getFetchPos(Object rowset) {
    return ((Integer)getUserDataForCollection(rowset)).intValue();
    public class StaticDataEmployeesImpl extends ViewObjectImpl {
    int rows = -1;
    private List<Employee> employees = new ArrayList<Employee>();
    protected void executeQueryForCollection(Object rowset, Object[] params,
    int noUserParams) {
    // Initialize our fetch position for the query collection
    setFetchPos(rowset, 0);
    System.out.println("in executeQueryForCollection");
    super.executeQueryForCollection(rowset, params, noUserParams);
    // Help the hasNext() method know if there are more rows to fetch or not
    protected boolean hasNextForCollection(Object rowset) {
    System.out.println("in hasNextForCollection. Rows:" + rows);
    return getFetchPos(rowset) < rows;
    // Create and populate the "next" row in the rowset when needed
    protected ViewRowImpl createRowFromResultSet(Object rowset,ResultSet rs) {
    ViewRowImpl r = createNewRowForCollection(rowset);
    int pos = getFetchPos(rowset);
    System.out.println("in createRowFromResultSet. Pos=" + pos);
    populateAttributeForRow(r, 0, employees.get(pos).getEmpno());
    populateAttributeForRow(r, 1, employees.get(pos).getEname());
    populateAttributeForRow(r, 2, employees.get(pos).getDept());
    setFetchPos(rowset, pos + 1);
    return r;
    // When created, initialize static data and remove trace of any SQL query
    protected void create() {
    super.create();
    // Setup string arrays of codes and values from VO custom properties
    initializeStaticData();
    rows = (employees != null) ? employees.size() : 0;
    System.out.println("in create(). Rows=" + rows);
    // Wipe out all traces of a query for this VO
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    // Return the estimatedRowCount of the collection
    public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
    return rows;
    // Subclasses override this to initialize their static data
    protected void initializeStaticData() {
    Employee e1 = new Employee();
    e1.setEmpno(new Number(2333));
    e1.setEname("Emp1");
    e1.setDept(new Number(10));
    Employee e2 = new Employee();
    e2.setEmpno(new Number(1199));
    e2.setEname("Emp2");
    e2.setDept(new Number(20));
    Employee e3 = new Employee();
    e3.setEmpno(new Number(3433));
    e3.setEname("Emp3");
    e3.setDept(new Number(10));
    Employee e4 = new Employee();
    e4.setEmpno(new Number(5599));
    e4.setEname("Emp4");
    e4.setDept(new Number(20));
    Employee e5 = new Employee();
    e5.setEmpno(new Number(5676));
    e5.setEname("Emp5");
    e5.setDept(new Number(10));
    Employee e6 = new Employee();
    e6.setEmpno(new Number(7867));
    e6.setEname("Emp6");
    e6.setDept(new Number(20));
    employees.add(e1);
    employees.add(e2);
    employees.add(e3);
    employees.add(e4);
    employees.add(e5);
    employees.add(e6);
    // Store the current fetch position in the user data context
    private void setFetchPos(Object rowset, int pos) {
    if (pos == rows) {
    setFetchCompleteForCollection(rowset, true);
    setUserDataForCollection(rowset, new Integer(pos));
    // Get the current fetch position from the user data context
    private int getFetchPos(Object rowset) {
    return ((Integer)getUserDataForCollection(rowset)).intValue();
    Who can help?
    Thnx in advance!
    Rolf

    Rolf,
    I guess when we try to do it for you, we end up with almost the sample code provided by Steve Muench.
    So there from my point of view it doesn't make sense to do it all over.
    Take some time and study the sample code, run it without changes and after that try some changes which suits your use case better.
    If you don't understand what's going on in the sample post the question here and we try to help you.
    Timo

Maybe you are looking for

  • Agente Inbox

    Hi Experts, We are customizing IC WinClient for CRM 5.0 and would like to know the difference between the subfolders “Planned Bus. Transactions” and “Planned Activities” that are shown in the workspace “IC_WORKLIST” (Agent Inbox). Are the Business Ac

  • Helvetica Neue Fonts

    Hi all, I have a pdf which has Helvetica Neue Roman, Helvetica Neue Bold fonts. If I buy Neue Helvetica 55 Roman and Neue Helvetica 75 Bold fonts. would I be able to edit that PDF? I have Adobe Acrobat 9 Pro. Thank you Palak

  • Jca and jms

    hi, i ned to impliment a jca (java connector architecture) in jms, help me. thanks

  • Adobe Acrobat XI edit forms crashes

    I have a 21 page form with active fields. Forms editing crashes as soon as I touch the field to be editted. My software is up to date. I have a deadline to edit this and other forms.

  • Problem printing the Detail-Trail Balance Standard report

    Iam trying to print the detail trial balance report in GL. Iam getting the report output correctly. But when iam printing the report, the last line of every page is spilling out on to the next page and then there is a page break(which is expected). a