Master-Detail-Detail JSP/BC4J Sync Problem
Hi everybody,
im having a strange problem with my MDD schema in my custom BC4J/jsp page,
I went through all other topics in the forum but couldnt find any analogue to my specific problem,
Lets call schema as M->D1->D2
What I need to do is to navigate my cursor on D1 using a rowkey, the problem is when i use <jbo:ROW ... action="find"> using the rowkey sent by DataEditComponent, it seeks the first row in my data source(in sync with Master) instead of seeking the actual row.
FYI, the problem disappears when I omit the master ViewObject (normal master detail using D1->D2)
Any comments appreciated (ofcourse ASAP ;))
Here is the original code:
<%@ page language="java" errorPage="errorpage.jsp" contentType="text/html;charset=utf-8" import = "oracle.jbo.html.*, oracle.jbo.JboException"%>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<jbo:ApplicationModule id="SalesModule" definition="SalesWeb.SalesModule" releasemode="Stateful" />
<jbo:DataSource id="dsContact" appid="SalesModule" viewobject="SContactView1" rangesize="10" itermode="LastPagePartial"/>
<jbo:DataSource id="dsOrder" appid="SalesModule" viewobject="SOrderView2" rangesize="10" itermode="LastPagePartial" />
<jbo:DataSource id="dsItemList" appid="SalesModule" viewobject="SOrderItemView3" rangesize="10" itermode="LastPagePartial"/>
<%
RequestParameters params = HtmlServices.getRequestParameters(pageContext);
boolean doRedirect=false;
String PageID=this.getClass().getName();
String sessJboRowkey=(String)session.getAttribute(PageID+"_jboRowKey");
String paramJboRowkey=(String)params.getParameter("jboRowKey");
if(sessJboRowkey!=null && paramJboRowkey==null && (params.getParameter("jboEvent")==null || params.getParameter("jboEvent").toString().compareToIgnoreCase("create")!=0))
paramJboRowkey=sessJboRowkey;
else
if(paramJboRowkey!=null)
session.setAttribute(PageID+"_jboRowKey",paramJboRowkey);
String masterRowKey=params.getParameter("masterRowKey");
if(masterRowKey!=null)
%>
<jbo:Row id="currRow" datasource="dsContact" action="find" rowkey="<%=masterRowKey%>" ></jbo:Row>
<%
%>
<jbo:OnEvent name="update" datasource="dsOrder" >
<jbo:Row id="myrow" datasource="dsOrder" rowkey="<%=paramJboRowkey%>" action="Update" />
<jbo:Commit appid="SalesModule" />
</jbo:OnEvent>
<jbo:OnEvent name="create">
<% if(paramJboRowkey!=null)
%>
<jbo:Row id="newrow" datasource="dsOrder" action="createinrange" ><%
try
{ %>
<jbo:SetAttribute dataitem="*" /><%
} catch (JboException ex)
newrow.remove();
throw ex;
} %>
</jbo:Row>
<jbo:Commit appid="SalesModule" />
<%
} //end if %>
</jbo:OnEvent>
<jbo:OnEvent name="delete">
<jbo:Row id="delrow" datasource="dsOrder" rowkey="<%=paramJboRowkey%>" action="Delete" />
<jbo:Commit appid="SalesModule" />
<%
doRedirect=true;
%>
</jbo:OnEvent>
<%
if(doRedirect)
%>
<jbo:ReleasePageResources />
<%
response.sendRedirect((String)params.getParameter("originURL"));
%>
<html>
<head>
<META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
<LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
<TITLE>Edit Order</TITLE>
</head>
<body>
<% if(paramJboRowkey==null)
%>
<h3>Edit Order</h3>
<jbo:DataEdit datasource="dsOrder" enctype="application/x-www-form-urlencoded" targetURL="SOrderView2_Edit.jsp"/>
Cancel
<%
else
%>
<h3>Order Details</h3>
<jbo:Row id="rowCur" datasource="dsOrder" rowkey="<%=paramJboRowkey%>" action="active">
<table class="clsViewCurrentRecord" cellspacing="2" cellpadding="3" border="0">
<jbo:AttributeIterate id="def" datasource="dsOrder">
<tr class="clsTableRow">
<td title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>"> <jbo:ShowHint hintname="LABEL">##Column</jbo:ShowHint> </td>
<td title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>"> <jbo:RenderValue datasource="dsOrder">##Cell</jbo:RenderValue> </td>
</tr>
</jbo:AttributeIterate>
</table>
</jbo:Row>
<%
%>
<br>
<% if(paramJboRowkey!=null)
%>
<center>
<h3>Order Items</h3>
<table border="0">
<tr>
<td ALIGN="right"><jbo:DataScroller datasource="dsItemList" /></td>
</tr>
<tr>
<td><jbo:DataTable datasource="dsItemList" edittarget="SOrderItemView3_Edit.jsp" /></td>
</tr>
</table>
</center>
<%
%>
<jbo:ReleasePageResources />
</body>
</html>
Hi,
you can use the column- or alias-name of the first query like:
<dataQuery>
<sqlStatement name="Q_MASTER">
<![CDATA[
select field1,field2 from master_table
where field3 = 'ABC'
]]>
</sqlStatement>
<sqlStatement name="Q_DETAIL">
<![CDATA[
select field4,field5 from detail_table
where field6 = :field2 (where field2 is a column of Q_Master)
]]>
</sqlStatement>
Pay attention that the column-names (aliases) are distinct
regards
Rainer
Similar Messages
-
Master-detail jsp for bc4j using JBO tags
I have created a master-detail jsp for bc4j using JBO tags. However, I can not get the correct result. There are some examples on OTN, but they are about jsp programs. How to define the relationship of the master view-object and the detail view-object?
Thanks for your help.I know you're having a problem upgrading, but...
Could you upgrade to 9.0.3 and tell us what problems you're encountering?
Thanks.
Sung -
Help needed to create a master-detail JSP page using OAF.
I like to create a master-detail JSP page using OAF. If any help or guide will be appreciate.
- KausikA Master Detail Page is a basically a game between two VOs(Master and Detail mostly connected through a View Link). You can also have a look at the View Link section in the Dev guide. Page Layouts is one thing which you can take a call yourself.
Regards
Sumit -
Urgent! Simple master detail jsp without ADF.
We need to develop a master detail page. personal and detail process record for that personal.
This will work on the web so We are using jsp technology.
(We are using tomcad so We can't use ADF because of deployment problem. maybe the fallowing phase ADF will be used.)
We can't find these kind of sample java and web. Especially data grid type interface on the web.
This is very important program and we need urgently finish.
Thanks for your help.You can use ADF with Tomcat, you just need to install the ADF runtime libraries on your tomcat.
There is a toole->install ADF Runtime option for this. -
Some dummies need help in master detail jsp page
We don't know how to use data control to generate a jsp master detail page in case of many-to-many relationships. We didn't find any info about this and our testcase never display the data of the last iterator.
We have
a collection that contains department object.
a collection that contains the relationship between department and employee (the many-to-many relationship)
an object that represent the employee
The structure is correct in the data control.
We are able the create our page for both first and second collection but it is not possible to display the detail of the corresponding employee in the detail table. When the table is generated from this level no data is displayed.
Is it somewhere described how to solve such problem ?
Does somebody know how to do ?Hm, your requirements sound like homework assignment from classroom. If so, is itn't better that you find the answer youself? There are plenty of very relevant references for how to use jsp to handle html forms or talk to a rdbms through a jdbc connection. For example, for jsp and html forms, you can google "jsp html forms"; for jsp and sql query, search for "jsp jdbc".
Tell me if this is not helpful. -
Hi -
How do I create a simple Master-Detail page in JSP like Oracle Forms type.
I want to show/enter one master record and multiple child records and let the users enter data. I DO NOT WANT TO CREATE SEPERATE MASTER AND SEPERATE DETAIL JSP PAGE. I want the basic Master-Detail Form like Oracle Forms.
I am using JDeveloper 3.2
Thanks for your help !
FahimIn our current release, we dont generate a single-page master-detail editing page. You would are missing an editable data-grid tag for this to be possible. You can create this control yourself using the provided datatags.
-
Master detail report/form FK problem
Anyone...anybody!!!
I'm using APEX 4.0.1... and Oracle 10g.
I have two tables that are linked with FK in the detail table
Master table
ID_ENDURGR NUMBER --PK populated with a trigger
KT_UMSAEKJANDI VARCHAR2(10 BYTE)
TIMABIL NUMBER
NUMER_UMSOKN NUMBER
HEILDARKOSTNADUR NUMBER
Detail table
ID_EIGENDUR NUMBER --PK populated with a trigger
KENNITALA VARCHAR2(10 BYTE)
EIGNARHLUTI NUMBER
KOSTNADUR_VINNA NUMBER
ENDURGR_ID_FK NUMBER -- FK on ID_ENDURGR in the master table
If I create a application with a master detail page using the wizard, pages with a report and a tabular form are created. This works fine and the FK field in the detail table is automatically populated with the PK from the master table.
If I create an application with a blank page an on that page create a region > form > master detail > same tables >use existing triggers > default > Edit detail on separate page ... three new pages are created: Report, master form and a detail form.
If I create a new detail record with this application the FK field is not automatically populated.
Why? What am I doing wrong?
The trigger on the detail table:
create or replace
TRIGGER "bi_RSK_541_EIGENDUR"
before insert on "RSK_1018_EIGENDUR"
for each row
begin
if :new."ID_EIGENDUR" is null then
select "RSK_541_EIGENDUR_SEQ".nextval into :new."ID_EIGENDUR" from dual;
end if;
end;
Do I need to add something here... or what?
Please help.
Edited by: 805740 on 2.12.2010 07:14Thanks for your reply. I have created my pages on apex.oracle.com
ws: RSK_APEX
user: demo
pwd: demo
There are two tabs. Different solutions on each one. -
How to hide a column in master-detail jsp
My jsp contail a master view and a detail view ,and have a link between two,i want hide the column in the detail view as it was shown in master view,How can i do?
Assuming you are using BC4J - double click on the view object to edit it. Go to the attributes section and shuttle the attribute you want to hide back to the left.
-
Master-detail problem in ADF JSP
Is there any way I can add a detail record in a master-detail JSP page without having to open a new page?ž
MilosHi Frank,
Thanks for your reply. In the application I used weblogic JDBC driver for Sybase when it was developed in 11.1.1.1.0 version.
The following are the extries in bc4j.xcfg file:
jbo.sql92.JdbcDriverClass="weblogic.jdbc.sybase.SybaseDriver"
jbo.TypeMapEntries="Java"
jbo.SQLBuilder="SQL92"
Now I have changed the JDBC to Sybase jConnect (jconn4.jar) and driver class is com.sybase.jdbc4.jdbc.SybXADataSource and other entries remains the same as it was before.
Thanks
Jalil -
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 -
Error handling in master detail form
Hi Guys,
Apex 4.2.1
I use the custum error handling of apex to customize the errror message.
I add a row in the detail form with a dupicate key which is handled by the error function
after submiiting the master record the error message is correct displayed but the row which generates the error is gone from the details.
How to keep the record in the details visible?
ThanksHello 942793 -- Do you have a name / nickname? -- We still don't know how to address you,
Say, could you tell us -- because sometimes different versions have different capabilities:
Full APEX version number,
Full database version number,
APEX web browser architecture (EPG, OHS, or APEX listener)
Browser(s) and version(s) used,
Operating System with version number and architecture (32/64 bit),
[If you mentioned these before we don't have access to that info in this thread.]
Also, are you using ARP (Automatic Row Processing) for this Master-Detail or have you programmed your own updates?
Did you use an APEX wizard to create the Master-Detail or have you written you own code for the Master-Detail?
To the problem: In short, APEX is ensuring update consistency by preventing an update of a record/row that has changed since the code retrieved it. So, one needs to figure out where/why it changed and what to do about it.
? Is this Master-Detail part of you application fairly simple? Could you put just that part out on apex.oracle.com for folks to look at? That can speed resolution of these, sometimes difficult, update problems.
Regards,
Howard -
ADF: Hide expendable icon in Master-Detail treetables
Hello,
We are using a treetable in order to display Master-detail data. The problem here is that not all the master (parents) rows have details (childs). In fact we do not want to display the expandable symbol for the master rows which do not have childs.
Since it is a treetable we use facets nodeStamp and pathStamp. However this facets as I understand do not accept the attribute rendered. We have already a EL expresion ready to be used on the rendered attribute, but we do not find the way to disable the icon.
<f:facet name="nodeStamp">
<af:column id="c15" width="12"/>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{row}" id="ot23"/>
</f:facet>We are using JDEV: 11.1.1.5.0
Any solution? Any recommendations?
Thanks a lot
Edited by: 914395 on 2012-nov-15 13:18
Edited by: 914395 on 2012-nov-15 13:32Thanks a lot codigoadf for your help.
The example that you send helped me to find out the solution to my problem. However this solution it seems to me just a work around, since we just put an image on the top of the icon instead to disable it or remove it.
Since I'm using tree table the code solution is a bit different than the described in the link example.
<f:facet name="nodeStamp">
<af:column width="12">
<af:group id="g1">
<af:image id="i1" source="/resources/images/whiteIcon.png"rendered="#{node.children == null}"
inlineStyle="position: absolute; margin-left:-17px; border: 2px solid white; width: 12px; height: 10px;"/>
</af:group>
</af:column>
</f:facet> -
Error in Master-Detail report form
Hi every one,
I am a beginner to Oracle APEX, i am learning from this "Building an Application using Oracle Application Express: Part 1" tutorial, i went through this, but i got error while in detail field, from tutorial, detail table shows, tasks table, but in my detail field it doesn't shows tasks table, Please help me........
Thankyou,
SureshHello 942793 -- Do you have a name / nickname? -- We still don't know how to address you,
Say, could you tell us -- because sometimes different versions have different capabilities:
Full APEX version number,
Full database version number,
APEX web browser architecture (EPG, OHS, or APEX listener)
Browser(s) and version(s) used,
Operating System with version number and architecture (32/64 bit),
[If you mentioned these before we don't have access to that info in this thread.]
Also, are you using ARP (Automatic Row Processing) for this Master-Detail or have you programmed your own updates?
Did you use an APEX wizard to create the Master-Detail or have you written you own code for the Master-Detail?
To the problem: In short, APEX is ensuring update consistency by preventing an update of a record/row that has changed since the code retrieved it. So, one needs to figure out where/why it changed and what to do about it.
? Is this Master-Detail part of you application fairly simple? Could you put just that part out on apex.oracle.com for folks to look at? That can speed resolution of these, sometimes difficult, update problems.
Regards,
Howard -
Hi all,
I am busy developing a small search application.
For this application I use a Oracle View. This Oracle View has no reference to a primary key. In BC4J I created a entity object and view out of this Oracle View and named one of the attributes as a primary key. I also added a entity object and view out of an oracle table.
I created a viewlink to display a master detail relationship. When I test the BC4J module I can see the master detail relationship, but when I want to create this master detail with the use of data tags (as the examples in How to Navigate Master and Detail JSP using data tags) I get the error RowkeyValue is Null.
If I am using the original table as a master which has a primary key everything works.
I know that Oracle also reference the Primary Key to a RowID.
Is there any solution to use an Oracle View without a reference to be used in a master- detail relationsship in JSP?
Thanks in advance
Email: [email protected]You might want to try generating a Complete master detail BC4J JSP application on your BC4J logic
which contains a view link.
Once the app is generated you'll see a working example of how to do a master detail BC4J JSP..
Basically the app will generate a JSP page for your viewlink..
Here's a real simple example of how to do a master detail BC4J JSPs where you pass the Rowkey as a parameter to a detail page which uses the JBO:Row tag to locate the Master dept record, which then drives
the detail record location..(since it is bound..)
This uses a default Emp and Dept tables. Also EmpView3 is a ViewObject which is bound via a link to
the master DeptView1 View Object.
Master.jsp
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>
Hello World
</title>
</head>
<body>
<h2>
The current time is:
</h2>
<p>
<%= new java.util.Date() %></p>
<jbo:ApplicationModule id="Mypackage1Module" definition="Project2.Mypackage1Module" releasemode="Stateless" />
<jbo:DataSource id="dept" appid="Mypackage1Module" viewobject="DeptView1" />
<table border="1">
<jbo:RowsetIterate datasource="dept" >
<tr>
<td><jbo:ShowValue datasource="dept" dataitem="Dname" ></jbo:ShowValue>
</td>
<td>">detail</a></td>
</tr>
</jbo:RowsetIterate>
</table>
</body>
</html>
<jbo:ReleasePageResources />
Detail.jsp
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>
Hello World
</title>
</head>
<body>
<h2>
The current time is:
</h2>
<p>
<%= new java.util.Date() %></p>
<jbo:ApplicationModule id="Mypackage1Module" definition="Project2.Mypackage1Module" releasemode="Stateful" />
<jbo:DataSource id="dept" appid="Mypackage1Module" viewobject="DeptView1" />
<jbo:DataSource id="emp" appid="Mypackage1Module" viewobject="EmpView3" />
<p>
Notice I bind this page to both master "DeptView1" and the linked detail "EmpView3"..
</p>
<jbo:Row id="deptrow" datasource="dept" action="find" rowkeyparam="deptrowkey" ></jbo:Row>
<jbo:ShowValue datasource="dept" dataitem="Dname" />
<br>
<table border="1">
<jbo:RowsetIterate datasource="emp" >
<tr>
<td><jbo:ShowValue datasource="emp" dataitem="Ename" />
</td>
<td><jbo:ShowValue datasource="emp" dataitem="Deptno" />
</td>
</tr>
</jbo:RowsetIterate>
</table>
</body>
</html>
<jbo:ReleasePageResources />
Hope this helps....
-Chris -
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
Maybe you are looking for
-
After ios 8 update ipad2 is asking for a passcode
Posting for my wife, since she's given up and gone to bed. Yes, I've read all the lovely information on what to do if you've forgotten your passcode. Here's the problem; she's never used one. Ever. She was working on her ipad earlier this evening
-
I can't install itunes on my windows 7 (32 bit)... it keeps saying R6034 error and 1114 error. Help! PS: I used to have an older version of itunes and it worked fine until I tried upgrading it, Now it's totally messed up!
-
Pinkish glow around mouse pointer on external screen.
Since the last update (10.9.1) my mid-2012 macbook air started showing a very peculiar behaviour. Only when connected to an external monitor and waking up from sleep, the mouse pointer on the external monitor comes with a pinkish glow. Very annoying.
-
Why don't my DRM policies seem to work? Using "License Server for Protected Streaming"
Do you find yourself setting rights/restrictions in a DRM policy (like disallow playback on Linux), only to see that the right/restriction isn't being enforced when you play your content? There may be several reason causing this to happen: 1. If you
-
Cataloging Multiple External Drives?
Hi everybody. I have nine external FW drives of various sizes littered with projects and files from years of work. Is there any simple way of maintaining on my boot drive a searchable catalog of what is on what drive? I dont want to have to constantl