Setting Two Row Tags issue using DBMS_XMLGEN.setrowtag ?

Hi All,
     Am generating a xml using DBMS_XMLGEN.
     I want to generate a XML in the following format
     <MAIN>
     <PACK = 1>
     <EMP DETAILS>
          Some data goes here     
     <EMP DETAILS>     
<PACK = 2>
     <EMP DETAILS>
               Some data goes here
     <EMP DETAILS>     
               Some data goes here
     <EMP DETAILS>
               Some data goes here
<PACK = 3>
     <EMP DETAILS>
               Some data goes here
     <EMP DETAILS>     
               Some data goes here               
     <EMP DETAILS>
     <MAIN>
     Am able to set the only the following
     DBMS_XMLGEN.setrowsettag('xmlhandle','MAIN');
     DBMS_XMLGEN.setrowtag('xmlhandle','EMP DETAILS');
     But the problem is setting another row tag <PACK>
     Is it possible to set another rowtag ?
     Please any inputs on this will be really helpful?

I don't think you can set two different row tags in dbms_xmlgen. I'm also not sure about the "= 1", "= 2", etc. strings in your PACK tags. Perhaps I'm missing something but that doesn't look like legal XML.
Here's an approach that may help anyway though ...
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
set echo on
set long 10000
set longchunksize 10000
set pagesize 100
create or replace type emp_details as object
( empno integer, ename varchar2(10) )
Type created.
create or replace function getxmldata return clob
is
  mysql dbms_xmlgen.ctxHandle ;
  v_result clob ;
begin
  mysql :=
    dbms_xmlgen.newContext
      'select emp_details( empno, ename ) as emp_details
      from emp where deptno = 10'
  dbms_xmlgen.setrowsettag(mysql,'MAIN');
  dbms_xmlgen.setrowtag(mysql,'PACK');
  v_result := dbms_xmlgen.getXML(mysql) ;
  dbms_xmlgen.closeContext( mysql );
  return( v_result );
end;
Function created.
show errors
No errors.
select getxmldata from dual ;
GETXMLDATA
<?xml version="1.0"?>
<MAIN>
<PACK>
  <EMP_DETAILS>
   <EMPNO>7782</EMPNO>
   <ENAME>CLARK</ENAME>
  </EMP_DETAILS>
</PACK>
<PACK>
  <EMP_DETAILS>
   <EMPNO>7839</EMPNO>
   <ENAME>KING</ENAME>
  </EMP_DETAILS>
</PACK>
<PACK>
  <EMP_DETAILS>
   <EMPNO>7934</EMPNO>
   <ENAME>MILLER</ENAME>
  </EMP_DETAILS>
</PACK>
</MAIN>
1 row selected.
drop function getxmldata ;
Function dropped.
drop type emp_details ;
Type dropped.--
Joe Fuda
SQL Snippets

Similar Messages

  • How to set the rows of dataTable using loadBundle tag?

    Hi,
    Can i set the rows property of a <h:dataTable> using the value from a <f:loadBundle> tag?
    I tried the following code
    <f:loadBundle basename="com.message.NumberOfRows" var="numRows"/>
    I have NumberOfRows.properties file with the following entry
    rows=5
    The dataTable code
    <h:dataTable value="#{mastData.list}" rows="#{numRows.rows}" align="center" var="mastBean">
    </h:dataTable>
    This code is generating ClassCast Exception.
    Please comment on this issue.
    Thanks,
    Renju

    Hi,
    Exactly Reymond, See Renju you already using mastData bean for datatable. In that create a bean method something like rows & create a getter/setter method returning int. In getter method try this code as
    ResourceBundle bundle = ResourceBundle.getBundle("ur resource bundle");
    rows = Integer.parseInt(bundle.getString("rows_to_display"));
    return rows.
    Hope you can now get some clear idea i guess
    Regards,
    A.

  • XML File Generation Issues using DBMS_XMLGEN

    Hi,
    I am using DBMS_XMLGEN package in a stored procedure to generate an XML file on Oracle 10 G R2 .But, the problem is the format in which the file is generated.
    CREATE OR REPLACE TYPE "state_info" as object (
    "@product_type" Number
    CREATE OR REPLACE TYPE prod_tab as TABLE OF "state_info";
    CREATE OR REPLACE TYPE state_t as object (
    "state_code" CHAR(2),
    "state_info" prod_tab
    CREATE OR REPLACE PROCEDURE get_xml_serviced_state (p_clob OUT clob)
    IS
    v_xmlctx DBMS_XMLGEN.ctxhandle;
    v_str VARCHAR2 (1000);
    BEGIN
    v_str := 'SELECT state_t(a.st_cd,CAST(MULTISET(select veh_type_id from svcd_st where st_cd =a.st_cd)as prod_tab)) as "state_info"
    from svcd_st a where a.st_cd in (select distinct st_cd from svcd_st) group by a.st_cd having count(*)>=1';
    v_xmlctx := DBMS_XMLGEN.newcontext (v_str);
    DBMS_XMLGEN.setrowsettag (v_xmlctx,'serviced_state');
    DBMS_XMLGEN.setrowtag (v_xmlctx,NULL);
    p_clob := DBMS_XMLGEN.getxml (v_xmlctx);
    printclobout(p_clob);
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHEN OTHERS
    THEN
    RAISE;
    END;
    SHOW ERRORS
    Output :
    <serviced_state>
    <state_info state_code="VA">
    <state_info>
    <state_info product_type="2"/>
    <state_info product_type="5"/>
    <state_info product_type="9"/>
    </state_info>
    </state_info>
    <state_info state_code="AB">
    <state_info>
    <state_info product_type="2"/>
    <state_info product_type="5"/>
    <state_info product_type="9"/>
    </state_info>
    </state_info>
    </serviced_state>
    Required it in below format:
    <serviced_state>
    <state_info state_code="VA">
    <state_info product_type="2"/>
    <state_info product_type="5"/>
    <state_info product_type="9"/>
    </state_info>
    <state_info state_code="AB">
    <state_info product_type="2"/>
    <state_info product_type="5"/>
    <state_info product_type="9"/>
    </state_info>
    </serviced_state>
    I just need to put in all the rows under one single tag.Appreciate your early responses.
    Thanks.

    Your wanted XML output is NOT VALID...(try it yourself on http://tools.decisionsoft.com/schemaValidate/)

  • How to filter particular xml tag value using -DBMS_XMLGEN / DBMS_XMLSTORE

    Hi,
    I am using dbms_xmlgen and dbms_xmlstore package to extract xml datafile tag value from file server to oracle database table.
    I have used the below pl/sql program to extract the xml tag values to oracle relational table.Its working fine for me.
    But I would like to extract the values based on particular filter condition.
    The following xml program I have 3 rows I would like extract the xml data based on the following condition .
    Filter condition
    ==============
    the tag <STATE_ABBREVIATION> value shuold be 'CA' and the <CITY> tag value should be Palo_Alto then I will store the ZIPCODE
    ZIP_CODE_EXTN,STATE_ABBREVIATION tag values in the Oracle Relational table.
    The below pl/sql program storing all the three rows but I required the values based on the filter condition that I mentioned earlier.
    Kindly assist me what are the steps that I need to change in this program.?
    XML Program file content.
    ======================
    <ZIPCODES>
    <mappings>
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    <CITY>Palo_Alto</CITY>
    </mappings>
    <mappings>
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>95302</ZIPCODE>
    <ZIP_CODE_EXTN>9279</ZIP_CODE_EXTN>
    <CITY>LA</CITY>
    </mappings>
    <mappings>
    <STATE_ABBREVIATION>TX</STATE_ABBREVIATION>
    <ZIPCODE>75038</ZIPCODE>
    <ZIP_CODE_EXTN>7837</ZIP_CODE_EXTN>
    <CITY>DALLAS</CITY>
    </mappings>
    </ZIPCODES>
    PL/SQL Program for XML extract.
    ==========
    declare
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp number;
    insCtx DBMS_XMLStore.ctxType;
    ctx dbms_xmlgen.ctxHandle;
    v_FileHandle UTL_FILE.FILE_TYPE;
    begin
    v_FileHandle := utl_file.fopen('XMLTEST','XML_NEW_CITIES.XML','r') ;
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    insCtx := DBMS_XMLStore.newContext('SYS.ZIPCODES');
    dbms_xmlgen.setRowsetTag(insCtx,'ZIPCODES');
    dbms_xmlgen.setRowsetTag(insCtx,'mappings');
    DBMS_XMLStore.clearUpdateColumnList(insCtx);
    DBMS_XMLStore.setUpdateColumn(insCtx,'ZIPCODE');
    DBMS_XMLStore.setUpdateColumn(insCtx,'ZIP_CODE_EXT N');
    DBMS_XMLStore.setUpdateColumn(insCtx,'STATE_ABBREV IATION');
    rowsp := dbms_xmlstore.insertXML(insCtx,finalstr);
    end;
    Thanks,
    nat

    Thanks for your reply. :)
    Its working fine in the DBMS_XMLSTORE package. Here I have given the code
    CREATE OR REPLACE TYPE typ_dummy AS  OBJECT
    ( "@ENO"   NUMBER,
      "@ENAME" VARCHAR2(100),
      eno      NUMBER,
      ename    VARCHAR2(100));
    CREATE TABLE EMP
      empno    VARCHAR2(25),
      sal      NUMBER,
      hiredate DATE,
      typ      TYP_DUMMY
    DECLARE
      insCtx DBMS_XMLStore.ctxType;
      rows NUMBER;
      xmldoc CLOB :=
        '<ROWSET>
           <ROW num="1">
             <SAL>1800</SAL>
             <EMPNO>739</EMPNO>
             <HIREDATE>27-AUG-1996</HIREDATE>
               <TYP ENO="739" ENAME="Nazurullah">
               <ENO> 1 </ENO>
               <ENAME> ALDRIN </ENAME>
               </TYP>
           </ROW>
           <ROW>
             <SAL>18000</SAL>
             <EMPNO>7369</EMPNO>
             <HIREDATE>27-AUG-1996</HIREDATE>
             <TYP ENO="7369" ENAME="PEPPIN" />
           </ROW>
           <ROW>
             <SAL>37000</SAL>
             <EMPNO>20701</EMPNO>
             <HIREDATE>27-AUG-1996</HIREDATE>
             <TYP>
               <ENO> 20701 </ENO>
               <ENAME> VENKATACHALAM </ENAME>
             </TYP>
           </ROW>
         </ROWSET>';
    BEGIN
      insCtx := DBMS_XMLStore.newContext('emp'); -- get saved context
      -- Now insert the doc.
      -- This will only insert into EMPNO, SAL and HIREDATE columns
      rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
      -- Close the context
      DBMS_XMLStore.closeContext(insCtx);
    END;
    SELECT * FROM emp;
    EMPNO        SAL HIREDATE          TYP(@ENO, @ENAME, ENO, ENAME)
    739         1800 27-AUG-96     TYP_DUMMY(739, 'Nazurullah', 1, ' ALDRIN ')
    7369       18000 27-AUG-96     TYP_DUMMY(7369, 'PEPPIN', NULL, NULL)
    20701      37000 27-AUG-96     TYP_DUMMY(NULL, NULL, 20701, ' VENKATACHALAM ')

  • How to get two rows of data using GUI_DOWNLOAD

    Hi i am using GUI_DOWNLOAD i am downloading data into excel succesfully.....
    i am getting data as
    Pernr Fname Lname
    1000  F1000 L1000
    2000  F2000 L2000
    requirement
    is to add one more field  on the top of text as what is the run date .
    is it possible using GUI_DOWNLOAD? or need to use oops/OLE only one ?
    RUNDATE: 15/05/2009
    Pernr Fname Lname
    1000  F1000 L1000
    2000  F2000 L2000
    Regards
    sas

    Hi,
    check the below code, it's working as per your requirement. For the second call of FM  use
    append                = 'X'.
    DATA: it_date TYPE TABLE OF char30, "For downloading Rundate
            wa_date LIKE LINE OF it_date.
      CONCATENATE 'Rundate: ' sy-datum+6(2) '.' sy-datum+4(2) '.'
                  sy-datum+0(4) INTO wa_date.
      APPEND wa_date TO it_date.
    "Download the Rundate first
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename              = 'D:\1.xls'
          filetype              = 'DAT'
          write_field_separator = 'X'
        TABLES
          data_tab              = it_date.
    "Now download your data tab with header with the append parameter as X
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename              = 'D:\1.xls'
          filetype              = 'DAT'
          append                = 'X'
          write_field_separator = 'X'
        TABLES
          data_tab              = it_tab
          fieldnames            = it_header.
    Hope this helps you.
    Regards,
    Manoj Kumar P
    Edited by: Manoj Kumar on May 15, 2009 8:46 AM

  • How to use two group tags in the header?

    I am using BI Publishing,RTF Template,I found when I put two group tags before <?start:body?> ,the BI Publishing only keep the 2nd group tag right before <?start:body?> as header, it moved the 1st group tag to the body section.
    Is this a bug? Can anyone give me some ideas how to make BI Publish treat all the group tags before <?start:body?> as the header/sub header?
    thanks for your help

    Hi dirk,
    Thanks it worked well.
    I have one question for you in the tabular form.
    i have totally 10 columns in my tabular form, in that 9 column is of database column and only one column is non-database column, while updating the row in the tabular form it is throwing the below error like
    Current version of data in database has changed since user initiated update process. current row version identifier = "A0FD649E5A28DF9244990A3B9368298A" application row version identifier = "44CE02A233595BCA6F7D4A140BD4DF30" (Row 1)I thought the above error is due to the existence of non-database column in my tabular form. Is there any way to solve this issue. I need to have a non-database column in my tabular form but the presence of that column is not allowing to perform update in that tabular form.
    how to get rid of this issue dirk.
    Any ideas??
    Brgds,
    Mini

  • How to change the default element tag using dbms_xmlgen

    here is my code that generate output for purchase order data. I followed the syntax shown in xml db developer guide.
    I am getting the results but element tags are CAPS letters( As the coloumn names in the type defenitions are stored in CAPS in Oracle). but I need to show in small letters as per my requirement.
    can anyone help me how to change the default tag names for elements.
    ==================================HERE IS THE CODE==================
    DECLARE
    qryCtx DBMS_XMLGEN.ctxHandle;
    result CLOB;
    BEGIN
    qryCtx := DBMS_XMLGEN.newContext
    ('SELECT PODL_H_T
    ( CLOSEDDATETIME ,
    COMPANY ,
    CAST(MULTISET
    (SELECT LINENUMBER ,
    COMPANY ,
    PURCHASEORDERID ,
    ITEM ,
    QUANTITYUM ,
    TOTALQUANTITY
    FROM cpo_wms_podl_LINES
    WHERE PURCHASEORDERID = PH.PURCHASEORDERID) as PurchaseOrderDetailList
    FROM cpo_wms_podl_HEADERS PH ');
    -- now get the result
    DBMS_XMLGEN.setRowSetTag(qryCtx, 'Receipts' );
    DBMS_XMLGEN.setRowTag(qryCtx, 'PurchaseOrder' );
    result := DBMS_XMLGEN.getXML(qryCtx);
    INSERT INTO temp_clob_tab VALUES (result);
    DBMS_XMLGEN.closeContext(qryCtx);
    END;
    -- select * from temp_clob_tab
    ===========create type script=====================
    cpo_wms_podl_HEADERS
    CREATE or replace TYPE PurchaseOrderDetail AS OBJECT(
    LINENUMBER VARCHAR2(400 BYTE),
    COMPANY VARCHAR2(400 BYTE),
    PURCHASEORDERID VARCHAR2(400 BYTE),
    ITEM VARCHAR2(400 BYTE),
    QUANTITYUM VARCHAR2(400 BYTE),
    TOTALQUANTITY NUMBER
    create type PurchaseOrderDetailList as table of PurchaseOrderDetail
    create table temp_clob_tab(result CLOB)
    create type podl_HEADERS_list_t as table of podl_HEADERS_t
    CREATE or replace TYPE PODL_H_T AS OBJECT
    CLOSEDDATETIME DATE,
    COMPANY VARCHAR2(400 BYTE),
    CREATEDDATETIME DATE,
    PURCHASEORDERID VARCHAR2(400 BYTE),
    SHIP_TO VARCHAR2(400 BYTE),
    linelist PurchaseOrderDetailList
    )

    but I need to show in small letters as per my requirement.add alias column names in double quotes as in
    SQL> select dbms_xmlgen.getxmltype('select dname "DeptName", loc "Location" from dept') dept_xml from dual
    DEPT_XML                                                                       
    <ROWSET>                                                                       
      <ROW>                                                                        
        <DeptName>ACCOUNTING</DeptName>                                            
        <Location>NEW YORK</Location>                                              
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>RESEARCH</DeptName>                                              
        <Location>DALLAS</Location>                                                
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>SALES</DeptName>                                                 
        <Location>CHICAGO</Location>                                               
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>OPERATIONS</DeptName>                                            
        <Location>BOSTON</Location>                                                
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>SALES</DeptName>                                                 
        <Location>MUNICH</Location>                                                
      </ROW>                                                                       
    </ROWSET>                                                                      
    1 row selected.

  • I need to retrieve the a set of rows in between two rows from a table.

    consider employees table and primary key employee_id.
    With out using EMPLOYEE_ID column in the where clause or between clause, I need to get the records between 104 and 116 or a set of records between two rows.
    Can any one help me in this... i know this is simple but am just a fresher to oracle development... help me grow....
    Thanks,
    Arun

    ya at last i got the out put... thank guys for thinking with me....
    SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id)
    WHERE ROWNUM <=8
    MINUS
    SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id) WHERE ROWNUM <= 4

  • BC4J, row tag, dynamically setting the action

    I have created a DataPage in my BC4J app. It is an Edit Form which creates for me two JSP pages - SitesView_Edit.jsp and SitesView_EditSubmit.jsp. I have modified the Edit page to send through a parameter holding a calue of either "Update" or "Delete" depending on the action chosen by the user.
    The Row data tag in the Submit page looks something like this:
    <jbo:Row id="myrow" datasource="ds" rowkeyparam="MyRowKey" action="Update" >
    I want to change it to use the parameter passed in as the action attribute. Following the example in the help file, I define a local variable in Java as dbAction, put the parameter value inside it and change the row tag as follows:
    <jbo:Row id="myrow" datasource="ds" rowkeyparam="MyRowKey" action="<%=dbAction%>" >
    Unfortunately, this won't even compile!! It gives me a NullPointerException at compile time. Very strange. Any ideas, anyone??? Is this a bug?
    As a workaround I have simply created an if statement and branch to either a hardcoded Update row tag or a hardcoded Delete row tag depending on the parameter value.
    Thanks,
    Simon Cullen
    Western Australia

    Since you cant pass in the action as a parameter, you can use a scritplet to decide which statement to execute or use two jsp pages, one for each action.

  • Setting up custom tags using Cfmodule?

    I have just set a site up on Godaddy, on a shared CF server, so I don't have access to the administrator to set up a custom tag
    I believe it's possibly to set up a tag by uploading into my web root and then referring to it using CFMODULE
    Can anybody offer any help on this as I can't get it working.
    the issue is I want to set up DLL custom tags, such as CFX_ZIP (CFX_ZIP), and CFX_GIFSIZE (gifsize.dll)
    Thanks
    Mark

    I guess I could try some createobject code to see if it works on godaddy
    Would you be able to post some example code?
    Sure. Here is a simple test. If by some miracle that actually runs without error, you can find a .NET example in the documentation
    <cfset str = createObject("java", "java.lang.String").init("Test this")>
    <cfoutput>#str#</cfoutput>
    Also, find out what version of CF you are using. If it is CF8+ you are in business.
    <cfoutput>
    version #server.coldFUsion.ProductVersion#
    </cfoutput>

  • I cannot figure out how to set my apple id to use: itunes (two of accounts), apps store and Itunes store. How do I make one password that will be recognixed by all these devices?

    I cannot figure out how to set my apple id to use: itunes (two of accounts), apps store and itunes store. How do I make one password that will be recognized by all these devices? My apple id is constantly not working.

    Hi Lrwill,
    If the apps that are on your son's iPad were purchased under his Dad's Apple ID, then signing your Apple ID onto the iPad will not help you with updating those apps.
    Also, if the iPad was sync'd with his Dad's iTunes library, then hooking it up to your computer/iTunes library, will require you to reset the iPad, and everything that was loaded under the other Library and Apple ID will be wiped out.
    Can you provide a little more info about what was set up under which Apple ID and what iTunes library the iPad was sync'd with?
    Cheers,
    GB

  • I set up my new computer using the apple ID i always use, and then later migrated all my files from my old mac book to the same new one, but under a different user (same ID). how do i consolidate the two users on my new mac book?

    i set up my new computer using the apple ID i always use, and then later migrated all my files from my old mac book to the same new one, but under a different user (same apple ID). how do i consolidate the two users on my new mac book?

    Well if you use the Finder Go menu to Computer, a window opens up double click on your boot drive and then on Users folder, open the other user folder and open Public and drop your files into DropBox
    When you do this it will copy them and change the permissions and user assigned to it, so log into the other user and place them into your respective normal folders.
    Once you have all your files over and don't need the old user, use System Preferences > Accounts to delete it if you wish, however it's good two Admin accounts on the machine in case something bad happens in the other. Some people for security reasons on use a Standard account for most uses and a emergency Admin account.
    One can still do most Admin things in Standard user.

  • INDESIGN GLITCH: Creating an XML file from Indesign Layout - Issue "Using more than one line of GREP" & "Map Styles to Tags"

    I currently create XML from InDesign CC by Mapping Style to Tags.
    - The Paragraph Styles are manually apply to text. These styles include multiple lines of GREP to automatically apply character styles.
    - I map some of the paragraph and character styles to prebuilt tags that have the same name "Map Styles to Tags".
    I have found through trouble-shooting that InDesign is unable to "Map Styles to Tags" for more than one line of GREP. I therefore have to chose which line of GREP to automatically tag and which lines to manually tag.
    Please can anyone help, I need to automatically map tags to at least two character styles in one paragraph via GREP.
    Thanks,

    OK. The best I can suggest is running a Find/Change like this:
    Which will actually apply the character style to the italics (and I would do the bold as well just to make certain). Then run the Map Styles to Tags again, using the Apply by Name. Which will tag the italics.
    I don't know why ID can map to the bold and not the italic character style. It either should do them both (as in this instance) or none at all as the character styles are not actually applied by the grep, just the styling from the character styles.
    Mike

  • When using private browsing to view image results in Safari 5.1.3, only the first two rows of results are visible, the following four or so rows display greyed out place holders, and the safe search button is inoperable. Suggestions?

    When using private browsing to view image results in Safari 5.1.3, only the first two rows of results are visible, the following four or so rows display greyed out place holders, the remainder of the results page is blank, and the safe search button is inoperable. When I turn off private browsing and refresh the page, everything works again.
    Anyone else having this problem?

    I have got the same behaviour after the last Safari Update to 5.1.3. It seems that Safari now handles some scripts in a new way. If you debug the Google Website, you will see, that there is some Javascript Error, that seems to prevent to write into local cache. After some searching I wasn't able to finde a solution for this problem, other then disabling Javascript while private browsing to prevent the script loading. You then are able to use Google with the old layout. The option to disable JavaScript can be found in the Menu "Developer", wich has to be enabled in Safari in the options first.
    In my opinion this is a bug that is now occuring, because Apple changed something in private browsing and that has to be fixed by Google now, to run again. Or we will have to wait for 5.1.4, as you can read online Apple will change and bugfix the javascript engine in that version, perhaps this fixes the problem as well. I hope so!
    If anyone is in the developer program perhaps you could test this with the beta of 5.1.4 and tell us if it works.

  • Setting current row using a string key in an iterator

    Hi ,
    I am using Studio Edition Version 11.1.1.6.0 and integrated wls.
    QUESTION:_
    As suggested by Sudipto i want to brief up my query.
    I have a master-detail relationship .Using that relation's Tree model i am displaying through an <af:iterator> . I want to set the current row in the iterator of the parent view object . Is there a way please help .
    Description:_
    I have 2 master-details tables . FormSections is the mater and SectionContents is the child.
    I have an use case and using the tree collection model in an iterator to display the nodes.The jsf page has the following markup
    <iterator id="i1" value="#{bindings.FormSectionsView1.collectionModel}"
    var="section">
    <decorativeBox id="db2">
    <facet name="top">
    <commandLink text="#{section.Sectionname}" id="cl1">
    <showPopupBehavior triggerType="action" popupId="p1"/>
    </commandLink>
    </facet>
    <facet name="center">
    <iterator id="i2" value="#{section.children}" var="field">
    <outputText value="#{field.Fieldlabel}" id="ot3"/>
    </iterator>
    </facet>
    </decorativeBox>
    </iterator>
    on the popup p1 i have #{DesignBean.createField} popupfetch listener.Now i want to insert a new row in the child when i click on the commandlink.
    I have tried the following
    1) Tried binding setCurrentRowWithKey and setCurrentRowWithKeyValue (namedvalue as #{section.Sectionid}) but there was no change i get the current row set to empty
    2) Tried using the following bean codes
    a) DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding sectionsIterator =
    (DCIteratorBinding)bindings.get("FormSectionsView1Iterator");
    System.out.println(sectionsIterator.getCurrentRow());
    String key_str="21";
    sectionsIterator.setCurrentRowWithKeyValue(key_str);
              executeOperationBindings("CreateInsert1");// child createinsert binding execution
         b)     DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding sectionsIterator =
    (DCIteratorBinding)bindings.get("FormSectionsView1Iterator");
    System.out.println(sectionsIterator.getCurrentRow());
    String key_str="21";
    Key key=sectionsIterator.createKey(key_str);
    if(key!=null)
    sectionsIterator.setCurrentRowWithKey(key.toStringFormat(true));
              executeOperationBindings("CreateInsert1");
              Now i have a problem of setting the parent to the current row on the iterator of the parent i am getting null pointer exception when tried to set the key.
    Thanks,
    Raj
    Edited by: RajaSekharReddy.M on Jan 30, 2013 6:11 AM
    Edited by: RajaSekharReddy.M on Jan 31, 2013 4:39 AM

    Rajasekhar ,
    What model layer do you use ? If ADF BC then shouldn't the parent child relationship already been defined as a View Link ?
    Also I'm a little confused as to why you are setting a hardcoded the key with a string , since you are clicking the command link from the row , you should be accessing it as
    #{section.sectionId}
    Also I didnot understand this line-
    Now i have a problem of setting the parent to the current row on the iterator of the parent i am getting null pointer exception when tried to set the key.A small tip is you can start giving briefly what you are trying to achieve and whats failing to get accurate replies . Please refer -
    https://forums.oracle.com/forums/ann.jspa?annID=56

Maybe you are looking for

  • To upgrade or Not to upgrade this is the Question? What is the Answer!

    Does Adobe expect Design & Prepress studios like the one I run to upgrade all out copies to get the latest version of Acrobat 9 before they have fixed the problems that are in Acrobat 8? I see that the latest version is released now but there is stil

  • Essbase 9.3.1.2

    Hi, My essbase cube load is failing with below error.. MAXL> import database 'Account'.'Activity' data from data_file '/2007-01-01_bop.txt' 2> using server rules_file 'dl_bop.rul' 3> to load_buffer with buffer_id 1 4> on error abort; OK/INFO - 101906

  • Can I put iPhoto and iMovie on my 1TB drive and not my start up drive because it is almost full, and I really do not know what the 1TB is for

    I want to use my computer to it's full potential, so how do I keep my startup disk just that and everything else on the state 1TB drive

  • Keyboard in Outline Fields

    Hello. When using the keyboard to navigate in an outline field, it is possible to show a parent's children using the return key. Is there any way to close a parent up again using the keyboard? Tim Sawyer PanCredit Leeds, UK To unsubscribe, email '[em

  • Adobe CS5 upgrade questions

    I am a freelance Mac Operator and I am looking to purchase a new Mac and upgrade my version of CS4 (Design Premium) to CS5. Could anyone help with the following: 1. assuming that I do install it on my new Mac, will I need to have version 4 installed