Oracle ADF - First record is shown on form no matter which record is edited

Hi,
I am using ADF application for development with J Developer version 11.1.1.4.0
in my project i am having screens(pages) which contain table with form and we are displaying data from that table
on form using partial Triggers. when i am going to edit records except fist record the record doesn't show on form
by default it is showing first record . it should display that particular selected records in in that form.
Plz suggest a solution for the same.
Thanks,
vinod

Hi
see the source code
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:PGN="/PaginationDefLib">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1"
title="#{finiqwebappuiBundle['TreasuryDepartmentSetup.scrTitle']}">
<af:form id="f1">
<af:pageTemplate viewId="/WEB-INF/templates/FinIqWebAppTemplate.jspx"
id="pt1">
<f:facet name="center">
<af:group id="g1">
<af:outputLabel id="ol1" styleClass="AFHeaderLevelOne"
value="#{finiqwebappuiBundle['TreasuryDepartmentSetup.scrTitle']}"/>
<af:panelGroupLayout id="pgl1">
<af:panelHeader text=" " id="ph1" styleClass="AFStretchWidth">
<af:messages id="m1" inline="true"/>
<af:outputText id="otDisplayMsg"
binding="#{TreasuryDepartmentSetupBean.otDisplayMsg}"
inlineStyle="color:Red;" visible="false"
partialTriggers="saveButton"/>
</af:panelHeader>
<af:panelGroupLayout id="pgl3" layout="vertical"
inlineStyle="width:570px; border-color:Silver; border-style:solid; border-width:thin;">
<af:panelGroupLayout id="pgl9" layout="vertical"
inlineStyle="border-style:none;"
partialTriggers="t1" halign="left">
<af:panelGroupLayout id="pgl5" layout="horizontal">
<af:panelFormLayout id="pfl2"
inlineStyle="width:280px; border-style:none;"
labelAlignment="start">
<af:selectOneChoice label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.entityName']}"
valueChangeListener="#{TreasuryDepartmentSetupBean.changeValue}"
binding="#{TreasuryDepartmentSetupBean.entityId}"
autoSubmit="true" id="soc1">
<af:forEach var="item"
items="#{sessionScope.FINIQGV.loginMappedEntities}">
<af:selectItem label="#{item.entityName}"
value="#{item.entityId}" id="sil1"/>
</af:forEach>
</af:selectOneChoice>
<af:inputText value="bindings.TBDBookId.inputValue"
label="Label 6" id="itBookId"
visible="false">
<f:validator binding="#{bindings.TBDBookId.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.BookName.inputValue}"
label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchName']}"
maximumLength="#{bindings.BookName.hints.precision}"
binding="#{TreasuryDepartmentSetupBean.itBookName}"
id="itBookName" autoSubmit="false"
disabled="true" required="true"
requiredMessageDetail="#{finiqwebappuiBundle['TreasuryDepartmentSetup.msgBookNameReq']}">
<f:validator binding="#{bindings.BookName.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.BookCode.inputValue}"
label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchCode']}"
maximumLength="#{bindings.BookCode.hints.precision}"
binding="#{TreasuryDepartmentSetupBean.itBranchCode}"
id="itBranchCode" disabled="true"
required="true"
requiredMessageDetail="#{finiqwebappuiBundle['TreasuryDepartmentSetup.msgBookCodeReq']}">
<f:validator binding="#{bindings.BookCode.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.TBDMisc1.inputValue}"
label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc1']}"
maximumLength="#{bindings.TBDMisc1.hints.precision}"
binding="#{TreasuryDepartmentSetupBean.itMisc1}"
id="itMisc1" disabled="true"/>
</af:panelFormLayout>
<af:spacer width="10" height="10" id="s1"/>
<af:panelFormLayout id="pfl3" labelAlignment="start"
inlineStyle="width:270px; border-style:none;">
<af:inputText value="#{bindings.TBDMisc2.inputValue}"
label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc2']}"
maximumLength="#{bindings.TBDMisc2.hints.precision}"
binding="#{TreasuryDepartmentSetupBean.itMisc2}"
id="itMisc2" disabled="true">
<f:validator binding="#{bindings.TBDMisc2.validator}"/>
</af:inputText>
<af:selectOneChoice label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.activation']}"
binding="#{TreasuryDepartmentSetupBean.socTBDDeactivate}"
id="socTBDDeactivate"
value="#{bindings.TBDDeactivate.inputValue}"
disabled="true">
<af:selectItem label="Yes" value="0" id="si1"/>
<af:selectItem label="No" value="1" id="si2"/>
</af:selectOneChoice>
<af:inputText value="#{bindings.TBDMisc3.inputValue}"
label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc3']}"
maximumLength="#{bindings.TBDMisc3.hints.precision}"
binding="#{TreasuryDepartmentSetupBean.itMisc3}"
id="itMisc3" disabled="true"/>
<af:inputText value="#{bindings.TBDMisc4.inputValue}"
label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc4']}"
maximumLength="#{bindings.TBDMisc4.hints.precision}"
binding="#{TreasuryDepartmentSetupBean.itMisc4}"
id="itMisc4" disabled="true"/>
<af:inputText value="#{bindings.TBDBookEntityId.inputValue}"
label="#{bindings.TBDBookEntityId.hints.label}"
id="TBDBookEntityId" visible="false"
binding="#{TreasuryDepartmentSetupBean.tbdBookEntityid}"/>
</af:panelFormLayout>
</af:panelGroupLayout>
<af:spacer width="10" height="10" id="s5"/>
<af:panelGroupLayout id="pgl4">
<af:spacer width="10" height="10" id="s4"/>
<af:commandButton id="addButton"
binding="#{TreasuryDepartmentSetupBean.addButton}"
action="#{TreasuryDepartmentSetupBean.newAction}"
text="#{finiqwebappuiBundle['Common.addButton']}"></af:commandButton>
<af:commandButton id="editButton"
action="#{TreasuryDepartmentSetupBean.editAction}"
binding="#{TreasuryDepartmentSetupBean.editButton}"
text="#{finiqwebappuiBundle['Common.editButton']}"></af:commandButton>
<af:commandButton text="#{finiqwebappuiBundle['Common.saveButton']}"
disabled="true" id="saveButton"
binding="#{TreasuryDepartmentSetupBean.saveButton}"
action="#{TreasuryDepartmentSetupBean.saveAction}"></af:commandButton>
<af:commandButton disabled="#{!bindings.Rollback.enabled}"
id="cancelButton"
binding="#{TreasuryDepartmentSetupBean.cancelButton}"
text="#{finiqwebappuiBundle['Common.cancelButton']}"
actionListener="#{bindings.Rollback.execute}"
immediate="true"
action="#{TreasuryDepartmentSetupBean.cancelAction}"></af:commandButton>
</af:panelGroupLayout>
</af:panelGroupLayout>
</af:panelGroupLayout>
<af:spacer width="10" height="10" id="s2"/>
<af:panelGroupLayout layout="vertical" id="pgl6">
<af:panelGroupLayout id="pgl2" layout="horizontal"
valign="bottom"
inlineStyle="width:230px;">
<af:quickQuery label=" " id="qryId1" searchDesc=" "
value="#{bindings.TreasuryDepartmentVO1Query.quickQueryDescriptor}"
model="#{bindings.TreasuryDepartmentVO1Query.queryModel}"
queryListener="#{bindings.TreasuryDepartmentVO1Query.processQuery}"
layout="vertical">
<f:facet name="end">
<af:group id="g3">
<af:commandLink text="Advanced" rendered="false"
id="cl1"/>
</af:group>
</f:facet>
</af:quickQuery>
<af:commandImageLink id="ex1" icon="/images/excel_j.jpeg"
shortDesc="#{finiqwebappuiBundle['Common.exportButton']}"
partialTriggers="qryId1 "
visible="#{bindings.TreasuryDepartmentVO1Iterator.estimatedRowCount ne '0' ? 'true':'false'}"
partialSubmit="true">
<af:exportCollectionActionListener exportedId="t1"
type="excelHTML"/>
</af:commandImageLink>
</af:panelGroupLayout>
<af:table columnStretching="last"
summary="Treasury Departments"
value="#{bindings.TreasuryDepartmentVO1.rangeSet}"
var="row"
rows="#{bindings.TreasuryDepartmentVO1.rangeSize}"
fetchSize="#{sessionScope.FINIQGV.displayRecordCount}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.TreasuryDepartmentVO1.collectionModel.selectedRow}"
selectionListener="#{backingBeanScope.PaginationDefBean.rowSelected}"
rowSelection="single"
partialTriggers="::soc1 ::qryId1 ::ex1 ::pd1"
binding="#{TreasuryDepartmentSetupBean.bookTable}"
id="t1" inlineStyle="height:220.0px;" width="881">
<f:attribute name="VOObject" value="TreasuryDepartmentVO1"/>
<af:column rowHeader="unstyled" sortProperty="BookCode"
sortable="true" align="left"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchCode']}(#{bindings.TreasuryDepartmentVO1.estimatedRowCount})"
id="c8">
<af:outputText value="#{row.BookCode}" id="ot10"/>
</af:column>
<af:column sortProperty="TBDBookId" sortable="true"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchId']}"
id="c2">
<af:outputText value="#{row.TBDBookId}" id="ot8"/>
</af:column>
<af:column sortProperty="BookName" sortable="true"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchName']}"
id="c3">
<af:outputText value="#{row.BookName}" id="ot1"/>
</af:column>
<af:column sortProperty="TBDMisc1" sortable="true"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc1']}"
id="c10" width="50">
<af:outputText value="#{row.TBDMisc1}" id="ot3"/>
</af:column>
<af:column sortProperty="TBDDeactivateForDisplay"
sortable="true"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.activation']}"
id="c9">
<af:outputText value="#{row.TBDDeactivateForDisplay}"
id="ot4"/>
</af:column>
<af:column sortProperty="TBDMisc2" sortable="true"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc2']}"
id="c7">
<af:outputText value="#{row.TBDMisc2}" id="ot11"/>
</af:column>
<af:column sortProperty="TBDMisc3" sortable="true"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc3']}"
id="c5">
<af:outputText value="#{row.TBDMisc3}" id="ot7"/>
</af:column>
<af:column sortProperty="TBDMisc4" sortable="true"
headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc4']}"
id="c4">
<af:outputText value="#{row.TBDMisc4}" id="ot5"/>
</af:column>
</af:table>
<af:panelGroupLayout id="dcpanel" layout="horizontal">
<af:panelGroupLayout id="paginationDC" layout="horizontal"
partialTriggers="qryId1 t1"
visible="#{bindings.TreasuryDepartmentVO1.estimatedRowCount > '10' ? 'true':'false'}">
<PGN:PaginationDef First="First" Last="Last"
Iterator="TreasuryDepartmentVO1Iterator"
VOObject="TreasuryDepartmentVO1"
NextSet="NextSet"
PreviousSet="PreviousSet" id="pd1"/>
</af:panelGroupLayout>
</af:panelGroupLayout>
</af:panelGroupLayout>
</af:panelGroupLayout>
</af:group>
</f:facet>
</af:pageTemplate>
</af:form>
</af:document>
</f:view>
</jsp:root>

Similar Messages

  • Quick answer needed----Does Oracle ADF Mobile support Canvas in HML5?

    I am interested in Oracle ADF Mobile and want to develop a native mobile product on ipad maybe other tablet devices with CAD functionality. But I can't find a way to create HTML5 with Canvas on it. I wonder if Oracle ADF Mobile can do it. If so, how?
    Thanks
    Ling
    Edited by: 973623 on Nov 28, 2012 8:51 AM

    Hi,
    ADF Mobile comes with a rich set of Data Visualization Components (charts/graphs/etc) that's based on HTML5 Canvas. You would not need to develop your own set of HTML5 components. This is applicable to the new on-device version of ADF Mobile. You would need to create an ADF Mobile app, and create your user interface using AMX components. The graphics component set is call DVT Mobile AMX.
    If you decide to create your own HTML5-based pages with HTML5 canvas-based graphics component, you can still host your own HTML5 page inside ADF Mobile. However, you would need to create your own HTML5 page.
    Thanks,
    Joe Huang

  • Master Details Entry Form in Oracle ADF

    Dear Sir,
    Please tell me how we create the Master Details Entry Form in Oracle ADF.
    Thanks in Advance
    Shiv Naresh Gupta

    hi Number(922941) :)
    welcome ,
    to this forums
    thing 1: change handle(name) as string as well as meaningful.
    first go through
    https://forums.oracle.com/forums/ann.jspa?annID=56
    Next look.
    http://www.youtube.com/watch?v=OCWMzfbd96E
    http://www.fireboxtraining.com/blog/2011/01/09/oracle-adf-11g-creating-master-detail-detail-tables/
    http://www.baigzeeshan.com/2010/03/creating-master-detail-form-in-adf.html

  • Oracle ADF -  popup table's record gets empty or blank after any db action.

    Hi,
    I am using Oracle jDev 11.1.1.4.0.
    In my application i have find button in my jspx.
    On click of find button i have shown popup with table.
    As user selects record from popup table that record get displayed in form fields of jspx
    and user can edit that record and save it in the database.
    Suppose I have edited a record and saved the same in database.
    Now, when I click on that find button, pop up opens but the record which I have just edited is not getting displayed correctly in the table.
    Some fields are getting emptied.
    I have set the property of entity object's attribute, refresh after update and insert.
    But still selected record get empty in popup table after database transaction.
    appreciate your help..
    thanks
    Rupashree
    Edited by: 888077 on Sep 28, 2011 5:54 AM

    By the sounds of it you are in the wrong forum :)
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Oracle adf - popup table's record get empty after any database tranasction.

    Hi,
    I am using Oracle jDev 11.1.1.4.0.
    In my application i have find button in my jspx.
    On click of find button i have shown popup with table.
    As user selects record from popup table that record get displayed in form fields of jspx
    and user can edit that record and save it in the database.
    Suppose I have edited a record and saved the same in database.
    Now, when I click on that find button, pop up opens but the record which I have just edited is not getting displayed correctly in the table.
    Some fields are getting emptied.
    I have set the property of entity object's attribute, refresh after update and insert.
    But still selected record get empty in popup table after database transaction.
    appreciate your help..
    thanks
    Rupa

    By the sounds of it you are in the wrong forum :)
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Oracle ADF 11g – Authentication using Custom ADF Login Form Problem

    Hi Guys,
    I am trying to Authenticate my adf application using custom Login Form.
    following this..
    http://www.fireboxtraining.com/blog/2012/02/09/oracle-adf-11g-authentication-using-custom-adf-login-form/#respond
    But my Login Page is not Loading.I think its sending request in chain.my jdev version is 11.1.1.5.Any Idea.
    Thanks,
    Raul

    Hi Frank,
    I deleted bounded code and In another Unit Test I created a simple login.jspx page and applied form based authentication but still facing same problem means something wrong in starting.
    My login.jspx page is
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" >
          <af:form id="f1" >
            <af:panelFormLayout id="pfl1">       
              <af:inputText label="USERNAME" id="it1"
                            />       
              <af:inputText label="PASSWORD" id="it2"
                              />
              <af:commandButton text="LOG IN" id="cb1" />
              <f:facet name="footer">       
              </f:facet>                 
            </af:panelFormLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>
    Don't know wht real problem is

  • Oracle Forms equivalent operations in Oracle ADF

    I need to know whether there are equivalent operations in ADF corresponding to these operations in Oracle Forms
    System.Current_block
    System.Current_record
    System.Current_form
    etc...

    As a mechanism to working out how ADF works, a suggested read is the Fusion Dev Guide: http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/toc.htm
    Once you've done this, as extension the dev guide has appendixes "F - ADF Equivalents of Common Oracle Forms Triggers" & "G Performing Common Oracle Forms Tasks in Oracle ADF" for assisting Forms programmers in moving to ADF, a feature/mind map as you will.
    However as Vinod says, don't make the mistake of thinking ADF is similar to Forms in its implementation. While Forms and ADF attempt to achieve similar results (ie. applications querying data from a db and showing to the user to view or edit), they do it in totally different technologies.
    CM.

  • Calling Forms developers - want to know more about Oracle ADF?

    I'm running a webinar for the ODTUG today 1st Nov on comparing whether development in Oracle ADF is simpler than Oracle Forms. This might be a useful insight to see how the tools compare and contrast.
    Details for the event on my blog
    https://blogs.oracle.com/grantronald/entry/is_oracle_adf_simpler_than
    regards
    Grant Ronald

    Hello!
    Here is a very good cookbook about new WebUI CRM 2007 WebClient Cookcook available!
    Best regards,
    Artur Litvinov.

  • Free Forms Modernization and Oracle ADF event running June 6th 2011

    Oracle partner iAdvise are running a full day workshop on Forms modernization and Oracle ADF in Belgium on the 6th June 2011. For those interested in JDeveloper and ADF, there is a full afternoon of ADF training, as well as a copy of the Quick Start Guide to Fusion Development JDeveloper and Oracle ADF.
    You can register here:https://www.iadvise-hosting.be/pls/apexsaas2/f?p=eev:104:4479387178760612%20
    So, if you have any investment in Oracle Forms and are looking at ADF, you need to attend!

    bump

  • How to Call Oracle Form From Oracle ADF

    Hi All,
    Version - Oracle Jdeveloper 11.1.1.5
    In Oracle Adf - when i click on Button how to call oracle form?
    Please help....
    Thanks..
    Sk

    And there is a tool called oraFormFaces that has some advanced linking api to access forms etc. Do a google search to find info on this.

  • Displaying a specific record in another .jspx form using ADF

    I have created a simple form (master/detail) which displays depts and emps working in the selected depts....(schema: SCOTT Dept - Emp).
    I want to create a command button in this form in which the record selected - via a radio button - it can pass its data to another .jspx file for modification.
    The problem is that only the first record of the view object is displayed only....in other words there is no synchronization...!!
    This view object has been defined as follows:
    select * from empTo accomplish the requirement....:
    In the first form
    I created a command button and an action listener(inside it) .
    In the SetActionListener properties , i've set:
       From:#{bindings.Empno.rowKeyStr}
       To    :#{requestScope.rowKeyStr}
    In the second form
    -I 've selected the "Insert inside bindings > action".
    -I 've expanded the DataControl of the window and select the view object of EmpAll - its sql query has been written above.
    -In the Action drop-down list, I've selected the setCurrentRowWithKey.
    -In the Parameters area, I've set the Value property to
    #{requestScope.requestRowKey}
    -I've added an executable binding afterwards , in the "Insert before... respective Iterator" .
    - In the Insert invokeAction dialog , i've set:
    ID to setRequestToView
            Binds to the setCurrentRowWithKey  (select form drop-down list)In the Advanced Properties tab , i've set:
    Refresh property to prepareModel
             RefreshCondition to #{adfFacesContext.postback == false}   <----(i've taken it from the tutorial...Is
    this correct in this situation...???)What may i have done wrong....?????
    Note: I use JDev 10.1.3.2...
    Thanks...
    Sim

    I have found the solution...
    The cause was that whereas i passed the value to the rowKeyStr property , i used the property #{requestScope.requestRowKey} instead of
    #{requestScope.requestRowKeyStr}....
    What is the difference between the two...(rowKeyStr , RowKey)???
    Thanks....
    Sim

  • View links in oracle ADF/query featching from Database

    Please any one help for this query
    I have two tables Emp, Dept
    I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
    Query is fetching like this
    Empno Ename job Salary Comm deptno deptno dname      Loc
    15 i1     support     50000     11     5     5     IT          sss
    15 i1     support     50000     11     3     3     Account     sss
    16 i2     support     8000     10     5     5     IT          sss
    16 i2     support     8000     10     3     3     Account     sss
    16 i2     support     8000     10     3     3     Software      sss
    16 i2     support     8000     10     4     4     Operation      sss
    Query is fetching 6 rows.
    but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
    Here is the example (My Requirement):
    This is first row:
    Empno Ename job Salary Comm
    15 i1     support 50000     11
    Deptno dname      Loc
    5     IT          sss
    3     Account     sss
    This is second row:
    Empno ename job Salary Comm
    16 i2     support     8000     10
    Deptno dname      Loc
    5     IT     sss
    3     Account     sss
    2     Software sss
    4     Operation sss
    i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
    plz any one can help
    thanks

    Please any one help for this query
    I have two tables Emp, Dept
    I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
    Query is fetching like this
    Empno Ename job Salary Comm deptno deptno dname      Loc
    15 i1     support     50000     11     5     5     IT          sss
    15 i1     support     50000     11     3     3     Account     sss
    16 i2     support     8000     10     5     5     IT          sss
    16 i2     support     8000     10     3     3     Account     sss
    16 i2     support     8000     10     3     3     Software      sss
    16 i2     support     8000     10     4     4     Operation      sss
    Query is fetching 6 rows.
    but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
    Here is the example (My Requirement):
    This is first row:
    Empno Ename job Salary Comm
    15 i1     support 50000     11
    Deptno dname      Loc
    5     IT          sss
    3     Account     sss
    This is second row:
    Empno ename job Salary Comm
    16 i2     support     8000     10
    Deptno dname      Loc
    5     IT     sss
    3     Account     sss
    2     Software sss
    4     Operation sss
    i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
    plz any one can help
    thanks

  • Generate Query in PLSQL to return Well Formed XML with Multiple records

    Hi there
    This is very urgent. I am trying to create a PLSQL query that should retrieve all records from oracle database table "tbl_Emp" in a well formed xml format. The format is given below
    *<Employees xmlns="http://App.Schemas.Employees" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *<Employee>*
    *<First_Name></First_Name>*
    *<Last_Name></Last_Name>*
    *</Employee>*
    *<Employee>*
    *<First_Name></First_Name>*
    *<Last_Name></Last_Name>*
    *</Employee>*
    *</Employees>*
    To retrieve data in above format, I have been trying to create a query for long time as below
    SELECT XMLElement("Employees",
    XMLAttributes('http://App.Schemas.Employees' AS "xmlns",
    *'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"),*
    XMLElement("Employee", XMLForest(First_Name, Last_Name)))
    AS "RESULT"
    FROM tbl_Emp;
    But it does not give me the required output. It creates <Employees> tag with each individual record which I don't need. I need <Employees> tag to be the root tag and <Employee> tag to repeat and wrap each individual record. Please help me in this as this is very urgent. Thanks.

    Hi,
    Please remember that nothing is "urgent" here, and repeating that it is will likely produce the opposite effect.
    If you need a quick answer, provide all necessary details in the first place :
    - db version
    - test case with sample data and DDL
    That being said, this one's easy, you have to aggregate using XMLAgg :
    SELECT XMLElement("Employees"
           , XMLAttributes(
               'http://App.Schemas.Employees' AS "xmlns"
             , 'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"
           , XMLAgg(
               XMLElement("Employee"
               , XMLForest(
                   e.first_name as "First_Name"
                 , e.last_name  as "Last_Name"
           ) AS "RESULT"
    FROM hr.employees e
    ;

  • Oracle ADF: Cannot Commit Database Transaction

    Hi All
    I am trying to update oracle database using Oracle ADF from command line. The following is my code snippet
      final String amName1 = "taxreturn.AM_Taxreturn";
      final String connStr = "jdbc:oracle:thin:o9ias/[email protected]:1521:t1fdbo";
      Hashtable env = new Hashtable(2);
      env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
      env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
      ApplicationModule appMod1 = null;
    try {
       javax.naming.Context ic = new InitialContext(env);
      ApplicationModuleHome home1 = (ApplicationModuleHome)ic.lookup(amName1);
      appMod1 = home1.create();
      appMod1.getTransaction().connect(connStr);
    } catch (Exception e) {
        e.printStackTrace();
      ViewObject t1xvVO = appMod1.createViewObject("t1xvVO", "taxreturn.T1XrefVView");
      t1xvVO.setWhereClause("T1X_T1FU_USERID='" + "testlin2" + "' and T1X_T1_TAXYEAR='" + "2012" + "' and T1X_DELETED is null and T1X_INVOICE_T1_150 is null");
      t1xvVO.executeQuery();
    Row rowT1xv = null;
    int count = 0;
    while (t1xvVO.hasNext()) {
    count++;
    rowT1xv = t1xvVO.next();
    System.out.println("Number of records: " + count);
    t1xvVO.executeQuery();
    if (t1xvVO.hasNext()) {
        rowT1xv = t1xvVO.last();
        System.out.println("First Name: " + rowT1xv.getAttribute("T1FirstName"));
        System.out.println("T1xInvoiceT1150: Before: " + rowT1xv.getAttribute("T1xInvoiceT1150"));
        rowT1xv.setAttribute("T1xInvoiceT1150", "250");
        //appMod1.getTransaction().postChanges();
        System.out.println("T1xInvoiceT1150: After: " + rowT1xv.getAttribute("T1xInvoiceT1150"));
    System.out.println("Is Dirty: " + t1xvVO.getApplicationModule().getTransaction().isDirty());
    try {
        appMod1.getTransaction().commit();
        System.out.println("Commit succeeded.");
    } catch (oracle.jbo.JboException e) {
        System.out.println("Commit failed. " + e);
    I can see there are total 3 records retrieved. Then I execute query for the view object again and change the last record. But after the commit statement, the database is not update. What's wrong here? Thanks in advance
    Leaf

    Refer 6.4.9 How to Create a New Row for a View Object Instance
    http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcqueryresults.htm#sm0094
    The procedure to create an ApplicationModule and find View object is different than in the code snippet. Use the procedure in the link.

  • Stretching problem in Oracle ADF..

    Hi All...
    Oracle ADF Inline Frame is not stretching properly. Any solution...
    The following code for your reference...
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelStretchLayout id="rengacont1" styleClass="AFStretchWidth"
    startWidth="0px" endWidth="0px" topHeight="0px"
    bottomHeight="0px" dimensionsFrom="children">
    <f:facet name="center">
    <af:panelSplitter orientation="horizontal" splitterPosition="400"
    id="jsffPanSpt"
    dimensionsFrom="children">
    <f:facet name="first">
    <af:panelStretchLayout id="psl0" startWidth="0px" endWidth="0px"
    topHeight="0px" bottomHeight="0px"
    styleClass="AFStretchWidth"
    dimensionsFrom="children">
    <f:facet name="center">
    <af:group id="rengasamygroup1">
    <af:chooseDate id="cd1"/>
    <af:chooseColor id="cc1"/>
    <af:image source="/Visit-Srirangam-Temple-in-Trichy.jpg"
    id="i1"/>
    </af:group>
    </f:facet>
    </af:panelStretchLayout>
    </f:facet>
    <f:facet name="second">
    <af:panelStretchLayout id="pgHelp" startWidth="0px" endWidth="0px"
    topHeight="0px" bottomHeight="0px"
    styleClass="AFStretchWidth">
    <f:facet name="center">
    <af:inlineFrame source="http://www.google.com" id="jsffILFrame"
    inlineStyle="border-color:Navy;border-width:thin;border-style:solid;"
    shortDesc="Help"/>
    </f:facet>
    </af:panelStretchLayout>
    </f:facet>
    </af:panelSplitter>
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Thanks & Regards,
    Vass Lee

    Hi Vass,
    please use the proper tags so that it will be easy to understand.
    thanks

Maybe you are looking for

  • I forgot the login password for my computer :S

    i have a brand new intel iMac, BRAND NEW... osx10.4.10, and i set up the password so my sister couldn't get into it, and kinda forgot it i dont have the original disks that came with the computer(moved) and cant find them, but would love to get into

  • Why is Illustrator CS4 so ******* sluggish in OSX?

    I always used Illustrator on Windows XP but have been forced to work on Illustrator on OSX (Imac dual core 3 Ghz with 4GB of ram OSX 10.5.8) at work for the last year. I like OSX but Illustrator performance is quite bad compared to what I'm used to o

  • Best Practice in Scenario

    I am currently trying to accomplish the following: get the Last Weekstamp for the last 6 Months, the following ilustrates how the end result might look like: Month   | Weekstamp | 2013-12|  2013-52    | 2014-01|  2014-05    | .... and so on I have a

  • File size in finder ' get info' does not refresh

    I'm moving files about and need to check how large the folders are (in preparation for burning a dvd). 'Get info' is not refreshing the file size (and it's not just enormous folders). I have installed 'Refresh Finder' but it doesn't make any differen

  • Captivate 6:  Issue with clickbox opening URLs

    I've finally made the leap for an actual client project to 6.0 (usually only do client work on 5.5) and am gutted to have run into quite a perplexing issue. It's a bog standard piece of work.  Simple conversion of a client storyboard (all their ID) i