Issue of ADF 12.1.3 [master / detail + Association + JSF]
Greetings, community!
There are 2 ViewObjects and ViewLink, based on EntityObjects and Association. They are master / detail 1-to-many.
All MasterEntityFields are generated automatically. AutoSubmit set to true in the two viewObjects.
In BCTester:
(1) create the master record.
(2) create the detail record.
(3) put data in the detail record.
(4) commit.
Everything works fine.
On the jsf page (datacontrols were generated by generation jDeveloper by default):
(1) master CreateInsert.
(2) retail CreateInsert.
(3) put data in the detail record.
4) commit - here's a mistake about database constraint violated, attempts to insert the details when there is no master.
Solution: In the form of master focus to any field, change the value. Press 'Validation' again, and it works fine.
So that trials of this question, I did everything that comes to mind, the value record everywhere and clearly given master, it creates, it is fine and it is valid.
This can be a JSF/bug problem when working with auto-generated documents?
Reading one size does not fit all: ADF BC: EO/VO State initial post create() explained and Andrejus Baranovskis Blog: difference between initialized and new Mode ADF BC
That should give you an explanation why this happens.
Timo
Tags: Java
Similar Questions
-
Hallo,
I have a page with 2 legs and they both contains an af:table created by dragging an instance of VO in the user interface.
The 1st tab uses a master VO while the 2nd uses a VO detail.
Between 2 your, there is not a link of VO master / detail.
Opening Details tab I update the secondary table by calling the method ExecuteWithParams of the detail VO instance (in a managed bean).
I would now like to generate a report that loop on the master table and that, for each line of master:
- He writes in the report;
- loops of registration of details (which are based on the master record) and also writes the report.
Could you kindly suggest me which is the best way to achieve that through a code to write in a managed bean?
Here I am interested how do to loop through the data, not in how to write the report.
Thank you
Federico
Yes it will affect the selected line. If you want to ignore try using this code
DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("DepartmentsView1Iterator"); ViewObject vo = iter.getViewObject(); for (int i = 0; i < vo.getEstimatedRowCount(); i++) { Row r = vo.getRowAtRangeIndex(i); System.out.println("DeptId= " + r.getAttribute("DepartmentId")); }
-
JDeveloper 10 g: ADF BC, how iterate master/detail vo programmatically?
Don't know what I'm doing wrong, but I am just trying to produce a single dimension table consisting of all objects in a master with detail Viewobject line.
Here is my code:
RowSetIterator masterVoIter = masterVo.createRowSetIterator (null);
While (masterVoIter.hasNext ()) {}
Line = masterVoIter.next ();
System.out.println ("Master name is:" + masterVo.getName () + "Estimated rowcount is:" + masterVo.getEstimatedRowCount () + "Key:" + row.getKey () m:System.NET.SocketAddress.ToString ());
Set of lines [] detailRowSets = masterVo.getDetailRowSets ();
for (int i = 0; i < detailRowSets.length; i ++) {}
Set of lines detailRowSet = detailRowSets;
System.out.println ("all lines of detail:" + detailRowSet.getName () + "estimates the number of rows:" + detailRowSet.getEstimatedRowCount ());
}
}
masterVoIter.closeRowSetIterator ();
}
The master course of the vo is correctly. However the detailRowSet.getEstimatedRowCount () still prints 0.
Looks like I'm something obvious missing here, what's the problem?Hello
public void printAll(){ this.getDepartmentsView1().executeQuery(); RowSet rw = this.getDepartmentsView1().getRowSet(); while (rw.hasNext()){ Row r = rw.next(); System.out.println("1. "+r.getAttribute("DepartmentName")); RowSet rw2 = ((RowSet)r.getAttribute("EmployeesView")).getRowSet(); while (rw2.hasNext()){ Row r2 = rw2.next(); System.out.println(" 2. "+r2.getAttribute("LastName")); } } }
AM works. Note that "EmployeesView" is the name of ViewLink for employee access services
Frank
-
PST: Master / detail graph
Hello
JDev Version: 11.1.1.5.0
I use ADF DVT histograms to view the details of the table master / detail. I found a useful example to: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/057-dvt-master-detail-172847.pdf by Frank. This example contains the master as a bar graph and clicking on a particular bar refreshes the detail with contents of corresponding detail table.
I would have a similar behavior, but the detail table should be another graph bar instead of a table. Can someone let me know or share some examples to show how to so that the relationship of the master / detail with two bar graphs?
Thanks in advance
RouhaudHello
creating a begavior of j - m is quite simple:
(1) slide the parent collection (for example ministries) as a bar to a page chart
(2) check the box set the pie that is selected as the current line
(3) drag and drop the dependent collection (e.g. employees) as another graph
(4) either set changeEventPolicy = ppr in the PageDef file for the iterator employee or
Set the property PartialTriggers to the widget detail to point to the parentFrank
-
ADF Faces 11, add where clause to the detail view in the master/detail relationship
Hello
I have two display objects only read connected by a link in a relationship master detail.
They are displayed in a treetable in the form.
I have a method on the java object impl view master class, I use to add custom where claused based on entries different user and then run the query.
Works well, master and detail is interview properly.
But I also want to further filter the detail view (view from destination in the display link). However, as soon as I add whereclause in the detail view against the master
relationship of detail seems to have disappeared and are no detail record. I also tried to add a view criteria but with the same result.
Your comments will be appreciated.
ADF FACES 11g release 1.
JanYou can get the ViewLinkAccessor, then the ViewObject and try to apply the ViewCriteria, followed by executeQuery... what you are already doing.
Better to paste your code here... -
ADF BC: master detail style detail according to master
Maybe the title isn't clear, but let me explain...
I have a master detail have the color of the text in detail in some columns depends on the data in the master.
So, for example, I have a column in my master.
When the value is set to 1, that I need to adjust the color of the text of a column in my Green retail, otherwise it should be red.
How can I do this better?
I use business components for my Masters details and the latest version of JDEV 11 gLucas Jellema describes a cell highlighted the technique in the following blog: http://technology.amis.nl/blog/4021/implementing-cell-highlighting-in-adf-11g-richtables
Assuming you have a binding attribute for the attribute View master object on the same page (that is, the main attribute you want to influence the color of the child attributes), you can simply refer to the value of masters in EL as #{bindings.masterViewAttributeName.inputValue == whatevervalue}
CM.
-
ADF:how update attribute of link seen in master-detail relationship.
Hi all
I use jdev 11.1.1.5.0 version.
I created a form master / detail using view link. My requirement is the Key attribute update sacrificed on Master table and same attribute on table automatically put details far because it fits on the link attribute.
but his past when I change attribute link view main table, detail line stop display table.
Thanks in advance
Manish
Your link on the association and for this assoc basic display, check the key attributes of the Cascade Update:
https://blogs.Oracle.com/raghuyadav/entry/adf_entities_association_-_Cas
-
issue of block master / detail
Hello
I have questions about the display of data in a block of master / detail. I've downloaded an image: [http://img13.imageshack.us/my.php?image=54741983.jpg]
I think it's clear
also, the first block and the PROFIL_ANSCOLAR are blocks of master / detail. Help me please if you can
Thank youNo, you do not have a loop, and you should not do.
The code with the slider that fills the: profil_anscolar.den_profil must be placed in the POST-QUERY-trigger of the retail block. The POST-QUERY-trigger fires once for each row in the PROFIL_ANSCOLAR block and therefore meets the den_profil for each record.
-
I have a master-detail table and I want to my table, when the page loads, all the nodes are expanded. How can I do this?
Sorry for my English and thanks.Hello
in a managed bean, create a JSf reference to the table. Then use
public void settable (table CoreTable) {}
RKS RowKeySet = new RowKeySet (true);
table.setDisclosureState (rks);
This.table = table;
}Frank
-
Scenario is,
I have a form master detail. using DBSequence on the two keys on the master and detail. But I am facing problem Parent key not found do not where to insert data. I think that Seqnce with master detail creating problem
J Dev Version: 11.1.2.0.0
Consult the:
http://Ahmed-alzamer.blogspot.com/2013/09/entities-Association-not-composition.html
Liu Wuhua technology and learning of Notes: insert master / detail in ADF BC
http://docs.Oracle.com/CD/E23943_01/Web.1111/b31974/bcadveo.htm#ADFFD1149
-
Create a form master detail.
Hello
I am creating a form master detail following this tutorial: Blog of Zeeshan Baig: master form design / detail in Oracle ADF
However, I'm stuck at this stage where I need to create a link to the view. I'm not able to add the departmentview departmentid. The Add button is not turning on.
Please refer to the screenshot below. Thank you.
You have chosen DepartmentsView in both places.
You must choose the DepartmentsView to the source and the EmployeesView in the destination.
See you soon
AJ
-
master/detail relationship through two workflow
Hello world
I use jdev 11.1.1.7.0.
In my application, I created a relationship master-detail between departments and employees (departments is master and employees is detail). Then, I created two stubborn workflow.
Department-stream with a department.jsff and I drag / drop the departmentVO as a form.
employee-stream with an employee.jsff, on this page I drag / drop employeeVO located under departmentVO in the control panel of data:
can I use these two TFs (Department-flow and employee-flow) through two different ways
1- I create a main.jspx page and I put two TFs as an area on main.jspx.
<af:form id="f1"> <af:region value="#{bindings.departmentflow1.regionModel}" id="r1"/> <af:region value="#{bindings.employeeflow1.regionModel}" id="r2" partialTriggers="::r1"/> </af:form>
in this case when I run the homepage, two TFs are in sync with each other, I mean when I navigate between departments in the workflow Department, employees in the employee flows are discount
and also if I enlist in the workflow Department then changes in the flow of employee will be validated.
2- in this case first I create a master stream with an master.jsff and then I put two TFs as an area on master.jsff.
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <af:region value="#{bindings.departmentflow1.regionModel}" id="r1"/> <af:region value="#{bindings.employeeflow1.regionModel}" id="r2" partialTriggers="::r1"/> </jsp:root>
and finally I put flow master as a region on the page main.jspx.
<af:form id="f1"> <af:region value="#{bindings.masterflow1.regionModel}" id="r1"/> </af:form>
in this case, when I run the main.jspx , always the two page two TFs are in sync with each other (updating of employees when I navigate between departments)
but in this case the validation in the workflow Department commit not changes in the flow of employee.
Anyone know how I can I have this (validation cause Department-stream flow used as case 1)?
Habib
Concerning
Habib,
I just did what you said.
1. Ran the mainWithMasterFlow.jspx,
2. the Department rendered initially has only one employee.
3. has changed the salary. (Kept the emphasis placed in the same field)
4 click "Commit".
Above scenario failed, because the change in value has not been submitted. Try adding autoSubmit = true for the salary field and then repeat the procedure, you will see the file be saved.
Rambeau
-
Master detail relationship with condition enforcement in the secondary table
Hello
I have two tables are Dept (Master), PMCs (Detail). I have to show emp details with somewhere condition.
Ex;
I have a "Dept_effect_date" field in the dept table. When I m showing PGE details in the Details view, it must the EMOS who are hired after the dept_effect_date.
Sainaba.
Hello
The request of the employees table looks very good. Although it seems more logical to get the service id of the employeesEO instead of DepratmentsEO.
The next step should be to create a viewLink between the DepartmentsVO and the EmployeesVO based on the service ID field.
Once you have done this, add the EmployeesVO as a DepartmentsVO child in yout request module (and it will appear as such in the DataControl), so use these your to create master/detail table.
Updating the data based on the selected master will be automatically managed by ADF.
Kind regards
Elias.
-
AM question of Passivation on the creation of master / details (composition)
Hi all
I recently discovered some problems at our request on the passivation of the AOS.
After reading some time on the web, I disabled the AM pooling on our application for testing on my built-in server that our request is 'activation-safe'
After that, I have the following error when I try to create a new line on a "actually dated VO:
java.lang.ArrayIndexOutOfBoundsException: 1
at oracle.jbo.server.ViewObjectImpl.bldEffectiveDateKeys(ViewObjectImpl.java:15914)
at oracle.jbo.server.ViewObjectImpl.bldKeysForMovingRows(ViewObjectImpl.java:15736)
at oracle.jbo.server.ViewObjectImpl.moveRows(ViewObjectImpl.java:16096)
at oracle.jbo.server.ViewObjectImpl.afterRowUpdate(ViewObjectImpl.java:14096)
at oracle.jbo.server.ViewObjectImpl.sourceChanged(ViewObjectImpl.java:14395)
at oracle.jbo.server.EntityCache.sendEvent(EntityCache.java:1557)
at oracle.jbo.server.EntityCache.deliverEntityEvent(EntityCache.java:1573)
at oracle.jbo.server.EntityCache.notifyColumnAndBlgChange(EntityCache.java:1629)
at oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:7668)
at oracle.jbo.server.EntityImpl.notifyAttributesChanged(EntityImpl.java:7649)
at oracle.jbo.server.EntityImpl.notifyAttributesAndBlgChanged(EntityImpl.java:7658)
at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:3828)
at oracle.jbo.server.EntityImpl.handleEffectiveDateRowCreate(EntityImpl.java:11669)
at oracle.jbo.server.EntityImpl.handleEffectiveDateOperations(EntityImpl.java:11585)
at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:2652)
at oracle.jbo.server.EntityImpl.validateChildren(EntityImpl.java:2364)
at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:2511)
at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:2666)
at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4577)
at oracle.adf.model.bc4j.DCJboDataControl.validate(DCJboDataControl.java:1620)
at oracle.adf.model.binding.DCBindingContainer.validateReferredDataControls(DCBindingContainer.java:4411)
at oracle.adf.model.binding.DCBindingContainer.validateInputValues(DCBindingContainer.java:4327)
at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4259)
at oracle.adf.controller.internal.binding.TaskFlowRegionController.validateRegion(TaskFlowRegionController.java:311)
at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4249)
at oracle.adf.controller.internal.binding.TaskFlowRegionController.validateRegion(TaskFlowRegionController.java:311)
at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4249)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:303)
at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:71)
to oracle.adf.controller.v2.lifecycle.Lifecycle$ 6.execute(Lifecycle.java:190)
at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
at $200 (ADFPhaseListener.java:34) oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access
to oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$ 3.after(ADFPhaseListener.java:428)
at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:88)
at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:520)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:44)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:74)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged (Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)If the AM pooling is enabled, no errors...
No idea what means this exception?
I use JDev 11.1.1.7, let me know if you need additional information on the VO, entity or something else...
Many thanks for the suggestions,
So what solved my problem was simply uncheck the "cascade update key attributes" relative to the association (composition). I still don't understand why that would be a problem to check if...
No restrictions on Association (composition) with the option "Cascade update key attributes" checked when passivation/activation takes place on a newly created on two line master-detail VO?
-
Master / details enable and disable
Hi all
I am developing web app using jdeveloper 11.1.2.0
On my page, I have a paintings of master / details
I want to disable a field in the secondary table when a particular value in a field (in the drop-down list) is selected in the main table
Thank youI did not understand you?
ADF is smart enough to recognize the line currently selected in the master.
Maybe you are looking for
-
When you try to read the emails on Firefox I try to scroll down and the spinning wheel of color appears and runs several seconds up to a minute before allowing me to move forward. This happens again and again. Very frustrating! What can I do to re
-
Why can't select, copy and paste dictionary definitions on my iPhone?
Steps to produce this problem: Get into a philosophical debate with a friend about iOS Messages. Realize that your friend does not understand one of the words that you just used. Type the word in the text field and press it to look up the definition.
-
How to get rid of a popup "to accept incoming network connections.
Since the upgrade to El Capitan, I get a popup message asking "do you want the"?. " App"to accept incoming network connections? a yellow container triangle one exclamation point. It is to appear with multiple applications. I have searched through al
-
Hello Product name: g6-2202tx Pavilion Product number: C0P15PA OS: windows 10 (64-bit) Location: Mumbai, India. I want to update my laptop ram and replace his keyboard. Laptop comes with 4 GB of ram which has 800 MHz frequency (you can pl confirm tha
-
With the help of the previous line in a formula calculator
Hello. I use the calculator to create a new string that is a custom filtered version of an existing channel. Unfortunately, I was not able to identify the entrance of previous line in the channel. To make things easier, let's say my filter is a si