Detail-Disclosure problem with Master- Detail VO

Hi,
I have UIX pages based on Master - Detail VO, detail data being shown when you press Detail button on the left, detail data display in the BC4J Table correctly, but I am able to update only the last record of the rowset. when I click on the first master detail and press update button i get Null Pointer Exeception error and other problem is that my detail data has sorted headers, when i click on the sorted column header, it close the Detail portion on the Table.
Here is UIX page listing, please any one review the code and let me what is wrong
Thanks
View Page
<?xml version="1.0" encoding="windows-1252" ?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:viewpage="http://www.example.org/siriusbilling/templates">
<ctrl:head xmlns="http://www.w3.org/TR/REC-html40">
<title>View Properties</title>
</ctrl:head>
<templates xmlns="http://xmlns.oracle.com/uix/ui">
<templateImport source="templates/SiriusBilling.uit"/>
</templates>
<bc4j:registryDef>
<bc4j:rootAppModuleDef name="PropertiesForeignKeyLink1AppModule"
definition="siriusbilling.SiriusBCModule"
releaseMode="stateful" >
<bc4j:viewObjectDef name="PropertyTypesMasterView"
rangeSize="2" />
<bc4j:viewObjectDef name="PropertiesDetailView"
rangeSize="5" />
</bc4j:rootAppModuleDef>
</bc4j:registryDef>
<ctrl:content xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui">
<viewpage:siriusPageLayout>
<pageHeader>
<globalHeader selectedIndex="0">
<contents>
<link text="View Properties" />
</contents>
</globalHeader >
</pageHeader>
<contents>
<try xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui" >
<catch>
<displayException />
</catch>
<contents>
<!-- this will contain any validation errors after form
submission -->
<messageBox automatic="true" />
<bc4j:rootAppModuleScope name="PropertiesForeignKeyLink1AppModule" >
<contents>
<header text="Properties Search" >
<contents>
<form name="search" method="POST" >
<contents>
<inlineMessage prompt="Search by:" vAlign="middle" >
<contents>
<bc4j:viewObjectScope name="PropertiesDetailView" >
<contents>
<flowLayout>
<contents>
<choice name="attrName"
data:selectedValue="attrName@ctrl:page"
shortDesc="Search Column">
<contents>
<option text="Property Id" value="PropertyId" />
<option text="Property Name" value="PropertyName" />
<option text="Property Description" value="PropertyDescription" />
<option text="Unit Of Measure" value="UnitOfMeasure" />
</contents>
</choice>
<textInput prompt="Criteria" name="attrValue" columns="20"
data:text="attrValue@ctrl:page"
shortDesc="Search Criteria for Propeties"/>
</contents>
</flowLayout>
</contents>
</bc4j:viewObjectScope>
</contents>
<end>
<submitButton text="Go" ctrl:event="search" />
</end>
</inlineMessage>
</contents>
</form>
</contents>
</header>
<spacer width="10"/>
<separator />
<header text="Property Types" >
<contents>
<form name="viewForm" method="POST" >
<contents>
<bc4j:viewObjectScope name="PropertyTypesMasterView" >
<contents>
<bc4j:table name="viewPropertyTypeTable" automatic="false"
width="100%" alternateText="No rows found"
formSubmitted="true"
partialRenderMode="self"
data:detailDisclosure="tableDetails@ctrl:eventResult">
<!-- the key identifying the current row in the table -->
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
<contents>
<!-- placing the region in automatic mode will cause the key
named child to be rendered, followed by each attribute
in the ViewObject using the attrStamp named child. -->
<!-- A bc4j:column element is added for each attribute
in the ViewObject. -->
<bc4j:column attrName="PropertyType">
<columnHeader>
<bc4j:sortableHeader text="Property Type"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="TableName">
<columnHeader>
<bc4j:sortableHeader text="Table Name"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="Comments" >
<columnHeader>
Comments
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
</contents>
<detail>
<flowLayout>
<contents>
<header text="Properties Detail">
<contents>
<spacer width="10"/>
<bc4j:viewObjectScope name="PropertiesDetailView" >
<contents>
<!-- placing the table in automatic mode will cause the table
to contain the keyStamp named child followed by the
columnStamp named child for each attribute in the
ViewObject. -->
<bc4j:table name="viewTable" automatic="false"
width="100%" alternateText="No rows found"
formSubmitted="true"
partialRenderMode="self">
<tableSelection>
<!-- single selection for each row in the table -->
<singleSelection selectedIndex="0" text="Select Row and ...">
<contents>
<submitButton text="Create" ctrl:event="create" />
<!-- the update button causes the currently selected
row to be sent to the update page -->
<submitButton text="Update"
ctrl:event="update" />
<!-- the delete button causes the currently selected
row to be removed -->
<submitButton text="Delete"
ctrl:event="delete" />
</contents>
</singleSelection>
</tableSelection>
<!-- the key identifying the current row in the table -->
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
<contents>
<!-- A bc4j:column element is added for each attribute
in the ViewObject. -->
<bc4j:column attrName="PropertyId">
<columnHeader>
<bc4j:sortableHeader text="Property Id"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="PropertyName">
<columnHeader>
<bc4j:sortableHeader text="Property Name"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="PropertyDescription">
<columnHeader>
<bc4j:sortableHeader text="Property Description"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
<bc4j:column attrName="UnitOfMeasure">
<columnHeader>
<bc4j:sortableHeader text="Unit of Measure"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
</contents>
</bc4j:table>
</contents>
</bc4j:viewObjectScope>
<formValue name="disclosed" value="true" />
</contents>
</header>
</contents>
</flowLayout>
</detail>
</bc4j:table>
</contents>
</bc4j:viewObjectScope>
</contents>
</form>
</contents>
</header>
</contents>
</bc4j:rootAppModuleScope>
</contents>
</try>
</contents>
</viewpage:siriusPageLayout>
</ctrl:content>
<handlers>
<event name="search" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertiesDetailView" >
<!-- search for the view criteria -->
<bc4j:findByExample>
<bc4j:exampleRow ignoreCase="true" >
<bc4j:exampleAttribute>
<bc4j:nameBinding><bc4j:parameter name="attrName" /></bc4j:nameBinding>
<bc4j:valueBinding><bc4j:parameter name="attrValue" /></bc4j:valueBinding>
</bc4j:exampleAttribute>
</bc4j:exampleRow>
</bc4j:findByExample>
<bc4j:executeQuery/>
<!-- store the current search criteria as page properties -->
<bc4j:setPageProperty name="attrName" >
<bc4j:parameter name="attrName" />
</bc4j:setPageProperty>
<bc4j:setPageProperty name="attrValue" >
<bc4j:parameter name="attrValue" />
</bc4j:setPageProperty>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="first" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertyTypesMasterView" >
<!-- navigate to the first department -->
<bc4j:first/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="previous" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertyTypesMasterView" >
<!-- navigate to the previous department -->
<bc4j:previous/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="next" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertyTypesMasterView" >
<!-- navigate to the next department -->
<bc4j:next/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="last" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertyTypesMasterView" >
<!-- navigate to the last department -->
<bc4j:last/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="sort" source="viewTable" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertiesDetailView" >
<!-- sort by the submitted attribute name -->
<bc4j:sort/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="sort" source="viewPropertyTypeTable" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertyTypesMasterView" >
<!-- sort by the submitted attribute name -->
<bc4j:sort/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="goto" source="viewPropertyTypeTable" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertyTypesMasterView" >
<!-- navigate to the submitted range -->
<bc4j:goto/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="goto" source="viewTable" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertiesDetailView" >
<!-- navigate to the submitted range -->
<bc4j:goto/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
<event name="create" >
<!-- forward to the create page -->
<ctrl:go name="InsertProperties" redirect="true" />
</event>
<event name="update" >
<!-- forward to the update page, passing the selected key
as a page property -->
<ctrl:go name="UpdateProperties" redirect="true" >
<ctrl:property name="key" >
<ctrl:selection name="viewTable" key="key" />
</ctrl:property>
</ctrl:go>
</event>
<event name="delete" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertiesDetailView" >
<!-- find the selected Row -->
<bc4j:findRowByKey>
<bc4j:keyBinding>
<bc4j:selectionKey name="viewTable" key="key" />
</bc4j:keyBinding>
<bc4j:handlers>
<!-- remove the selected ViewObject row -->
<bc4j:removeRow />
<!-- execute the query to eliminate dead row access -->
<bc4j:executeQuery/>
</bc4j:handlers>
</bc4j:findRowByKey>
</bc4j:findViewObject>
<!-- commit the transaction, forwards to self automatically -->
<bc4j:commit/>
</bc4j:findRootAppModule>
</event>
<event name="show">
<method class="servlet.showDetails" method="doHideShowEvent" />
</event>
<event name="hide">
<method class="servlet.showDetails" method="doHideShowEvent" />
</event>
</handlers>
</page>
Update View
<?xml version="1.0" encoding="windows-1252" ?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:updatepage="http://www.example.org/siriusbilling/templates">
<ctrl:head xmlns="http://www.w3.org/TR/REC-html40">
<title>Update Properties</title>
</ctrl:head>
<templates xmlns="http://xmlns.oracle.com/uix/ui">
<templateImport source="templates/SiriusBilling.uit"/>
</templates>
<bc4j:registryDef>
<bc4j:rootAppModuleDef name="PropertiesForeignKeyLink1AppModule"
definition="siriusbilling.SiriusBCModule"
releaseMode="stateful" >
<bc4j:viewObjectDef name="PropertiesDetailView" >
<bc4j:rowDef name="UpdatePropertiesDetailView" autoCreate="false" usesCurrency="true">
<bc4j:propertyKey name="key" />
</bc4j:rowDef>
</bc4j:viewObjectDef>
<!-- Display only 20 rows -->
<bc4j:viewObjectDef name="PropertyTypesView" rangeSize="20" >
<bc4j:rowDef name="UpdatePropertyTypesView" autoCreate="false">
<bc4j:propertyKey name="key" />
</bc4j:rowDef>
</bc4j:viewObjectDef>
</bc4j:rootAppModuleDef>
</bc4j:registryDef>
<ctrl:content xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui">
<updatepage:siriusPageLayout>
<pageHeader>
<globalHeader selectedIndex="0">
<contents>
<link text="Update Property" />
</contents>
</globalHeader >
</pageHeader>
<contents>
<try xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui" >
<catch>
<displayException />
</catch>
<contents>
<switcher childName="default">
<boundAttribute name="childName">
<if>
<comparison type="equals">
<dataObject select="key" source="ctrl:page"/>
<dataObject source="ui:null"/>
</comparison>
<fixed text="error"/>
</if>
</boundAttribute>
<case name="error">
<header text="Required page property 'Property Type' missing. Cannot display page."/>
</case>
<case name="default">
<flowLayout>
<contents>
<!-- this will contain any validation errors after form
submission -->
<messageBox automatic="true" />
<script>
<contents>
function UOMLovCallBack(lovwin, event)
var value = lovwin.returnUOMValue;
if (value!=(void 0))
document.updateForm.UnitOfMeasure.value = lovwin.returnUOMValue;
</contents>
</script>
<form name="updateForm" method="POST" >
<contents>
<!-- we cannot implicitly determine that events
will be triggered because submit buttons are
outside the form scope, so add the placeholder
explicitly -->
<formParameter name="event" />
<!-- layout the fields in two columns -->
<spacer width="10"/>
<tableLayout width="80%"
cellPadding="2"
hAlign="center">
<contents>
<bc4j:rootAppModuleScope name="PropertiesForeignKeyLink1AppModule" >
<contents>
<bc4j:viewObjectScope name="PropertiesDetailView" >
<contents>
<bc4j:rowScope name="UpdatePropertiesDetailView" >
<contents>
<bc4j:messageChoice prompt="Property Type" attrName="PropertyType" name="PropertyType">
<contents>
<bc4j:optionList voName="PropertyTypesView" attrName="PropertyType" textAttributeName="PropertyType" size="30"/>
</contents>
</bc4j:messageChoice>
<bc4j:messageInput prompt="Property Id" vAlign="left" attrName="PropertyId" size="30"/>
<bc4j:messageInput prompt="Property Name" attrName="PropertyName" size="30"/>
<bc4j:messageInput prompt="Property Description" attrName="PropertyDescription" size="30" />
<bc4j:messageLovField prompt="Unit Of Measure"
attrName="UnitOfMeasure"
name="UnitOfMeasure"
onClick="openWindow(window,
'UOMLov.uix',
'lovwin',
{width:480, height:300},
true,
'dialog',
UOMLovCallBack);
return false;" />
</contents>
</bc4j:rowScope>
</contents>
</bc4j:viewObjectScope>
</contents>
</bc4j:rootAppModuleScope>
</contents>
</tableLayout>
</contents>
</form>
</contents>
<contents>
<contentFooter>
<contents>
<html:center>
<!-- place a row of buttons below the content -->
<pageButtonBar>
<contents>
<!-- the cancel button performs a transaction rollback -->
<button text="Cancel" ctrl:event="cancel" />
<!-- the update button submits the user-entered
form data -->
<submitButton text="Update" formName="updateForm"
ctrl:event="apply" />
</contents>
</pageButtonBar>
</html:center>
</contents>
</contentFooter>
</contents>
</flowLayout>
</case>
</switcher>
</contents>
</try>
</contents>
</updatepage:siriusPageLayout>
</ctrl:content>
<handlers>
<event name="cancel" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- rollback the current transaction -->
<bc4j:rollback/>
<!-- forward to the summary page -->
<ctrl:go name="ViewProperties" redirect="true" />
</bc4j:findRootAppModule>
</event>
<event name="apply" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="PropertiesDetailView" >
<!-- find the row by key, falling back on a new default
row if the key is not found -->
<bc4j:findRow name="UpdatePropertiesDetailView" >
<!-- set each attribute explicitly -->
<bc4j:setAttribute name="PropertyId" />
<bc4j:setAttribute name="PropertyType" />
<bc4j:setAttribute name="PropertyName" />
<bc4j:setAttribute name="PropertyDescription" />
<bc4j:setAttribute name="UnitOfMeasure" />
<!-- commit the transaction -->
<bc4j:commit/>
<bc4j:executeQuery/>
<!-- forward to the summary page -->
<ctrl:go name="ViewProperties" redirect="true" />
</bc4j:findRow>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
</handlers>
</page>

I think the detailDisclosure state needs to be saved and retrieved from the session.
I'm not sure using a table with singleSelection inside a detail disclosure is supported. Are you doing master-detail inside of detail disclosure? Detail disclosure is not really meant for that. In jdev 10g preview we make hooking up a master-detail easy. Here's a link to some doc about it.
http://otn.oracle.com/products/jdev/collateral/tutorials/9050/adfuix_tut.html#Create%20a%20Master-Detail%20page

Similar Messages

  • Problem with Master -Details forms in seperate pages

    Hi ,
    Below is the scenario:
    I have Institution and a department tables where there is a foreign key relation between the tables. So now i have two entity objects for the 2 tables and 2 view objects(DepartmentView,InstitutionView) from the entity objects.
    I also have a view link between them.I made a master-detail relation between them in the datamodel using the view link.So my appmodule now has getters for the department view,institution view and viewlink.
    I now have a jsp page "createInstitution.jsp" which contains a form for the institution , i have a "next" button on the same jsp which calls a method in my appmodule class .This methods just inserts the record into the Institution view. In this method i am able to see what the user entered in the form by getting the viewrow record like the below code :
    InstitutionViewRowImpl newInstitutionRow=(InstitutionViewRowImpl) getInstitutionView().first();
    The next button navigates to the next page "listDepartments.jsp" which contains the list of departments that are added. This page has a button "Add Department" which takes to to the "addDepartment.jsp" page which shows a form for adding a department. This page also has a button which calls a method in app module class. The method just inserts the record into the view(DepartmentView)
    Here when i say
    DepartmentViewRowImpl newDepartmentRow=(DepartmentViewRowImpl ) getDepartmentView().first();
    the newDepartmentRow is null.
    Also on the addDepartment.jsp form , i had used a output field to see what the parent id was and interestingly the parent id is 75 which is first institution in the database. It should have been "-10" , a temporary id assigned.
    Can someone please tell me what is the problem with my approach?

    I don't understand why you are using a method on your button to insert the record into the table - An Oracle ADF Form will do the insert for you by default without any coding.
    See the create pages in these tutorials:
    http://www.oracle.com/technology/products/jdev/11/cuecards/adf_set_21/ccset21_ALL.html
    http://www.oracle.com/technology/obe/obe11jdev/11/dev_ui/developuserinterface.html#t2s5
    The method that you are calling just returns the first record in the rowset - I don't see how it has anything to do with actually inserting the data into the table.

  • Problems with Master / Detail created in backing-bean programmatically

    We are developing with JDeveloper 10.1.3.3 and ADF.
    We have 2 jspx.
    In the fisrt one we select some information and we create the master/detail in the backing-bean programmatically using createRow() and insertRow() in both ViewObject.
    In the second one we have the master/detail table.
    The problem is that when we go to the second jspx only appears the master row, no the detail row.
    Otherwise if we only create a detail row (belonging to an existing master) in the backing bean of the first jspx then the detail rows are shown correctly.
    Thanks in advance.

    Hi,
    you need to give more details on the implatementation. If you use ADF binding then just as a heads up: operation against VOs directly is far away from best practice
    Frank

  • Problems with Master-Detail Form not retrieving Detail Rows

    Portal 3.0.7.6.2 on NT
    I am having problems with a Master-Detail Form not retrieving Detail Rows. Sometimes it retrieves all, sometimes about 50%, the majority of the time it's not retrieving any. If it never retrieved any I would suspect that the 'join' condition was wrong but that isn't the case. I didn't have this problem with a prior MD Form I created. I have tried re-creating the MD Form but I get the same problem.
    Is anyone having similar problems/is this a know bug??
    Any help or thoughts are appreciated.

    I experienced performance problems. The simpiest MD form takes about 10 secs. to requery. I's not answer to your question, but there is more problems with this concept.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Michael Finch ([email protected]):
    Portal 3.0.7.6.2 on NT
    I am having problems with a Master-Detail Form not retrieving Detail Rows. Sometimes it retrieves all, sometimes about 50%, the majority of the time it's not retrieving any. If it never retrieved any I would suspect that the 'join' condition was wrong but that isn't the case. I didn't have this problem with a prior MD Form I created. I have tried re-creating the MD Form but I get the same problem.
    Is anyone having similar problems/is this a know bug??
    Any help or thoughts are appreciated.<HR></BLOCKQUOTE>
    null

  • Problem with Master Detail between 3 tables or more

    Hi to the community, I have the following problem.
    I have 3 tables relationship : table Solicitud, ItemSolicitado,Cotizacion
    Solicitud - ItemSolicitado ( 1 to * relationship )
    ItemSolicitado - Cotizacion ( 1 to * relationship )
    Solicitud - Cotizacion ( 1 to * relationship )
    I have a Master Detail between Solicitud/ItemSolicitado , and it run correctly, I Insert,update,delete correctly ( with expression Groovy )
    I want make a master/detail between ( Solicitud/ItemSolicitado ) / Cotizacion , because I need insert some data in Cotizacion table with some data from Solicitud/ItemSolicitado.
    The user see the Master/Detail between the Solicitud/ItemSolicitado Tables, and when the user select a item from the detail ( ItemSolicitado ) I want insert data into Cotizacion Table with the Solicitud Primary key and ItemSolicitado primary key
    How I can make a Master Detail between 3 tables or more ?? or, How I can do what I want ? some idea ??
    Thanks.

    I resolved it !!, Only create a view link between the tables and I define in the Data Model Tab of my application module, as following, and it run !!
    +Solicitud              // parent
    +ItemSolicitado   // child 1
    +Cotizacion        // child2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem with Master-Detail web page tutorial

    My student asked me about this problem:
    I just completed the following Master-Detail tutorial...
    http://www.oracle.com/technology/products/jdev/collateral/4gl/HO_Workshop/hos1_1/HOS1_1_ADF_Forms_Designer.pdf
    ... The problem here is that when I try to define Order By CUSTOMER_ID in CustomersView the App Module test and the application both fail...
    JBO-30003: The application pool (model.OrderEntryAMLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.domain.DataCreationException, msg=JBO-25029: Data class (a domain?) String not found     at oracle.jbo.JboException.<init>(JboException.java:343)     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1772)     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611)
    (etc...)
    Note that I can define Order By ORDER_ID in OrdersView without problems.

    Thanks Frank... I had entered just CUSTOMER_ID as you said. After trying this, the App Module is "permanently" broken. It will not work again even if I remove the Order By entry. I was able to use Order By ORDER_ID successfully in the OrdersView. The Order By is not part of the tutorial, but I wanted to use it because I would if this was a real application.
    Message was edited by:
    user463505

  • Performance Problem with Master-Detail Views

    Hi,
    I have developed a JSP-Applikcation with the master-detail views.
    I would like to report a bad performance at fetching data records from the detail view, because all records
    from master view have firstly to be retrieved to locate right row (rangesize="-1"). The number of records in
    the master table ist 2500 and 7000 in detail table.
    ============= Code Snippets (See HOWTO:Navigate using Data Tags of J. Oropeza) =====
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" rangesize="-1">
    <jbo:RefreshDataSource datasource="dsMaster">
    <jbo:Row id="msRow" datasource="dsMaster" action="Find" rowkeyparam="RowkeyValue">
    <jbo:dataSource id="dsDetail" appid="testAppId viewobject="DetailView">
    ======================================================================
    When rangesize="20" sets, performance is good, but the right row location of master view ist not found if the row
    is not positoned in this range (No data from detail view object are displayed).
    How can I improve the performance?
    Many thanks for your help.
    regards,
    Yoo

    Sung:
    Thank you for your suggestion.
    According to your suggestion I have changed my BC4J/JSP-application. However, the performance ist still bad.Whenn I click on a row retrieved from the master view, it takes 15 seconds until the associated data in detail view will be displayed on the other window (The application has been deployed on the test system of ISP).
    In an other case with much less data (162 master and 228 detail rows), it takes only 2 seconds (The application
    goes with the local server and DB of our company).
    ======================== master.jsp =================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" >
    <a href="detail.jsp?RowKeyValue=<jbo:ShowValue datasource="dsMaster" dataitem="RowKey"/>">
    Here Click
    </a>
    ======================== detail.jsp ======================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView">
    <jbo:RefreshDataSource datasource="dsMaster">
    <jbo:Row id="msRow" datasource="dsMaster" action="Find" rowkeyparam="RowkeyValue">
    <jbo:dataSource id="dsDetail" appid="testAppId viewobject="DetailView">
    How do you think of this coding (My application is based on the document How to of J. Oropeza)?
    How can I increase the performance independently of the number of rows?
    Many thanks for your help.
    regards,
    Yoo

  • Problem with master/detail relationship

    Two tables :
    Master_table:
    Customer_no primary key
    Buyer_seller_type primary key
    Product_code primary key
    Detail_table
    Branch primary key
    Customer_no primary key
    I altered detail_table and added 2 more primary key fields:
    Buyer_seller_type primary key--
    Product_code primary key.
    Now I have to change the existing fmb according.
    I have maintained master/detail relationship for these 2 tables in the form.
    When I run this form and Try to save the date . I am getting error like
    Cannot insert null into buyer_seller_type field ie my new column.
    Insert into detail_table (branch,customer_type) values (:1,:2) ;
    I have maintained master/detail relationship. And what r the others properties I have to set to overcome this .
    my requirement is query should be like this:
    insert into detail_table (branch,customer_type,buyer_seller_type,product_code) values (:1,:2,:3,:4) ;
    how can i do this.
    I am using forms 6.
    plz its very urgent..plz help me.
    advance thanks

    Set following item property under Data node for both the new added column in detail table:
    Copy Value from Item:
    Enter <master_table_name.item_name>
    Regards,
    Hassan

  • Problems in Master-Detail forms when the detail contains LOVs

    I am having problems with master detail forms when the detail contains and lov.
    In my detail form I have a messageLovInput field that returns 2 values (code and description). When the lov window returns both values the messageLovInput disappear from the form.
    This problem happens only when I iterate in the master view and I try to add a record in the detail form.
    If I add a new record without navigation for the master view there is no problem.

    Jode,
    which technology are you using, ADF JClient ? If yes, please provide a step by step description of how to setup a testcase to reproduce the problem.
    Frank

  • Populate PK(DBSequence) in three related tables with master detail association

    Hi
    I use jdeveloper 11.1.1.6.0.
    My English isn't very good.
    I have 3 tables with master detail association between them and primary key from table A should populate to tables B and finally C .The primary key is a sequence from data base and I set PK attribute in table A as a DBSequence. (table C is the child of table B  and table B is the child of table A)
    My association is like this: A->B(BAFk1Assoc) and B ->C(CBFk1Assoc)  and also I select Composition Association for these two association. And I select ‘Cascade Update Key Attribute’
    When I insert row in these three related tables, a negative number create but when I COMMIT the PK populate only to table B not to table C and the exception below raises:
    Constraint "C_B_FK1" is violated during post operation "Insert"
    ORA-02291: integrity constraint (HR.C_B_FK1) violated - parent key not found.
    If I only work with tables A and B, there isn't any problem but if I add table C as the child of B, this exception raises.
    Habib

    The question is how you create the row for table C. Do you create it as child from table b (using the VO for B and using the link to C)?
    In this case the framework should populate the PK of the master row B as FK in table C.
    You may need to control the order in which the rows are posted to the DB to avoid this problem. Read Advanced Entity Object Techniques - 11g Release 1 (11.1.1.6.0) to get more info about this.
    However, sometimes it's easier to control the generation and setting if the PK attributes in the model layer, not relating on db triggers where you get the real values only after the commit operation is done in the db. For this you can use a Groovy expression so you have access to the PK of each new created row right after creation. Read Using Groovy Expression to set a Primary Key with a Sequence Number | JDev &amp;amp; ADF Goodies to find out how to do this.
    Timo

  • How to build a screen with master detail data

    Hi ,expert ,
    Someone can teach me how to build a screen with master detail table ?
    I wnat to build a screen for user to maintain FERT group  and  FERT detail list  in one screen .
    just like this ..
    MASTER Block
    FERT1      
    FERT2 
    FERT3
    DETAIL Block
    FERT1A1
    FERT1A2
    FERT1A3
    when I double click FERT1 in the Master Block the detail view will show FERT1A1  A2 A3
    Thanks for your help ....
    Moderator message : Not enough research before posting. Spec dumping not allowed. Thread locked.
    Edited by: Vinod Kumar on Jun 13, 2011 1:38 PM

    An inefficient way to create the array is to use the build array and a shift register as shown below. It's more effecient in terms of memory management to create the array and then use the replace array subset as shown in the other image. Of course, if you don't need the array inside the loop, just wire the value out of the while loop and on the exit tunnel, right click and select 'Enable Indexing'.
    Message Edited by Dennis Knutson on 07-03-2007 10:25 PM
    Message Edited by Dennis Knutson on 07-03-2007 10:26 PM
    Attachments:
    Crude Build Array.PNG ‏4 KB
    Better Build Array.PNG ‏6 KB

  • Problem with Dashboard Details Widget

    Hi!
    I'm using SCOM 2012R2 UR 4 running og SQL 2012R2 with 3 MS. I have problems with the Details widget on my Dashboards. The problem is that when I select an object, no data is showing up in the details widget - see picture.
    I've deleted the "Health Service State" folder on all MS's and restarted them. I've also started the console witn /clearcache without luck.
    In addition I've created an SQL maintenance plan running sp_updatestats every 30. minutes, but it
    still fails...
    What should I do?
    Best regards
    Rune Haugen

    Rune Haugen you are right.
    1) try to restart the opeations console with /clearcache
    2) try to import the following MP again an make sure that their version number is 7.1.10226.1046
     Microsoft.SystemCenter.Visualization.Library.mpb
     Microsoft.SystemCenter.Visualization.Component.Library.mpb
     Microsoft.SystemCenter.Advisor.mpb
     Microsoft.SystemCenter.Advisor.Internal.mpb
     Microsoft.SystemCenter.2007.mp
    Roger

  • Master/detail and problem with selected row when errors on detail row

    I'm using JDeveloper 10.1.3.3
    I have a very simple master/detail screen (JSF JSP) where master is departments and detail is employees in the selected department. Some of the attributes in employees are required.
    To department A
    I take away the value of one of the required attributes of one of the detail employee rows.
    Select one of the other departments ie department B
    Get Error message Value required.
    So far so good, but the selected department is B and the detail rows shown is for department A.
    I expected that department A to still be selected or that department B with its row to be shown.
    Edited by: user628847 on 26.feb.2009 04:55

    Hi,
    if (row != null)
    Row masterRow = row;
    vo.setCurrentRow(masterRow);
    // not needed : getMesReponsesPourTiersVO1().executeQuery();
    You shouldnot execute the child VO after setting current row in master VO.
    When the current row is set in master VO, then the child rows will get refreshed automatically.
    Cheers,
    Prasanna

  • Post query trigger problem in master detail oracle forms

    Hello experts,
                        I am new in oracle forms n using Fission middleware 10g with oracle forms 11g at windows 7 platform.
    I have made a master detail form using a tab canvas.There is a database column STUDENTID and it is in my student tab with a TBL_STUDENTENTRY data block.Now I Have an another tab named previous_education with TBL_STUDENT_PREVIOU_EDU datablock here there is also a database column STUDENTID and corresponding field in my  previous_education TAB under TBL_STUDENT_PREVIOU_EDU  datablock.Now i want to add a display item to show  student name corresponding to STUDENTID.For this I have tried to make a select query in TBL_STUDENT_PREVIOU_EDU data block POPST_QUERY TRIGGER.
    begin
    select STUDENTNAME into :TBL_STUDENT_PREVIOU_EDU.STD_NM   from TBL_STUDENTENTRY where STUDENTID=:TBL_STUDENTENTRY.STUDENTID;
    end;
    But, This trigger is not fired at runtime,Please suggest me what is going wrong and give me the solution.
    Thank You
    AADITYA.

    http://www.club-oracle.com/forums/post_query-problem-in-oracle-forms-t9751/#post23794 ,  This is the link at where  I have tried to show my problem with the help of an image,Please get the link:
    thanx
    regards Aaditya.

  • Procedure Based Form with master details Relationships

    Helo All
    Here i m having some problem in making one form which is having 2 tables one is master and other is detail table and i already made relationship between them but still i make both forms at that moment form didn't make the auto relationship.even after taht when at the form level i made the relationship between 2 tables it made but at teh compilation time it gives error.
    Actually one table was there at that time it worked but with relation it creates problem.
    Can anybody give me any idea how to sort out this problem.

    Helo Frankin
    Actualy the error came when i made the master detail relation manualy.but as per me if both tables have relationship with each other then no need to create it manualy isn't it?
    even after that i created teh relation manaualy but at the on clear block details trigger it showed compile time error.
    If possible can u give me any live example for this
    TQ
    Vivek

Maybe you are looking for