Nested Data and Paging

Hello,
I hope someone can point me in the right direction. I have been trying to display some nested data which I have been able to do.
I then wanted to add paging to it which I cannot manage to do. I have read on the forum to not use nested data when paging and to flatten things out as per the example here:
http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html
The problem I have with flattening data out is that things will repeat. I have the following XML structure:
<?xml version="1.0" encoding="utf-8"?>
<questions>
            <question>
                        <questionIndex>1</questionIndex>
                        <questionString>This is question 1</questionString>
                        <answers>
                                    <answer>5 mins</answer>
                                    <answer>5-10 mins</answer>
                                    <answer>10-15 mins</answer>
                                    <answer>15-30 mins</answer>
                                    <answer>30+ mins</answer>
                        </answers>
</question>
<question>
                        <questionIndex>2</questionIndex>
                        <questionString>This is question 2</questionString>
                        <answers>
                                    <answer>Very Poor</answer>
                                    <answer>Average</answer>
                                    <answer>Excellent</answer>
                        </answers>
            </question>
</questions>
Now I wish to display this data in a survey format. So each question can have mutiple headings. This works fine when nested.
i.e. 1. This is question 1          5 mins    5-10 mins    10-15 mins    15-30 mins    30+ mins
If this data is flattened out for paging I will end up with
1. This is question 1          5 mins   
1. This is question 1          5-10 mins   
1. This is question 1          10-15 mins   
1. This is question 1          15-30 mins   
1. This is question 1          30+ mins
I don't want the question repeating for every possible answer.
Taking the donut example if that's easier to follow I would be asking how do I display that information without repeating the ID, NAME or Price Per Unit until it actually changes.
I simply cannot work out how to do it, any help, pointers etc would be much appreciated.

hi,
thanks for the quick response. The following link should give you an idea of what I am trying to get to.
http://203.134.27.150/sv/test.php
This displays the questions and is able to page through them.
It also displays the answers which I am using as headings.
The problem is I have no idea how to maintain the link between the Question and the answers for that question.
The questions will change but the answer remains static, I know I haven't done anything to specifically link the two because I really don't have a clue what to do.
The XML is the same as my first post so for example question 1 it should have the headings
     5 mins       5-10 mins       10-15 mins       15-30 mins       30+ mins
Question 2 should have the headings
    Very Poor     Average      Excellent
Is there something I can do to make this happen?
thank you.

Similar Messages

  • NESTED TABLES,,Header data and Item data

    How to arrange them in the hierarchy view?
    How to put a condition on the item table so that only corresponding items  from the item table will be shown for each header.
    header table data 1211
                      1212
    item table data is 1211  10
                       1211  20
                       1212  10
                       1212 20
    so final output should be
    1211
    1211  10
    1211  20
    1212
    1212  10
    1212  20.
    So how to put this condition?
    Can you please help me
    Regards
    sasi

    Hi,
    If you designing the form using SFP Transaction, then you have to set the where clause on the item table in the context.
    In the SFP context drag the header table from interface.drag the item table from interface on the DATA in the header table. it will placed at the end of the header table. Now select the item table select where clause in the properties ( at the bottom of the screen ).there you create a line for condition using create button. drag the field from header table field ( say header-matnr ) on the right side and then drag the same field from the item table ( say item-matnr) in the left side.This will filter the item records relevent for header record.
    In the layout, design the table as I explained in the forum message .( search forum with text "Nested Tables and Multiple Pages" ) 
    pavan meda

  • How to select data from one nested table and into another nested table

    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    Thanks,
    in advance

    >
    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    >
    Not unless you provide the code you are actually using.
    There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
    And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
    Post the actual code you are using and all of the structures being used.
    Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing.

  • Spry Dataset and Nested Data

    i've 1 xml file, with basicly 3 columns: city, artist, artist
    description.
    i want to show cities and when a city clicked, show the
    artists in that city, and when artist is clicked show artist
    description as details.
    i've tryed everything, but the best i can do... see below.
    any help would be highly appreciated!!!
    erik
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryAssets/SpryNestedXMLDataSet.js"></script>
    <script type="text/javascript">
    // Setup a parent data set:
    // Setup a couple of nested data sets:
    var ds1 = new Spry.Data.XMLDataSet("buitenplaatsen.xml",
    "root/dataroot/buitenplaatsen", { useCache: false });
    var ds2 = new Spry.Data.NestedXMLDataSet(ds1,
    "omschrijving_kunstenaar");
    var ds3 = new Spry.Data.NestedXMLDataSet(ds1,
    "buitenplaats");
    var ds4 = new Spry.Data.NestedXMLDataSet(ds1,
    "naam_kunstenaar");
    </script>
    <div class="liveSample">
    <table width="100%" border="1">
    <tr>
    <th>Buitenplaats</th>
    <th>Kunstenaar</th>
    <th>Omschrijving</th>
    </tr>
    <tr>
    <td valign="top" width="20%" spry:region="ds3">
    <ul>
    <li spry:repeat="ds3" spry:setrow="ds3"
    spry:select="selected"
    spry:hover="hover">{buitenplaats}</li>
    </ul>
    </td>
    <td valign="top" width="20%" spry:region="ds1">
    <ul>
    <li spry:repeat="ds1" spry:setrow="ds1"
    spry:select="selected"
    spry:hover="hover">{naam_kunstenaar}</li>
    </ul>
    </td>
    <td valign="top" width="60%" spry:region="ds2">
    <ul>
    <li
    spry:repeat="ds2">{omschrijving_kunstenaar}</li>
    </ul>
    </td>
    </tr>
    </table>
    </div>
    <body>
    </body>
    </html>

    Hi,
    hereby url:
    http://www.eenlintvollust.nl/test/test_datasets.html
    http://www.eenlintvollust.nl/test/buitenplaatsen.xml
    i want that in the left column i can select the distinct
    city(buitenplaats), than the middel column shows the
    artists(kunstenaar) and when clicked on artist,
    detail(omschrijving) shows up. Thanx for any help!!!

  • Nested Tables and Advanced Queues- Please Help.

    How do i work with NestedTable type and Advanced Queue.
    I have done the following
    I have Oracle 8.1.7 enterprise edition.
    create type myType as TABLE OF varchar(32);
    create type myObject as OBJECT (
    id int,
    myt myType);
    DECLARE
    BEGIN
    dbms_aqadm.create_queue_table(
    queue_table => 'my_queue_table',
    multiple_consumers => TRUE,
    queue_payload_type => 'myObject',
    compatible => '8.1.3'
    END;
    The Nested Table and Object are created successfully.
    but the queue is not created.
    I get the following message.
    DECLARE
    ERROR at line 1:
    ORA-22913: must specify table name for nested table column or
    attribute
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2012
    ORA-06512: at "SYS.DBMS_AQADM", line 55
    ORA-06512: at line 3
    I know how to specify the nested table storage clause for
    create table statement, but there is no provision for
    it in the create_queue_table procedure.
    Any help will be greately appriciated.
    i have already created and tested aqs with simple data types,
    also i have created simple tables with nested table type
    elements.
    but the combo of Nested tables and AQ is not working.
    thanks in advance.

    Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
    As you suggested me: i have done a block based on a sub-query for the nested-table:
    'select courses from department where name= :department.name'.
    In the master block(department) i have the when-new-record-instance trigger:
    Declare
    LC$Req varchar2(256);
    Begin
    LC$Req := '(select ns.courses from table
    ( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
    Go_block('block11');
    Clear_Block ;
    Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
    Execute_query ;
    End ;
    Now the errors i receive, this time in the runtime mode are:
    - FRM-41380: Cannot set the blocks query data source
    -FRM-41003: This function cannot be performed here.
    Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
    Thank you in advance.

  • GetData() from nested data sets

    Hi,
    I've got nested data sets in the form of:
    var ds1 = new Spry.Data.XMLDataSet("products.xml",
    "items/item");
    var dsOptionSets = new Spry.Data.NestedXMLDataSet(ds1,
    "optionsets/optionset");
    var dsOptions = new Spry.Data.NestedXMLDataSet(dsOptionSets,
    "option");
    The application is an e-commerce store and I'm retrofitting
    E-Junkie's form <select> codes to allow the user to select
    "Color" and "Size" by clicking on images pulled from
    items/item/optionsets/optionset/option rather than selecting those
    options from a list. Trouble is, I can't get to the data in the
    nested data set. Help!
    I've tried poking at it thus:
    <img spry:repeat="dsOptions" spry:setrow="dsOptions"
    onclick="var rows = dsOptions.getData(); alert(rows[0].option);"
    spry:if="'{dsOptions::@image}' != 'undefined'"
    src="{dsOptions::@image}" alt="{dsOptions::option}"
    name="{dsOptions::option}" />
    .. but I've yet to get anything but "undefined" from the
    alert. I think it may have something to do with the data sets being
    more complexly nested than I imagine. I'm really looking forward to
    the day when I can refer to Spry data in javascript as easily as I
    can through {spry::tag}s.
    Here's one <item> from my <items>:
    <items>
    <item>
    <id>43522</id>
    <title>Gildan T-Shirts</title>
    <price>16.95</price>
    <images>
    <image description="Gildan T-Shirt in Charcoal
    Grey">images/products/shirts/tshirt_gildan_ss_charcoalgrey.jpg</image>
    </images>
    <optionsets>
    <optionset value="Colors" id="0">
    <option
    image="images/products/shirts/tshirt_gildan_ss_texasorange.jpg">Texas
    Orange</option>
    <option
    image="images/products/shirts/tshirt_gildan_ss_charcoalgrey.jpg">Charcoal</option>
    </optionset>
    <optionset id="1" value="Size">
    <option value="Small"
    image="images/products/sizes/size_s.gif">Small</option>
    <option value="Medium"
    image="images/products/sizes/size_m.gif">Medium</option>
    <option value="Small"
    image="images/products/sizes/size_l.gif">Large</option>
    <option value="Xtra Large"
    image="images/products/sizes/size_xl.gif">Xtra
    Large</option>
    <option value="XXtra Large"
    image="images/products/sizes/size_2x.gif">XXtra
    Large</option>
    </optionset>
    </optionsets>
    </item>
    </items>

    Hi Diana,
    I tried your suggestion of executing ds1.loadData()
    immediately after declaring ds1, but it has not fixed my problem.
    I've changed my image onClick behavior to:
    if (dsOptions.getDataWasLoaded())
    row = dsOptions.getRowCount();
    alert(row);
    On clicking any image, alert shows "0". This tells us that
    dsOptions IS being loaded, right? I'm able to work with the data
    through e.g. {dsOptions::option} tags as always, but for some
    reason I can't get to the data through dsOptions.
    I just tried replacing the onClick behavior above with
    ds1.getRowCount(), and that shows the correct number (6). Then I
    tried with dsOptionSets and got a zero count again.
    FYI, my declaration section is now:
    var ds1 = new Spry.Data.XMLDataSet("products.xml",
    "items/item");
    ds1.loadData(); // theoretically not necessary, but bug in
    this Spry version requires it
    ds1Rows = ds1.getData(true);
    var dsOptionSets = new Spry.Data.NestedXMLDataSet(ds1,
    "optionsets/optionset");
    dsOptionSets.loadData();
    dsOptionSetsRows = dsOptionSets.getData(true);
    var dsOptions = new Spry.Data.NestedXMLDataSet(dsOptionSets,
    "option");
    dsOptions.loadData();
    dsOptionsRows = dsOptions.getData(true);
    I've also just tried replacing the onclick with:
    onclick="if (ds1.getDataWasLoaded()) { ds1Rows=
    ds1.getData(true); dsOptionSetsRows = dsOptionSets.getData(true);
    dsOptionsRows =
    dsOptions.getData(true);alert(dsOptionsRows[0].option);}"
    As before, ds1Rows[0].<property> gives the correct
    result but dsOptionsRows[0].option says "dsOptionsRows[0] has no
    properties".
    Thanks,
    Dylan Oliver

  • Problem w/ Nested Datasets and Master/Detail regions

    Hi, I'm being using spry for a couple of applications and
    really love it. This is the first time I've tried to utilize a
    nested dataset and I'm having some difficulty loading the nested
    data. I'm getting a js 'Object does not support this property or
    method' error in IE and a 'Failed to retrieve data set (dsCreds)
    for spry:repeat' in FF.
    I've tried to map examples to my application but of course
    it's slightly different. I have a master/detail region dynamically
    generated from a .php file and part of the detail region has the
    nested dataset. Maybe (hopefully) it's something obvious. I've
    broken out a test case that demonstrates what's happing - If anyone
    could take a look I would be extremely grateful!
    The .htm file is on:
    htm
    file
    The .PHP file that generates the dynamic XML is on:
    PHP
    file
    A sample .XML (generated from the .PHP file is
    Sample XML
    file
    Even without the Nested set getting generated the
    Master/Detail section works fine.
    Thanks so much for any help!
    Edit - Apologies for all the inline css - still developing
    :)

    Hi,
    The dataset name in the NestedDataSet constructor does not go
    in quotes.
    Try var dsCreds = new Spry.Data.NestedXMLDataSet(dsAgents,
    "credentials/cred");
    and see if that helps.
    Don

  • Nested Repeater and Binding Problem - Please Help

    I have nested repeaters and binding seems to work with the
    outer repeater, but not with the inner repeater. I have boiled it
    down to a pretty concise case. If someone could offer hints I would
    be most appreciative!
    I understand the objects I am using to store data could be
    different, but it only looks strange because I had to boil down a
    complex case to a simple case.
    Type a user and then an email address then click to add them,
    the user TextInput and label gets created, but not the email
    address label and text input.
    Basically I want users in an ArrayCollection, and their
    multiple email addresses in an ArrayCollection stored in an Object,
    where I get that email ArrayCollection using the user as the key to
    the object acting as an associative array.
    The attached code should compile fine, so please have a go at
    this. Thanks!

    "Greg Lafrance" <[email protected]> wrote in
    message
    news:gn5p1k$cv9$[email protected]..
    >I have nested repeaters and binding seems to work with
    the outer repeater,
    >but
    > not with the inner repeater. I have boiled it down to a
    pretty concise
    > case. If
    > someone could offer hints I would be most appreciative!
    >
    > I understand the objects I am using to store data could
    be different, but
    > it
    > only looks strange because I had to boil down a complex
    case to a simple
    > case.
    >
    > Type a user and then an email address then click to add
    them, the user
    > TextInput and label gets created, but not the email
    address label and text
    > input.
    >
    > Basically I want users in an ArrayCollection, and their
    multiple email
    > addresses in an ArrayCollection stored in an Object,
    where I get that
    > email
    > ArrayCollection using the user as the key to the object
    acting as an
    > associative array.
    I wouldn't bind to methods like that...I'd make properties
    and bind to
    those.

  • Nested Tables and Forms 9i-please help

    Hi
    i have the folowing example of a nested table:
    CREATE TYPE CourseList AS TABLE OF VARCHAR2(10) -- define TABLE type
    CREATE TYPE Student AS OBJECT ( -- create object
    id_num INTEGER(4),
    name VARCHAR2(25),
    address VARCHAR2(35),
    status CHAR(2),
    courses CourseList) -- declare nested table as attribute
    CREATE TYPE Course AS OBJECT (
    course_no NUMBER(4),
    title VARCHAR2(35),
    credits NUMBER(1));
    CREATE TYPE CourseList AS TABLE OF Course;
    CREATE TABLE department (name VARCHAR2(20),
    director VARCHAR2(20),
    office VARCHAR2(20),
    courses CourseList)
    NESTED TABLE courses STORE AS courses_tab;
    In Forms i have created a data block based on table department and for managing the nested table courses_tab i found out that i should use a stored procedure:
    PROCEDURE procedure_nest (c_c out courses_tab%rowtype) IS
    c_c courselist;
    BEGIN
    select c.name, c.director,office into :department.name, :department.director,
    :department.office from department c , table
    (select n.courses from department n where c.name =n.name and rownum<=1);
    END;
    compil error:
    error 999 at line 1, column 35
    implemntation restriction (may be temporary) ADT or schema level
    collection not supported at client side with non-OCI mode.
    i really would like to know what shall i do to use and manage the nested table in forms.
    Thank you very much

    Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
    As you suggested me: i have done a block based on a sub-query for the nested-table:
    'select courses from department where name= :department.name'.
    In the master block(department) i have the when-new-record-instance trigger:
    Declare
    LC$Req varchar2(256);
    Begin
    LC$Req := '(select ns.courses from table
    ( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
    Go_block('block11');
    Clear_Block ;
    Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
    Execute_query ;
    End ;
    Now the errors i receive, this time in the runtime mode are:
    - FRM-41380: Cannot set the blocks query data source
    -FRM-41003: This function cannot be performed here.
    Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
    Thank you in advance.

  • Varray, Nested Table and Object types in OWB r2

    Requirement:
    Flat file with repeating groups of nested content need to move into Object Relational ORACLE table (using varray or nested tables - no preference). The data will be loaded, then mapped/transformed into a richer O-R output to directly produce XML outputs.
    Problem:
    Generated PL/SQL "seems" to do the correct thing, but deployment errors show failures on mapping of collections (varrays, NTs or OTs) and in sqlplus recompiling the PKB still gives the errors. Is this a PL/SQL generator error, or is there a more meaningful example of using CONSTRUCT OBJECT operator than the embedded odcumentation - it is a simple type (single instance) and not a variable repeating group of nested data.
    Anyone had any success with these, or know of any collateral to assist in the process. Thanks.

    The process we are following is very simple. We are talking 10 columns from a source flat file table and wish to map this into a Varray/Nested table, with one column of Varchar2(10).
    When you create your map in OWB, select the construct object, you have to choose an object type - it does not allow you to select a VARAAY or NESTED table.
    I have then created an object defined in the same structure as the VARRAY/NESTED table - I have then made the VARRAY/NESTED table of this TYPE.
    Example:
    CREATE OR REPLACE TYPE "O_REL_PUB_INDEX" AS OBJECT (
    X_REL_PUB_INDEX_1 VARCHAR2(10))
    CREATE OR REPLACE TYPE "V_REL_PUB_INDEX" AS VARRAY(15) OF O_REL_PUB_INDEX
    In OWB you can then select O_REL_PUB_INDEX when creating the 'Contruct Object'.
    The problem I have is that when I map to my target column of type V_REL_PUB_INDEX and DEPLOY my map I get the following errors taken from OWB control centre
    Name
    Action
    Status
    Log
    TEST
    Create
    Warning
    ORA-06550: line 2931, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 3174, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 401, column 7:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 643, column 13:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 7221, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 7464, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    Any ideas? anyone succesfully mapped to either a VARRAY or an NESTED TABLE target column?

  • Object view  with nested table and member functions????????????????

    HI frds:)
    I need some help regarding writeing soem queries..
    I have to use view in retreving data and by useing member functions of object.
    1) i have to create a nested table by useing type object.
    2) i have to create a object wtih member functions inorder to create view of taht nested table,.
    3) by useing this objectt view and by useing methods i have to write soem queries ...
    If any one know or any information regarding this please reply me... as i have searched in net alot but i was unable to figure out..
    Thanks....

    // first createing object
    create type emp_det as object
    (empname varcahr2(20),start_date date,end_date date);
    // creating table of that object
    create table emp_detai_table as table of emp_det;
    // creating nested table
    create table empl (emp_no number,emp_detail emp_detail_table,dep_no number)nested table emp_detail store as s;
    //now i want to create view.. inorder to create view i need to create object. in that object i want to create methods.. these methods should work with date attributes..
    after creating object view i need to select or write some queries by useing member methods..
    This is the tast i have to perform.,. i have no materials ...if u have any link ..forward me..
    i have to do it as soon as possible..
    waiting for your reply...

  • Multiple Filtering of Nested Data Set Spry

    Hi,
    I am trying to use multiple filters on a nested data set using Spry but it does not work, no matter how many times I've re-read the code and verified that I'm using the code the right way. What is going on?
    When I use a single non-destructive filter (ie... ds.filter()) on the nested data set, the filter works beautifully. However, when I want to use multiple filters (I use ds.addFilter()), it looks like my filter function (FilterByState) is not being kicked off.
    I linked to the appropriate files, SpryData.js, xpath.js, SpryNestedXMLDataSet.js and SpryDataExtensions.js. These are the latest version, 1.6.1.
    Why will ds.filter work and not ds.addFilter? I haven't written the second filter code yet because this is stopping me from moving forward. Even though, I haven't written that, shouldn't addFilter work too?
    Please help, this is driving me crazy.
    Here is my code:
    <script type="text/javascript">          
         Spry.Utils.addLoadListener(function () {
              if (document.getElementById("stateSelect").selectedIndex != 0) {
                   document.getElementById("stateSelect").selectedIndex = 0;    
              if (document.getElementById("dateSelect").selectedIndex != 0) {
                   document.getElementById("dateSelect").selectedIndex = 0;    
         var dsTopics = new Spry.Data.XMLDataSet("compliance.xml", "compliance/subject", {useCache: false });         
         var dsDocuments = new Spry.Data.NestedXMLDataSet(dsTopics, "doc");
         var dsDates = new Spry.Data.XMLDataSet("compliance.xml", "compliance/subject/doc/date", {useCache: false, subPaths: "@num", distinctOnLoad: true, distinctFieldsOnLoad: ['date'], sortOnLoad: "@num", sortOrderOnLoad:"ascending"});
         dsDates.setColumnType("@num", "number");
         var currentSelection;
         //var FilterByState;
         function showDocuments(currentIndex) {
              dsTopics.setCurrentRowNumber(currentIndex);
              document.getElementById("stateSelect").selectedIndex = 0;
              document.getElementById("dateSelect").selectedIndex = 0;
              dsDocuments.removeAllFilters(true);
         function ToggleFilter(selected, f) {
              chosenState = selected;
              if (selected != "") {
                   alert("something's selected");
                   dsDocuments.addFilter(f, true);
              else {
                   alert("something is NOT selected");
                   dsDocuments.removeFilter(f, true);
              //dsDocuments.applyFilters();
         var chosenState;
         var chosenDate;
         function FilterByState(ds, row, rowNumber) {
              alert("Filtering by state");
              var currentSelection = document.getElementById("stateSelect").options[chosenState];
              if (row["state"].search(currentSelection.value) != -1) {
                   return row;
              else
                   return null;
         function FilterByDate(ds, row, rowNumber) {
              var currentSelectedDate = document.getElementById("dateSelect").options[chosenDate];    
              if (row["date"] == currentSelectedDate)
                   return row;
              else
                   return null;
    </script>
    <div class="articlePage articleContent">
         <h2 class="bodyCopyBold">Compliance Widget</h2>
         <form name="selectForm" action="">
              <div spry:region="dsTopics" id="topicSelector">
                   <label for="topicSelect" class="dataLabel">Topic:</label>
                   <select spry:repeatchildren="dsTopics" class="input" name="topicSelect" id="topicSelect" onchange="showDocuments(this.selectedIndex);">
                        <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}" value="{name}" selected="selected">{name}</option>
                        <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}" value="{name}">{name}</option>
                   </select>
              </div>
              <label for="stateSelect" class="dataLabel">State:</label>
              <select class="input" name="stateSelect" id="stateSelect" onchange="ToggleFilter(this.selectedIndex, FilterByState);">
                   <option value="" selected="selected">Please Select</option>
                   <option value="All States">All States</option>
                   <option value="AL">Alabama</option>
                   <option value="AK">Alaska</option>
                   <option value="AZ">Arizona</option>
                   <option value="AR">Arkansas</option>
                   <option value="CA">California</option>
                   <option value="CO">Colorado</option>
                   <option value="CT">Connecticut</option>
                   <option value="DE">Delaware</option>
                   <option value="DC">District of Columbia</option>
                   <option value="FL">Florida</option>
                   <option value="GA">Georgia</option>
                   <option value="HI">Hawaii</option>
                   <option value="ID">Idaho</option>
                   <option value="IL">Illinois</option>
                   <option value="IN">Indiana</option>
                   <option value="IA">Iowa</option>
                   <option value="KS">Kansas</option>
                   <option value="KY">Kentucky</option>
                   <option value="LA">Louisiana</option>
                   <option value="ME">Maine</option>
                   <option value="MD">Maryland</option>
                   <option value="MA">Massachusetts</option>
                   <option value="MI">Michigan</option>
                   <option value="MN">Minnesota</option>
                   <option value="MS">Mississippi</option>
                   <option value="MO">Missouri</option>
                   <option value="MT">Montana</option>
                   <option value="NE">Nebraska</option>
                   <option value="NV">Nevada</option>
                   <option value="NH">New Hampshire</option>
                   <option value="NJ">New Jersey</option>
                   <option value="NM">New Mexico</option>
                   <option value="NY">New York</option>
                   <option value="NC">North Carolina</option>
                   <option value="ND">North Dakota</option>
                   <option value="OH">Ohio</option>
                   <option value="OK">Oklahoma</option>
                   <option value="OR">Oregon</option>
                   <option value="PA">Pennsylvania</option>
                   <option value="RI">Rhode Island</option>
                   <option value="SC">South Carolina</option>
                   <option value="SD">South Dakota</option>
                   <option value="TN">Tennessee</option>
                   <option value="TX">Texas</option>
                   <option value="UT">Utah</option>
                   <option value="VT">Vermont</option>
                   <option value="VA">Virginia</option>
                   <option value="WA">Washington</option>
                   <option value="WV">West Virginia</option>
                   <option value="WI">Wisconsin</option>
                   <option value="WY">Wyoming</option>
              </select>
              <div spry:region="dsDates" id="dateSelector">
                   <label for="dateSelect" class="dataLabel">Date:</label>
                   <select class="input" name="dateSelect" id="dateSelect">
                        <option value="" selected="selected">Please Select</option>
                        <option spry:repeat="dsDates" value="{date}">{date}</option>
                   </select>
              </div>         
              <div class="spacer10"></div>
              <div id="documentListing" class="bodyCopy">
                   <ul spry:region="dsDocuments" spry:detailregion="dsTopics" class="list2">
                        <li spry:repeat="dsDocuments">{title}</li>
                   </ul>
              </div>
         </form>
    Here is the xml:
    <?xml version="1.0"?>
    <compliance>
         <subject>
              <name>Agent Termination</name>
              <doc id="91000038">
                   <title>Reminder: Agent Contract Termination Notification</title>
                   <date num="200907">July 2009</date>
                   <state>OR</state>
              </doc>
              <doc id="91000031">
                   <title>Reminder: Agent Contract Termination Notification 2</title>
                   <date num="200807">July 2008</date>
                   <state>OR</state>
              </doc>
              <doc id="91000031">
                   <title>Reminder: Agent Contract Termination Notification 2</title>
                   <date num="201001">January 2010</date>
                   <state>OR</state>
              </doc>
         </subject>
         <subject>    
              <name>Agent Training</name>
              <doc id="91000034">
                   <title>Oregon Agent Retraining</title>
                   <date num="200908">August 2009</date>
                   <state>OR</state>
              </doc>
              <doc id="91000060">
                   <title>Multi-State Corrective Action Plan - Training Courses – BLN Changes</title>
                   <date num="200902">February 2009</date>
                   <state>All States</state>
              </doc>
              <doc id="91000062">
                   <title>Required Training – Change for California Agents</title>
                   <date num="200902">February 2009</date>
                   <state>CA</state>
              </doc>
              <doc id="91000065">
                   <title>Required Training - BCLIC Agents</title>
                   <date num="200902">February 2009</date>
                   <state>NY</state>
              </doc>
              <doc id="91000071">
                   <title>Multi-State Corrective Action Plan - Training Courses – BLN Changes</title>
                   <date num="200901">January 2009</date>
                   <state>All States</state>
              </doc>
              <doc id="91000074">
                   <title>Multi-State Corrective Action Plan - Training Courses – BLN Changes 2</title>
                   <date num="200910">October 2009</date>
                   <state>All States</state>
              </doc>
         </subject>
         <subject>
              <name>Agents Licenses</name>
              <doc id="91000064">
                   <title>Georgia Agent Consent Orders</title>
                   <date num="200902">February 2009</date>
                   <state>GA</state>
              </doc>
              <doc id="91000066">
                   <title>New York State Correction Law</title>
                   <date num="200902">February 2009</date>
                   <state>NY</state>
              </doc>
         </subject>
         <subject>
              <name>DNC</name>
              <doc id="91000063">
                   <title>States Prohibit Unsolicited Calls</title>
                   <date num="200902">February 2009</date>
                   <state>AL, LA, RI, UT</state>
              </doc>
         </subject>
         <subject>
              <name>LTC Partnership</name>
              <doc id="91000056">
                   <title>Alabama Long Term Care and Long Term Care Partnership Compliance</title>
                   <date num="200903">March 2009</date>
                   <state>AL</state>
              </doc>
         </subject>
    </compliance>
    Thanks

    Hi Marlene,
    It isn't working right because you have a bug in your
    onchange attribute for your select:
    <select id="test"
    onChange="ds1.setCurrentRow(this.selectedIndex);">
    <option spry:repeat="ds1"
    id="{ds_RowID}">{@id}</option>
    </select>
    setCurrentRow() takes a rowID not a rowNumber. The
    "selectedIndex" of the select element is the equivalent of a row
    number, so if you want to change the current row by row number then
    use setCurrentRowNumber() instead:
    <select id="test"
    onChange="ds1.setCurrentRowNumber(this.selectedIndex);">
    <option spry:repeat="ds1"
    id="{ds_RowID}">{@id}</option>
    </select>
    After you make that change, you will see that things work as
    expected.
    --== Kin ==--

  • Issue is De-serializing nested date type using Axiss 1.4

    We are using Axis 1.4 and face issue during deserialization in handling date types. The scenario is explained below. I couldn’t find enough information on net on below and hence asking question to the apache team. Please note when we switch to Axis 2, issue is not seen. Upgrading may not be a simple option for us as of now, and hence I was evaluating possible workarounds or solution if any.
    The XSD contains type “DateofBirthType” which is of type xsd:date
    Child XSDs contains element “DateofBirth” of type “DateOfBirthType”
    When Java client invokes the web service, IllegalArgumentException is seen while de-serializing this “DateOfBirthType” element. If we remove “DateOfBirthType” and map it directly to xsd:date type all works fine.
    We have generated the stub using Axis 1.4 and trying to access the RetrieveIndividualCustInformation  operation through stub, but getting the (IllegalArgumentException) while axis tries to deserialize the response for all the fields having data types as date which is indirectly mapped (nested mapping) as shown below.
    e.g. IndividualInfo-----DateOfBirth(Type—DateOfbirth ---Which is of Type Date)-_you will face illegal argument exception.
    So, when we changed the type to simple date (not nested),then it worked fine. So it confirms that this problem is only for type date which is clearly seen in Axis 1.4 client.
    Please let me know if anyone faces similar/same issue or even know any such issue already persists and there are no possible workarounds and/or fixes for this. In that case we can put up case to migrate to Axis2.
    Please reply ASAP.

    Hi, Shank,
    My guess is that you want:
    , dense_rank () over (order by  tmstp  desc)  AS rn RANK means you'll skip numbers when there's a tie. For example, if 3 rows all have the exact same latest tmstp, all 3 rows would be assigned number 1, RANK would assign 4 to the next row, but DENSE_RANK assigns 2.
    "PARTITION BY x" means that you want a separate series of numbers (starting with 1) for every value of x. If you want just one series of numbers for the whole result set, then don't use a PARTITION BY clause at all. (PARTITION BY is never required.)
    Maybe you wnat to PARTITON BY cd. I can't tell without some sample data, and an explanation of why you want the given results from that data.
    You certainly don't want to PARTITION BY the same expression that you ORDER BY; that just means all rows tie for #1.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Simplify the problem as much as possible.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}
    Edited by: Frank Kulash on Aug 1, 2012 1:20 PM

  • How to assign Values to nested table and pass as parameter to procedure?

    How to assign Values to nested table and pass as parameter to procedure?
    Below is the Object and its type
    create or replace type test_object1 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type1 is table of test_object1;
    create or replace type test_object2 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type2 is table of test_object2;
    GRANT ALL ON test_object1 TO PUBLIC;
    GRANT ALL ON test_type1 TO PUBLIC;
    GRANT ALL ON test_object2 TO PUBLIC;
    GRANT ALL ON test_type2 TO PUBLIC;
    here is the table made of object type:
    create table test_object_tpe
    sl_num NUMBER,
    description VARCHAR2(100),
    main_val1 test_type1,
    main_val2 test_type2
    NESTED TABLE main_val1 STORE AS tot1
    NESTED TABLE main_val2 STORE AS tot2;
    here is the procedure which inserts values into nested table:
    PROCEDURE INSERT_TEST_DATA(sl_num IN NUMBER,
    description IN VARCHAR2,
    p_main_val1 IN test_type1,
    p_main_val2 IN test_type2
    IS
    BEGIN
    FOR rec in p_main_val1.first..p_main_val1.last
    LOOP
    INSERT INTO xxdl.test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    sl_num
    ,description
    ,test_type1 (test_object1(
    p_main_val1(rec).val1,
                                       p_main_val1(rec).val2,
    p_main_val1(rec).val3
    ,test_type2 (test_object2( p_main_val2(rec).val1,
                        p_main_val2(rec).val2,
                        p_main_val2(rec).val3
    END LOOP;
    commit;
    END INSERT_TEST_DATA;
    here is the anonymoys block which assigns values to the object type and pass values into the procedure:
    set serveroutput on;
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1(1).val1 := 'testx1';
    inval1(1).val2 := 'testx2';
    inval1(1).val3 := 'testx3';
    inval2(1).val1 := 'testy1';
    inval2(1).val2 := 'testy2';
    inval2(1).val3 := 'testy3';
    CSI_PKG.INSERT_TEST_DATA(sl_num => p_sl_num,
    description => p_description,
    p_main_val1 => inval1,
    p_main_val2 => inval2
    end;
    Can anybody correct me.
    Thanks,
    Lavan

    Thanks for posting the DDL and sample code but whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    How to assign Values to nested table and pass as parameter to procedure?
    >
    Well you are doing almost everything wrong that could be done wrong.
    Here is code that works to insert data into your table (the procedure isn't even needed).
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1.extend();
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');
    inval2.extend();
    inval2(1) := test_object2('testy1', 'testy2', 'testy3');
    INSERT INTO test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    (p_sl_num, p_description, inval1, inval2);
    commit;
    end;
    /See Example 5-15 Referencing a Nested Table Element in Chap 5 Using PL/SQL Collections and Records in the PL/SQL doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/collections.htm#CJABEBEA
    1. You don't even need the procedure since all it does is a simple INSERT into the table which you can do directly (see my code above)
    inval1(1).val1 := 'testx1';There is no element one (1) of 'inval1' since you haven't created any elements yet. You need to EXTEND the collection to add an element
    inval1.extend();And then there is an empty element but 'inval1' is a container for objects of type 'test_object1' not for scalars like 'val1', 'val2', and 'val3'.
    So you can't do
    inval1(1).val1 := 'testx1';You have to create an instance of 'test_object1'
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');And so on for the other collection
    You don't need the procedure (as my sample code shows) but once you populate the variables properly it will work.

  • Weird load balancing and paging: What is going on?

    Hi,
    We have EP 7 installed in our environment.  The Portal has a Central Instance and two dialog instances.  We are using NetScaler 7 as a load balancer.  Our load balancer is currently configured with a weighted round-robin of 3:3:1.  For all requests, 3 connections are set to each of the dialog instance with only 1 connection sent to the central instance. 
    We have recently received a monitoring report which indicates that, despite the load balancing configurations, one of the dialog instance (DI1) is having a higher CPU load.  We assume this means that more requests are being sent to one particular instance.  Comparing this report with the past reports we have received, this particular instance has been consistently getting higher CPU loads, which is puzzling.  The dialog instances in our Portal setup do not do anything else, other than serving Portal requests.  In other words, no third party applications are installed on these servers.  We do not know why this particular instance is having a higher CPU load.  Is there anything that we can do to find out why this instance keeps having a higher CPU load?  Is there something we should be doing at the load balancer's end?
    On a different note, the other dialog instance (DI2) is having high paging activities.  From one of the posts in the forums, it seems to indicate that the high paging might be an indication that the Portal is undergoing some garbage collection activities.  However, it does not make sense that only ONE instance is having high paging if garbage collection is carried out on.  How is it that the rest of the instances are not having high paging issues?  Has anyone come across this situation?  What should we do to find out what is going on behind the screens?
    Any suggestions/advice would be much appreciated.
    Thank You.

    Hi Dagfinn,
    Many thanks for your reply. 
    Question1: How is NetScaler configured with regards to stickyness?
    We have NetScaler Persistence turned on, so that users' requests are served by the same dialog instance from the beginning to the end.  We found that if Persistence is not enforced, a user's request could be sent to a different dialog instance, which will cause data inconsistencies.  Can this be counted as stickyness?  I am not sure how Persistence is maintained.  It could be possible that it is done via IP...I will find out more from my colleague, who is maintaining NetScaler. 
    I guess we will need to have monitoring tools in place to determine the actual load distribution, as you have suggested in Question 2.  I guess we will have to consider the viable actions to be taken from what we shall observe... 
    Question 2: Can you get some data one how NetScaler is distributing the load in practice (not in theory, ie. configuration) ? (usually is a monitoring tool for this in such a product)
    I believe my colleague has such tools.  I will try to obtain the relevant data and make the appropriate analysis.
    Question 3: How many server nodes do you have for the central instance and for the two dialog instances?
    We have 1 server node in the central instance and 3 server nodes for each of the dialog instance.
    Many thanks again on your suggestion to choose a better score other than weighted round-robin.  We'll do the necessary analysis and decide a better score to use on NetScaler.
    Edited by: Voon Siong Lum on Jan 17, 2008 1:51 AM

Maybe you are looking for

  • ECC 6.0 Error : Tax code PA also exists.

    Dear Gurus, We have recently encountered the error in ECC 6.0 during the invoice in which we did not encounter in 4.6C. <b>ECC 6.0:</b> We have created a PO with tax Code as "II". When we do invoice for this PO using Tcode: MIRO, tax code "PA" is pop

  • Getting errors with tag lib using Web Service

    I have created a web service client in my WEB-INF/classes catalogue. Im having problems because i get this error message when I compile: myServices/myCardValidate$Documents/verifyCreditCard_SOAPXML.jsp [-1:-1] This absolute uri (http://java.sun.com/j

  • Quick question ( I think)

    I have written a class of static methods that converts a bunch of stuff (like weight, height, temperature, etc). In another class I am supposed to initialize name, gender, age, height, weight, if the person drinks, smokes, and exercises...I've done t

  • ADDRESS - ENDADDRESS  postal convention

    Hello, I know that the ADDRESS - ENDADDRESS control command formats an address according to the postal convention of the recipient country defined in the COUNTRY parameter. But where in SAP can I find/correct the postal convention for a coutry? Thank

  • I have managed to download Firefox - the first two steps apparently successfully but I cannot seem to drag the icon down to the dock. I use a mac mini. Thank you.

    I have managed to download Firefox - the first two steps apparently successfully but I cannot seem to drag the icon down to the dock. I use a mac mini. Thank you == This happened == Not sure how often == not sure == == User Agent == Mozilla/5.0 (Maci