View Link Problems

Hi
I have a master child relationship...
Lets say table Employee and Table Quarters
EMployee is master and qaurters child, in the quarters table i need to create a column called quarter name which is a transient column which will be populated at runtime...
so i create the view link, but when the code runs for the selection of the child rows i get 0 rows returned... ie when i click on the master row a PPR event fires which should iterate through the child rows and add the qaurter names to the list....
Please could someone tell me how to iterate through a child when selecting from a master
this is how i am doin it currently
XxPerfQuarterViewRowImpl row = (XxPerfQuarterViewRowImpl)first();
if(row != null)
String name = "Quarter "+i++;
row.setQuarterName(name);
while((row = (XxPerfQuarterViewRowImpl)next()) != null){
name = "Quarter "+i++;
row.setQuarterName(name);
but before this logic even runs i get a null pointer cos no rows are returned please assits ASAP
THanks IN Advance

all that i am doin with the code is setting the current row on the MAster
Here is the code for that
// sets rows with master details selcections
public void hangleMasterSelect(String view, String column, String value)
OADBTransaction txn = getOADBTransaction();
String detailTableText = null;
OAViewObject vo = (OAViewObject)findViewObject(view);
vo.reset();
Row [] rows = vo.getFilteredRows(column,value);
if ((rows != null) && (rows.length > 0))
Row masterRow = rows[0];
vo.setCurrentRow(masterRow);
which is called from the CO for the table region as follows
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
String event = pageContext.getParameter("event");
if ("quarterSelect".equals(event))
Serializable[] params = { "XxPerfQuarterView1", "SelectFlag", "Y" };
am.invokeMethod("hangleMasterSelect",params);
// am.invokeMethod("setQuarterNames");
right... now that alll works
but as i said to you i have to insert some dynamic data in the child table at runtime
ie in the quarters table (which is the child) once the correct rows are returned from the master IE the rows that are linked to the master....
i need to fo through them and set a string in a transient variable....
like this
public void setQuarterNames(String performanceId){
// setWhereClause("performance_contract_id ="+performanceId);
// executeQuery();
int i = 1;
XxPerfQuarterViewRowImpl row = (XxPerfQuarterViewRowImpl)first();
if(row != null)
String name = "Quarter "+i++;
row.setQuarterName(name);
while((row = (XxPerfQuarterViewRowImpl)next()) != null){
name = "Quarter "+i++;
row.setQuarterName(name);
}

Similar Messages

  • Problems querying view link

    I have created a query page that uses a view link do a query. No rows are returned. However, their are several rows in both tables that are represented in the view link.
    Below is the code from the JSP.
    <%@ page
    language="java"
    errorPage="errorpage.jsp"
    contentType="text/html;charset=windows-1252" %>
    <%@ page language="java" import = "oracle.jbo.html.*" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ include file="ValidateCookie.inc" %>
    <html>
    <head>
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <LINK REL=STYLESHEET TYPE="text/css" HREF="/webapp/css/bc4j.css">
    <TITLE>Query From</TITLE>
    </head>
    <body>
    <jbo:ApplicationModule id="am"
    configname="XPA.XPAModule.XPAModuleLocal"
    releasemode="Stateful" />
    <jbo:DataSource
    id="ds"
    appid="am"
    viewobject="View_Cu"
    rangesize='<%=XPA.XPAConstants.XPA_RANGE_SIZE%>'/>
    <%--jbo:DataSource
    id="ds"
    appid="am"
    viewobject="LV_Cu_Contact"
    rangesize='<%=XPA.XPAConstants.XPA_RANGE_SIZE%>'/--%>
    <jbo:DataHandler appid="am"
    relativeUrlPath = "/components/XPADataHandlerComponent.jsp" />
    <%
    String params = HtmlServices.getRequestParameter(pageContext,"jboEvent");
    params= params + "xx";
    if (params.equalsIgnoreCase("nullxx")) {
    %>
    <%-- Roll back any un-finished transactions. We need to do this in any
    %-- first level jsp to negate any uncommited transactions
    --%>
    <jbo:RollBack appid="am" />
    <h3>Company Search Page</h3>
    <a href="queryhelp.html">Search Help</a>
    <jbo:DataQuery datasource="ds"
    relativeUrlPath="/components/XPADataQueryComponent.jsp" />
    <%
    %>
    <jbo:OnEvent list="Search, FirstSet, NextSet, PreviousSet, LastSet" >
    <h3>Query Results</h3>
    <table border="0">
    <tr>
    <td ALIGN="left">
    <jbo:DataScroller datasource="ds" />
    </td>
    </tr>
    <tr>
    <td>
    <jbo:DataTable datasource="ds"
    relativeUrlPath="Step1DataTableComponent.jsp"
    edittarget="Step1Q_Edit.jsp" />
    </td>
    </tr>
    </table>
    </jbo:OnEvent>
    </body>
    <jbo:ReleasePageResources />
    </html>
    Any ideas on how to fix this problem?

    Has the view object been execute? Try using the RefreshDataSource tag.

  • 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

  • Create View Link Definitions - Problem

    Hi,
    I was trying to define a relationship between two view objects using the view link icon, but I always get this error messages:
    BME-99004:A java runtime exception has occurred,
    BME-02038:Exception thrown during validation.
    Can anyone help me? It's very important!!
    Thanks
    null

    Ok, I'm not Lisa but do you still want my help? ;o)
    We need to go back to basics for this and also provide more information.
    I assume you are using ADF Business Compoments,
    What version - I'll assume 10.1.3
    How are you creating the link; what are you actually doing when yuo get this error - are you running.
    Here is what I would do - create two default EOs EMP and DEPT and create two default VOs on them, drag the VOs onto a Business Components diagram and add a link to it - does that work - if so, what is different. If that doesn't work then we have something to go on.
    Regards
    Grant Ronald
    Oracle Product Management

  • Problem in Extending VO in Jdev10g-View links

    Hello all,
    I want to extend one VO in Jdev10g. This VO is used by one report. I have done extending VO in 9iJdev last time.
    But in this case when I am extending VO, the new VO.xml doesnt contains some code which standard VO have.
    Example: In standard VO.xml, following code is present.
    <ViewLinkAccessor Name="LinesVO" ViewLink="oracle.apps.ont.print.blanket.server.HdrLinesVL" Type="oracle.jbo.RowIterator" IsUpdateable="false">
    </ViewLinkAccessor>
    <ViewLinkAccessor Name="HdrBillToAddressVO" ViewLink="oracle.apps.ont.print.blanket.server.HdrBillToVL" Type="oracle.jbo.RowIterator" IsUpdateable="false">
    </ViewLinkAccessor>
    <ViewLinkAccessor Name="HdrShipToAddressVO" ViewLink="oracle.apps.ont.print.blanket.server.HdrShipToVL" Type="oracle.jbo.RowIterator" IsUpdateable="false">
    </ViewLinkAccessor>
    But in my extended VO this code is not coming. This code is for the View links, I guess. I think, my VO is linked with these VOs using View Link.
    Please tell me how can I extend such a VO which is linked to some other VOs?
    Regards,
    Parag

    hi Meher
    No ,,,,,,
    it is performing the main controller operation.
    it is taking th oriiginal controller ,i mean
    after the code i am using super. processFormRequest(pageContext, webBean);
    i observed that the VO which i am trying to operate is related with second AM (i.e., Second region) ,,,,
    for that puprose,,,, even i am trying this code
    OAHeaderBean headerBN = (OAHeaderBean)webBean.findChildRecursive("Meter Readings");
    if(headerBN != null)
    OAAdvancedTableBean tableBean =(OAAdvancedTableBean) webBean.findChildRecursive("counterTableRN");
    OAColumnGroupBean columngpBean=(OAColumnGroupBean)tableBean.findChildRecursive("NewReadingCols");
    OAColumnBean columnBean=(OAColumnBean)columngpBean.findChildRecursive("NewReadingCols");
    String value=columnBean.getAttributeValue("NewReading").toString();
    is this correct
    Edited by: 819824 on Jul 15, 2011 7:08 AM
    Edited by: 819824 on Jul 15, 2011 7:10 AM

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

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

  • View Links for Programmatic View Objects

    Hi All,
    I created a read only VO called MyVO based on a sql query.
    I created 2 programmatic view objects, MasterView and ChildView.
    In a custom method in AMImpl class ,I iterate through this MyVO resultset and get the rows in a Row object.
    Based on some attributes values of the Row, I populate both master and child View Objects.
    I have created a view link between Master and Child Programmatic View Objects and have exposed them in AM.
    Now I run the AM, and run the method exposed in client interface.
    Now I click on my master and child programmatic views.
    I see that the rows are populated in both of these programmatic VOs.
    But when I click on viewlink which I have exposed under master, it doesnt show me any
    record for child.
    This is my method of AMImpl which is exposed in AM client interface.
    public void constructLines(){
    ViewObject vo= this.getMyVO1();
    ViewObject master=this.getTransientVO1();
    ViewObject child=this.getTransientLineVO1();
    Row r,masterRow,childRow;
    int count=0;
    while(vo.hasNext()){
    ++count;
    r=vo.next();
    masterRow = master.createRow();
    if(r.getAttribute("QuoteHeaderId")!=null)
    masterRow.setAttribute("QuoteHeaderId",
    r.getAttribute("QuoteHeaderId").toString());
    if(r.getAttribute("QuoteLineId")!=null)
    masterRow.setAttribute("QuoteLineId",
    r.getAttribute("QuoteLineId").toString());
    if(r.getAttribute("LineNumber")!=null)
    masterRow.setAttribute("LineNumber",
    r.getAttribute("LineNumber").toString());
    master.insertRow(masterRow);
    childRow= child.createRow();
    if(r.getAttribute("RefLineId")!=null)
    childRow.setAttribute("RefLineId",
    r.getAttribute("QuoteLineId").toString());
    if(r.getAttribute("QuoteHeaderId")!=null)
    childRow.setAttribute("QuoteHeaderId",
    r.getAttribute("QuoteHeaderId").toString());
    child.insertRow(childRow);
    This is stopping me from my development progress.
    Any suggestion to solve this will be of great help.
    Thanks,
    Prabhanjan

    Hi..
    have you define relationship correctly between masterVO and childVO.sometime there may be the problem.

  • How to rename a View Link in a data model?

    In JDeveloper 9.0.3, I create a simple BC4J project with a master and a detail. The business components are properly created.
    When I try to design the data model for the module, I am able to link the view for the master and the view for the detail, there is no problem to rename the view objects that I select in my data model, but I found no way to rename the view links used between the view objects.
    I always get an automatically generated name, like "FkForeignDetailLink1". This is what I see in the data model, and also in the structure of the module, in the "View Link Members" section.
    I am able to modify the properties of this view link, but not its name. Am I missing something?
    TIA

    to clarify... In the AM wizard, you are trying to rename the instances of view objects and view links?
    If so, you are right, there is no way to rename view links on that panel. We are working on a better way to do that for the next release. The only way I know of to rename the view links is to shut jdev down and edit the XML for the application modele. This can be dangerous if you get it wrong, so make a backup before attempting this. The hint with renaming things OUTSIDE JDeveloper, I already know, but I don't like much.
    As for the AM wizard, I just noticed that I cannot do it inside. But that's no problem for me, as lots of details cannot be done inside the wizard, but there is a way to customize them afterwards. My real problem is that didn't find ANY way of doing it.
    A question for you if I may. Why are you renaming the view link instances? I though most users would use the detail view instance directly. The detail view instance would in turn look up the appropriate view link into, what ever its name was. The only place where I saw the bad view link names displayed in JDev was the Structure pane of the AM, under View Link Members. But there is no way to modify them there. As for the detail view instance, I didn't find a place to get to the view link at design time (in 9.0.3.988).
    Could you be more precise, please?
    Thanks again,
    Adrian

  • Many - to - many view links (master-detail)

    Case :
    I have a relation many-to-many between two tables, composed of 3 tables:
    Table Users ( User_Id, User_name ) // Master 1
    Table Groups ( Group_Id, Group_name ) // Master 2
    Table Users_Groups ( User_Id, Group_Id ) // Child (holding then many - many relation)
    Need :
    I want to make Master-detail relation, so that when I change the group (Master 2) the details of the users - user_id, user_name - in this group appear in table below.
    problem :
    All the master-detail examples I have seen in Jdeveleoper, between One - many realtionship, where the details table contain the information to be displayed; now my case that the details to be displayed is in another table (Master 1) not in the child table directly.
    So using ordinary view Link between the a master table and the child table displayes only the Id's of the child table but I need that the names that in (Master 1) table which is related to the selected master id.
    Thankx

    Duplicate of add where clause to detail view in master/detail relation
    Timo

  • Error when Setting value to Bind variable in View Link used in HGrid

    Hi
    I have requirement to pass profile id as bind variable, I have created a VO based on below Query.
    select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
    from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
    where a.child_id = b.child_id(+)
    and b.profile_id(+) = :1
    View Link Query that is being generated is
    SELECT * FROM (select 'N' Is_Selected, 'N' Is_Already_Selected, 'N' Is_Selected_Copy, a.*
    from XXPA_STATE_CONST_DTLS_V a, xxpa_state_const_dtls b
    where a.child_id = b.child_id(+)
    and b.profile_id(+) = :1) QRSLT WHERE PARENT_ID = :Bind_ChildId
    it Shows Errors as
    ## Detail 0 ##
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could anyone tell what could be the wrong. Do we need to set bind variable in view link Explicitly? or any other alternative.
    Its very Urgent.
    Regards
    Vimal

    Hi,
    I have faced similar problem some time ago. I could not find any solution except removing bind parameters in where clause. I tried to change binding style but it also didn't work. I think the problem is caused by view link's where clause.

  • Create view link programatically

    Hi all,
    I am working on this weird requirement.
    Basically, I have to create a detail table on a search resullt table. The search result is seeded search, for Item Advance search in Oracle PIM module which is not based upon a VO. The search result table is dynamically built at run time in the EgoItemSearchHelper class and that's where they build the search result VO (EgoItemSearchResultsVO).
    Now, I need to access this VO in the controller class, and create a view link programatically between details table VO and this VO. The problem is since I do not have Impl class for the EgoItemSearchResultsVO, how do I accees the column that is the key attribute. Second I do not know how to create view link between the two VOs programatically.
    Please help it's urgent.
    Thanks

    Pratap, My problem is the seeded VO is in seeded AM and my details VO will be in my custom AM, I don't know if we can have a view link between View objects that are in different AMs.
    To bypass that problem, I tried to create a VO in the seeded AM programatically and then created a view link. Now since the AM is seeded, and I am adding my details VO to this AM programatically, I thought of creating a table also programatically on the detais VO.
    In the end it does not work, I end up getting a show button on the main table, but when I click I get an error (Cannot find <null> attribute in the EOGITEMSEARCHRESULTVO) which is the seeded VO class. Unfortunately there is no boolean variable on the dynamic seeded VO, so don't know what to put in oatablebean.setDetailViewAttributeName("") method;
    Any clues on this, appreciate all responses from the forum gurus.
    ViewObject voEmp = oaapplicationmodule.createViewObject("MyEmp", "xxuss.oracle.apps.ego.item.eu.server.DetailsOrderLinesVO");
    ViewObject voEmp = am.createViewObject("MyEmp", "xxuss.oracle.apps.ego.item.eu.server.DetailsOrderLinesVO");
    AttributeDef[] prjLinkAttrs = new AttributeDef[]{oaapplicationmodule.findViewObject("EgoItemSearchResultsVO").findAttributeDef("INVENTORY_ITEM_ID_B")};
    System.out.println("definition for attr = "+ prjLinkAttrs[0]);
    AttributeDef[] taskLinkAttrs = new AttributeDef[]{voEmp.findAttributeDef("InvId") };
    ViewLink vl = am.createViewLinkBetweenViewObjects("MyLink3",
    "DetailInv", // accessor name--more on this below
    am.findViewObject("EgoItemSearchResultsVO"), // master
    prjLinkAttrs, // department attributes
    voEmp, // detail
    taskLinkAttrs, // employee attributes
    null); // assoc clause
    System.out.println("view link =" + vl.getName());
    OATableBean tb = (OATableBean)createWebBean(oapagecontext,TABLE_BEAN,null,"table");
    tb.setViewUsageName("MyEmp");
    OAMessageStyledTextBean beans = (OAMessageStyledTextBean)createWebBean(oapagecontext,MESSAGE_STYLED_TEXT_BEAN,OAWebBeanConstants.VARCHAR2_DATATYPE,"number");
    beans.setPrompt("column1");
    beans.setViewUsageName("MyEmp");
    beans.setViewAttributeName("InvId");
    tb.addIndexedChild(beans);
    oatablebean.setDetail((OAWebBean)tb);
    oatablebean.setDetailViewAttributeName("SelectFlag"); // I just tried this, SelectFlag is not a boolean attribute though, is there a way to create a boolean attribute programatically for seeded VO EGOITEMSEARCHRESULTVO and set it here, will it help
    oatablebean.setAllDetailsEnabled(true);

  • View Link Editor Issue - empty query clause if based on association

    JDeveloper 10.1.2
    Setup:
    - entities A and B
    - a 1 to * association from entity A to entity B (A_B_association)
    - a view of A based on entity A (AView)
    - a view of B based on entity B (BView)
    - BView has an expert mode query
    Create a view link from table A to table B:
    - choose the A_B_association under AView for the source attribute
    - choose the A_B_association under BView for the destination attribute
    - click add
    - click next
    issue: the query clause is empty
    - click next:
    info dialog pops up;
    title = "Business Components"
    message = "Restoring the default where clause."
    Note, however, that creating a view link based on the attributes works. That is, if I choose the primary key attribute under AView for the source attribute, and the corresponding foreign key attribute under BView for the destination attribute, then the wizard generates the expected query clause.
    If I create a new project and recreate the entities, the views, and the association, then I can successfully create a view link based on the association. The foreignKey value on the association end was different in the new association XML file.  I modifed the old XML file so that it used the same foreignKey element, but that did not seem to work.
    I am guessing that this is some sort of user error on my part or that we have otherwise managed to squat up our XML files.
    Any tips, hints, or ideas appreciated.
    Thanks,
    Steve

    The problem is in AView.
    We had modified the AView at one point, then reverted it to a default view of entity A. Here, "a default view" means that we undid our custom changes (apparently not thoroughly enough); that is, we did not delete it and create a default view from scratch using the contextual menu on the A entity.
    The bottom line is that the AView attributes were not being mapped to the entity -- they were showing up as calculated attributes.
    We created a "New Default View Object..." from the contextual menu of entity A, then manually corrected the AView.xml file to solve the problem.

Maybe you are looking for

  • Need user exit lists and corresponding Program name for Transaction F110

    Hi all, I have a requirement to update trading partner field based on payment method using Exits or BADI during payment posting (which is carried out in F110). Please give me the exact user exit/program for this requirement. Thanks in advance Moderat

  • ISE 1.2 Sponsor Portal- Account Expiration Date Defaults to same time as Start Date

    We have a time profile setup for ISE Sponspr Portal with Start/End.  I understand this allows the sponsor to specifially set the start and end time for the guest account.  When creating an account, the Start/End time is the same time.  If a Sponsor f

  • I have migrated Scrippt as smartform but in pdf O/P chinese chars corrupted

    Hi Experts, we have migrated sap script as smartform and modified the driver program accordingly. In print preview  output is fine and no data corruption. we are converting this output as PDF and sending via email. For this we have used FM 'CONVERT_O

  • I cannot download the new version of iTunes

    I had the previous version of iTunes before the current version, and for some reason it would not update (there was something about iCloud, but I honestly cannot remember what it said).  I ended up uninstalling iTunes in an attempt to re-install it.

  • I'm sick of it!  What's wrong with 2.1?!?

    I'm getting pretty frustrated. Here's the deal: 1: bought a 1.1 ATV from the fruit stand 2: used for a month and it was great 3: upgraded to 2.0 and it was great 4: upgraded to 2.1 and every video is stuttering on playback and the remote is sluggish