ADF Code Corner: How-to edit an ADF form with data ... - Oracle
Recommend Documents
Dec 1, 2010 - http://www.oracle.com/technetwork/developer-tools/adf/learnmore/ ... http://www.mhprofessional.com/product
Jan 12, 2012 - Oracle ADF Code Corner is a loose blog-style series of how-to documents that provide solutions to real wo
Sep 30, 2012 - ADFcg - Stands for âApplication Development Framework Code ..... not access application modules as this
Feb 8, 2011 ... like Java Applets and jQuery. This article explains how to establish bi-directional
communication between a Java. Applet and an ADF Faces ...
Jun 30, 2011 - How-to change the WS connection for a WS DC. Using the Web Service Data Control (WS DC) to access a remot
Mar 18, 2013 - Oracle ADF Code Corner is a loose blog-style series of how-to .... http://www.oracle.com/technetwork/deve
Oct 30, 2010 - and adoption of the Oracle Application Development. Framework .... 17. Why? ADF BC bound table references
Mar 30, 2012 - command button then no JavaScript would be needed at all and JavaScript rule #1 would apply. On the serve
Jun 30, 2011 - The Oracle JDeveloper forum is in the Top 5 of the most ..... Page 10 ..... JDeveloper 11g and for web designers that are tasked with building a ...
Feb 29, 2012 - and adoption of the Oracle Application Development. Framework .... ADF skinning applies style sheet defin
Oct 30, 2010 - How-to add ADF binding based auto suggest behavior . ..... Option 1 â Delete the table row from Java an
Jan 26, 2012 - value options for the outcome element are printable and email. As the value of the outcome ... return "&l
Apr 30, 2012 - and adoption of the Oracle Application Development. Framework ... Which option to choose for accessing We
Aug 30, 2011 - individuals in the community, their company background, ..... known as search engine optimization (SEO),
correction to the McGraw Hill "Oracle Developer Guide" by Frank Nimphius and Lynn .... http://www.mhprofessional.com/pro
Apr 30, 2012 - The user data map can be accessed from Java for read and write by ..... You can now drag the method from
Mar 30, 2012 - limitation in that they cannot be embedded as a region on a page but require the ... If the related Optim
Dec 4, 2012 - Abstract: The two use cases for the af:popup are to show content for edit or for ... upon opening (Content
Mar 4, 2013 - HTML and JavaScript, which means that what you see on your mobile ... when property changes check box (sho
Aug 30, 2011 - New OTN Harvest Feature: OTN Harvest Spotlight. The ADF community is growing at an exponential rate. New
May 30, 2012 - in the WLS integrated LDAP server. ... http://www.oracle.com/technetwork/developer-tools/jdev/ ... simpli
Feb 29, 2012 - and adoption of the Oracle Application Development. Framework .... ADF skinning applies style sheet defin
Aug 30, 2011 - No support can be given through Oracle customer support. Please post questions or report problems related
Jun 21, 2010 ... a simple example application that contains the code sources listed in the
document. The application base use case is a seeded customization ...
ADF Code Corner: How-to edit an ADF form with data ... - Oracle
Aug 22, 2012 - In a previous article, "How-to drag-and-drop data from an af:table to ... drag and drop to other layout c
ADF Code Corner 103. How-to edit an ADF form with > The ){ ((RichInputText)uiComp).resetValue(); ((RichInputText)uiComp).setValue( departmentDropRow.getAttribute("DepartmentId")); } else if(uiComp.getId()=="it2"){ //save component handle for later (see below) managerId = uiComp; } } //access current binding container BindingContext bctx = BindingContext.getCurrent(); BindingContainer bindings = bctx.getCurrentBindingsEntry(); //get current employee row DCIteratorBinding employeeIterator = (DCIteratorBinding) bindings.get("EmployeesView1Iterator"); Row currentEmployee = employeeIterator.getCurrentRow(); //managers should not manage themselves oracle.jbo.domain.Number employeeId = (oracle.jbo.domain.Number) currentEmployee.getAttribute("EmployeeId"); oracle.jbo.domain.Number deptManagerId = (oracle.jbo.domain.Number)departmentDropRow. getAttribute("ManagerId");
8
How-to edit an ADF form with data dragged from an ADF ADF CODE CORNER Faces table if(employeeId == null || (employeeId.intValue() != deptManagerId.intValue())){ ((RichInputText)managerId).resetValue(); ((RichInputText)managerId).setValue( departmentDropRow.getAttribute("ManagerId")); } } //at the end of the drag and drop operation, the drop target, //the panelFormLayout in this case, is refreshed. If the form //you edit with drag and drop contains required fields, then //these would be flagged as an error. //To avoid this in this sample, JavaScript is used to clear //all error messages on the client that occur in response to //the drag and drop operation FacesContext fctx = FacesContext.getCurrentInstance(); ExtendedRenderKitService erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class); erks.addScript(fctx,"AdfPage.PAGE.clearAllMessages();"); //success ! So acknowledge the COPY for the drop target //to refresh return DnDAction.COPY; } //no drag and drop happened return DnDAction.NONE; } }
The code lines highlighted in bold and red are those you want to pay attention to. This is the trick that allows drag and drop to happen of form fields that – after the drop operation – have required fields with no value entry. This is to avoid required field values to show.
Summary and Download This article explained how to implement drag and drop between an ADF Faces table and an input form. The sample code is for JDeveloper 11g R1 (11.1.1.6) but also works with newer releases of Oracle JDeveloper. To run the sample, configure the database connection of the application to access the HR schema in a local Oracle database installation. The workspace for this sample can be downloaded as sample #103 from the ADF Code Corner website http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
9
How-to edit an ADF form with data dragged from an ADF ADF CODE CORNER Faces table
RELATED DOCOMENTATION
"How-to drag-and-drop data from an af:table to af:tree" http://www.oracle.com/technetwork/developer-tools/adf/learnmore/101-drag-drop-table-tree1661895.pdf