Populating Spry Table using button action and Nested XML

Ah, yet another question.
So I have a catalog page with a Spry repeating table. The XML
has 2 sets of nodes -- one for outfits and one for line sheets (the
technical drawings for clothes). What i want to do is have the
outfits show and populate the table to start off with, but
re-populate with the line sheet info if a user clicks on a button.
currently the page is set up and works perfectly by sucking
in the XML and populating the table. What I can't seem to do is get
the button (when clicked) to switch the outfit info with the line
sheet info.
I have the following
// javascript:
var siracusafall08 = new
Spry.Data.XMLDataSet("fall_collection.xml",
"collection/siracusa/outfits", { filterFunc: MyPagingFunc });
var siracusaLS = new
Spry.Data.NestedXMLDataSet(siracusafall08, "linesheet",
{filterFunc:MyPagingFunc });
siracusafall08.setColumnType("photoURL", "image");
siracusafall08.setColumnType("lrgphoto", "image");
var pageOffset = 0;
var pageSize = 1;
var pageStop = pageOffset + pageSize;
//var dssiracusafall08 = new
Spry.Data.XMLDataSet("fall_collection.xml", "collection/outfits", {
filterFunc: MyPagingFunc });
function MyPagingFunc(ds, row, rowNumber)
if (rowNumber < pageOffset || rowNumber >= pageStop)
return null;
return row;
function chooseLS()
// no idea what to put here...
function UpdatePage(offset)
var numRows = siracusafall08.getUnfilteredData().length;
if (offset > (numRows - pageSize))
offset = numRows - pageSize;
if (offset < 0)
offset = 0;
pageOffset = offset;
pageStop = offset + pageSize;
// Re-apply our non-destructive filter on dsStates1:
siracusafall08.filter(MyPagingFunc);
html
<div spry:region="siracusafall08">
<table>
<tr spry:repeatchildren="siracusafall08">
<td valign="top">{name}<br />{desc}</td>
<td rowspan="8" valign="top" width="300"><img
src="imx/{photoURL}"/></td>
</tr>
<tr spry:repeatchildren="siracusafall08">
<td valign="top">{SKU1}<br />{SKU2}<br
/>{SKU3}</td>
</tr>
<tr spry:repeatchildren="siracusafall08">
<td valign="top"><a href="imx/{lrgphoto}"
target="_blank">enlarge</a></td>
</tr>
<tr spry:repeatchildren="siracusafall08">
<td valign="top"><input type="image"
src="../../imx/back.gif" onclick="UpdatePage(pageOffset -
pageSize);" />
<input type="image" src="../../imx/next.gif"
onclick="UpdatePage(pageOffset + pageSize);" /><br
/><br /><input type="button" value="filter"
onclick="chooseLS();" /></td>
</tr>
<tr>
<td height="200"> </td>
</tr>
</table>
</div>
XML
<collection>
<siracusa>
<outfits>
<photoURL>6648sm.jpg</photoURL>
<lrgphoto>6648lg.jpg</lrgphoto>
<SKU1>JS271SM</SKU1>
<SKU2>PN109SM</SKU2>
<SKU3></SKU3>
<name>Siracusa Micro Crepe</name>
<desc>Chestnut, Moss, Redwood, Black</desc>
</outfits>
<outfits>
<photoURL>5237sm.jpg</photoURL>
<lrgphoto>5237lg.jpg</lrgphoto>
<SKU1>JS272SM</SKU1>
<SKU2>LTK121SM</SKU2>
<SKU3>PW112SM</SKU3>
<name>Siracusa Micro Crepe</name>
<desc>Chestnut, Moss, Redwood, Black</desc>
</outfits>
<outfits>
<photoURL>5540sm.jpg</photoURL>
<lrgphoto>5540lg.jpg</lrgphoto>
<SKU1>JS272SM</SKU1>
<SKU2>LTK121SM</SKU2>
<SKU3>PW112SM</SKU3>
<name>Siracusa Micro Crepe</name>
<desc>Chestnut, Moss, Redwood, Black</desc>
</outfits>
<outfits>
<photoURL>6276sm.jpg</photoURL>
<lrgphoto>6276lg.jpg</lrgphoto>
<SKU1>JL258SM</SKU1>
<SKU2>PN100SM</SKU2>
<SKU3></SKU3>
<name>Siracusa Micro Crepe</name>
<desc>Chestnut, Moss, Redwood, Black</desc>
</outfits>
<linesheet>
<photoURL>5540sm.jpg</photoURL>
<lrgphoto>5540lg.jpg</lrgphoto>
<SKU1>JS128SM</SKU1>
<SKU2>Mandarin collar jacket with box pleat
cuff</SKU2>
<SKU3>XS-XL</SKU3>
<name>Siracusa Micro Crepe</name>
<desc>Chestnut, Moss, Redwood, Black</desc>
</linesheet>
</siracusa>
</collection>
There's nothing in the documentation about using a button to
repopulate a table. the Nested XML Data Sample page in the Spry
documentation has been helpful in the past however this is more of
a switch / toggle situation and frankly that kind of coding is a
bit beyond my fine arts-trained skills.
Any suggestions are greatly appreciated!

Hi Bit Crusher,
Sorry for the delayed response ...
Looking at your setup, you can get rid of most of the code in
collection.js since you are using a pageSize of 1 ... if displaying
only one row of a data set is all you ever need, then you can get
the equivalent functionality by just using a spry:detailregion and
a couple of prev()/next() functions. For example:
<script type="text/javascript">
var siracusafall08 = new
Spry.Data.XMLDataSet("fall_collection.xml",
"collection/siracusa/outfits");
siracusafall08.setColumnType("photoURL", "image");
siracusafall08.setColumnType("lrgphoto", "image");
var crepesfall08 = new
Spry.Data.XMLDataSet("fall_collection.xml",
"collection/crepes/outfits");
crepesfall08.setColumnType("photoURL", "image");
crepesfall08.setColumnType("lrgphoto", "image");
function DSPrev(ds)
var curRowNum = ds.getCurrentRowNumber();
if (--curRowNum >= 0)
ds.setCurrentRowNumber(curRowNum);
function DSNext(ds)
var curRowNum = ds.getCurrentRowNumber();
if (++curRowNum < ds.getRowCount())
ds.setCurrentRowNumber(curRowNum);
</script>
<div spry:detailregion="siracusafall08">
</div>
<div spry:detailregion="crepesfall08">
</div>
After you've simplified all that, the next thing I would do
to get your linesheet switching working is to use "states". Take a
look at these samples:
http://labs.adobe.com/technologies/spry/samples/data_region/RegionStatesSample.html
http://labs.adobe.com/technologies/spry/samples/data_region/StateMappingSample.html
The first link is some basic background on states, but what
should be of interest to you is the 2nd sample. What I would do is
have a "styles" and a "linesheet" state in my region.
Also since you are using nested XML data, you will need to
access your <linesheet> data with a NestedXMLDataSet:
http://labs.adobe.com/technologies/spry/samples/data_region/NestedXMLDataSample.html#Using NestedDataSets
http://labs.adobe.com/technologies/spry/samples/data_region/NestedDataSample.html
--== Kin ==--

Similar Messages

  • ADOBE DPS - MAGAZINE to TABLET in INDESIGN.....Need to brush up my tablet design in DPS (did it a few yearscback), can anyone recommend on the Adobe site tutorials that I can download, with artworks /buttons / actions and put it together?

    ....Need to brush up my tablet design in DPS (did it a few years back), can anyone recommend on the Adobe site tutorials that I can download, with artworks /buttons / actions and put it together?

    See this forum post here from Bob. Best place to learn DPS is on Adobe TV http://tv.adobe.com/product/digital-publishing-suite/
    If you are specifically looking to learn how to create interactive overlays, go here http://helpx.adobe.com/digital-publishing-suite/help/overview-interactive-overlays.html Watch the videos on "Folio Overlays panel, Part I & Part II"

  • I'm having an issue displaying a button using advanced actions and rollover slidelets.

    I'm having an issue getting a button to display after the learner places his mouse over three different rollover slidelets which are all on the same slide. I created three variables and assigned each to the rollover slidelets. I also created a conditional action that I assigned to the slide. The variables are set to zero and then the action is to assign the variable with 1 after it's rolled over. The conditional action says that once all three variables are equal to 1, show the button and continue. Unfortunately the button is not displaying after the three rollovers have been viewed. Any insight?

    I can only suspect what is going wrong, it would have been a lot easier if you did show those actions.
    My suspicion is due to this sentence '... a conditional action that I assigned to the slide'? There are two slide events: On Enter, and On Exit. Read more about those events:
    http://blog.lilybiri.com/events-and-advanced-actions
    Those events can trigger an advanced action but only at that frame: first frame (On enter), last frame of the slide. But you expect the button to appear when the three rollover events have occurred? That means the condition has to be checked by each action triggered by the rollover events. Have multiple examples on my blog for such use cases, latest one was:
    http://blog.lilybiri.com/blog-after-posterous-clickclick
    Shortly:
    Use the On Enter event of the slide to reset the three variables to zero, that will be a standard advanced action with three Assign statements (this is not necessary if you never expect the user to return to that slide)
    Use each Rollover event to trigger a conditional advanced action with two decisions:
    First decision 'Always' will be a mimicked standard action, and toggles that variable to 1
    Second decision 'Checkit' will have your condition to see if the three variables are equal to 1, if Yes show the button, if No, nothing has to happen (or maybe Continue, depends on setup)
    Lilybiri

  • Button actions and Paste into

    Hi,
    working with the new InDesign CC, I'm somewhat disappointed that the paste into bug, where the button actions are going to be lost if you paste a group of objects/frames into another frame (ex.: go to state action), still exists. The same if you take a group out of a frame with simple cut feature. I know this is a more InDesign related bug and was already reported several times. But as this feature is mainly used for scrollable content and is part of  a very immature scrollable content creation workflow, I've decided to post it here in this forum.
    Why not making it as other DPS systems. The content of the scrollable frame is placed in a separate document (with links, actions, videos, ...) and you have to import this separate document as link into a frame. This would make updating the content a lot more easy as always cut, make changes, paste into again, recreate actions, ...
    Thanks and kind regards,
    Yves

    I agree it's annoying but it's not a DPS issueŠit's an InDesign issue. I've
    reported and I suggest everyone else do the same:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Bob

  • Create Table using DBMS_SQL package and size not exceeding 64K

    I have a size contraint that my SQL size should not exceed 64K.
    Now I would appriciate if some one could tell me how to create a table using
    Dynamic sql along with usage of DBMS_SQL package.
    Brief Scenario: Users at my site are not given permission to create table.
    I need to write a procedure which the users could use to create a table .ALso my SQL size should not exceed 64K. Once this Procedure is created using DBMS_SQL package ,user should pass the table name to create a table.
    Thanks/

    "If a user doesn't have permission to create a table then how do you expect they will be able to do this"
    Well, it depends on what you want to do. I could write a stored proc that creates a table in my schema and give some other user execute privilege on it. They would then be able to create a able in my schema without any explicitly granted create table privilege.
    Similarly, assuming I have CREATE ANY TABLE granted directly to me, I could write a stroe proc that would create a table in another users schema. As long as they have quota on their default tablespace, they do not need CREATE TABLE privileges.
    SQL> CREATE USER a IDENTIFIED BY a
      2  DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
    User created.
    SQL> GRANT CREATE SESSION TO a;
    Grant succeeded.
    SQL> CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10));
    CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10))
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'USERS'So, give them quota on the tablespace and try again
    SQL> ALTER USER a QUOTA UNLIMITED ON users;
    User altered.
    SQL> CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10));
    Table created.Now lets see if it really belongs to a:
    SQL> connect a/a
    Connected.
    SQL> SELECT table_name FROM user_tables;
    TABLE_NAME
    T
    SQL> INSERT INTO t VALUES (1, 'One');
    1 row created.Yes, it definitely belongs to a. Just to show that ther is nothing up my sleeve:
    SQL> create table t1 (id NUMBER, descr VARCHAR2(10));
    create table t1 (id NUMBER, descr VARCHAR2(10))
    ERROR at line 1:
    ORA-01031: insufficient privilegesI can almost, but not quite, see a rationale for the second case if you want to enforce some sort of naming or location standards but the whole thing seems odd to me.
    Users cannot create tables, so lets give them a procedure to create tables?
    John

  • Query on populating existing table using denormalized data

    Hi All,
    struck in a bad situation :(
    Please see if you can assist..
    Scenario:
    I have data in a flat file which needs to be imported to oracle.. I am doing it using external table.. working fine..
    the data is like:
    cust1~currency1(e.g USD)~interest(e.g. 10)~2009
    cust2~currency2~interest~year
    cust1~INR~interest~2009
    i need to populate 2 tables using this:
    tab1(cert_id,custno, currency)
    tab2(cert_id, interest, currency) .. cert_id is a foreign key referring to tab1
    cert_id is a existing sequence which i am using
    Now the issue is if i directly load data in these two tables by fetching through a cursor..
    it creates two rows in tab1 with different certificate ids for a particular year which is incorrect..
    it should be one tax certificate per customer per year..
    Can anyone please just provide a hint or something.. (data volume is aroun 100,000)
    please let me know if you are unable to understand the scenario....

    No four digit Oracle version was included: too much work.
    No platform was included: too much work
    The erroneous code was not included: too much work
    The request consists basically of 1 line: It does't work. pls suggest.
    Yet another request, where the requestor wants maximum help with no effort on his side.
    How can anyone understand this 'scenario'?
    We are not in a chat room, your webcam is not switched on, and no one is looking over your shoulder.
    Sybrand Bakker
    Senior Oracle DBA

  • Button Action and Table Visibility

    Hi,
    I have created a Submit button and a table UI.
    Requirement is
    1) Intial deployment button and table should be visible (its working fine)
    2) if i click on Submit Button, Table UI should not be visible (its working fine)
    3) if once again i click on Submit Button if Table should be visible ( How to implement this).
    i.e on Action of submit button if table is already visible it should invisible and viceversa.
    Please help.
    Regards,
    Bharath

    Hi Bharath,
        Action button code
    if(tableFlag = true)
      tableFlag = false;
    else
      tableFlag = true; 
    DoModifyView Code:
    if(tableFlag = true)
       wdContext.currentContextelement.setVisible (WDVisibility.VISIBLE);
       tableFlag = true;
    else
      wdContext.currentContextelement.setVisible (WDVisibility.NONE);
      tableFlag = false;
    Declare it static in bottom
    tableFlag = false;
    I try to do work around like this
    Regards, Suresh KB

  • Query hangs using db link and nested table collection

    Hi,
    I have a stored procedure which takes, as input, a string of values that can vary in length. The input is used as an IN operator within the queries that exist within the proc:
    Code:
    PROCEDURE get_contacts (i_customerids IN VARCHAR2)
    an example of the input would be: '987451',412897' or '7541256','75412','95412589'
    In order to process the dynamic "In-List", I created a custom collection type to convert the string to a table:
    Code:
    CREATE OR REPLACE
    TYPE stringtotable AS TABLE OF VARCHAR2(3900)
    (I've also tried the solutions on http://tkyte.blogspot.com/2006/06/varying-in-lists.html and http://fdegrelle.over-blog.com/article-1694534-6.html for handling dynamic in-lists and they also hang)
    The proc contains 2 queries, the first returns records from a table within the current database:
    Code:
    SELECT *
    FROM contacts
    WHERE customer_id IN (
    SELECT *
    FROM TABLE (stringtotable (i_customerids
    The second query returns records from a database that is defined via a db link:
    Code:
    SELECT b.customer_id, a.row_id, a.fst_name, a.last_name
    FROM userlist.customers@uldblink a, userlist.firms@ulbdlink b
    WHERE a.parent_id = b.row_id
    AND b.customer_id IN (
    SELECT *
    FROM TABLE (stringtotable (i_customerids
    The first query is executing without issue. The second query, however, is hanging indefinitely. Additionally, If I hard code the string in the IN operator, the second query executes without issue.
    I am not the DBA for the database, so I don't currently have access to the trace logs. I've requested access to the trace logs to see if I can figure out what is hanging.
    In the meantime, I was hoping someone would be able to tell me if
    a: there is a better way to handle "dynamic in- lists".
    or
    b: if there is something obvious that I'm not considering.
    Thanks for your help,
    Fielding
    Message was edited by:
    fwilson

    Hi Todd,
    Thanks for the suggestion. I was not aware of the cardinality hint.
    I tried adding it to my query but unfortunately the query still appeared to hang. It did get me thinking though... that maybe the stringtotable collection type is creating the table in memory, and therefore its records aren't accessible to the dblink
    so I inserted the values that were being returned via the stringtotable collection type into a physical table named TestTable. I then modified my query to select the values from TestTable.
    Code:
    ...in (select /*+ cardinality(t 3) */ t.*
    from testtable t)
    This worked.
    So that poses the questions-
    a: is my assumption about the in-memory table correct
    and
    b: if so is there a way around it?
    Thanks for your help

  • Spry menubar and nested xml

    I'm need some help to create a nested spry menu. I use a xml
    file dynamically created

    yes and no, the problem is when I create the xml file from a
    DB whit export recordset as xml I get a xml file structure looking
    like this
    menu1
    submenu1
    menu2
    submenu2
    instead of
    menu1
    submenu1.1
    submenu1.2
    menu2
    submenu2.1
    menu3
    menu4
    Is the a way to make the xml file this way from a DB. My DB
    looks like this (mySQL)
    topic table
    id_top
    name_top (menu item)
    article table
    id_art
    name_art (submenu)
    content_art

  • How to find out what is populating a table using sql

    I would like to find out what is populating a particular tabe. I used
    select name,type from dba_source where text like upper('%some_table%'). I know this will give me procedure,function package etc, If this table is being populated by a form how will i get the form name. I am using window XP oracle 10G database

    IF you to check what is running at a precisly momemmt you need to Join :
    v$transaction a, Gives you current Transaction going On
    v$session b, Gives You info about session User
    v$sql c Gives you info about SQL Running at Precisly momment
    With these Condition you are able to Find what's is Runnimg
    where a.SES_ADDR= b.SADDR (+) and
    b.SQL_HASH_VALUE = c.HASH_VALUE(+)
    I Hope This May help.
    Rgds

  • Move rows within a table using buttons

    Hello Guys,
    I am trying to create a dynamic table and I have been trying to figure out how best to do it. Here are my requirements
    1) The table will have 12 rows, the number of rows will not change.
    2) The table will have 2 columns.
    3) The point of the table is for the user to reorder based on priority.
    4) The data must persist when saved (this one i know how to do).
    I have been creating a subform around a row and adding a up and down arrow buttons to each one. I was going to use a moveinstance command but I don't quite understand how the indexing will work.
    If you guys have a better suggestion or an example, i would really appreciate it.
    Thanks,
    roger.

    Hi,
    Repeatable objects have a zero-based numbering system. So Row1 with 12 instances, would look like Row1[0], Row1[1], ... Row1[11].
    So the following Javascript would move the row up:
    if (Row1.index != 0)
         var nIndexFrom = Row1.index;
         var nIndexTo = Row1.index - 1;     
         _Row1.moveInstance(nIndexFrom, nIndexTo);     
    else
         xfa.host.beep("3");
    A similar script would move the row downwards. Note I have used Row1.index, you could also use this.parent.index if the button is in the row. If it is buried in subforms, you may need this.parent.parent.index, to get to the instance of the repeating object.
    Hope that helps,
    Niall

  • Binding for table produces list for other tables using foreign key and crea

    Using
    software Jdev 11G, WLS 11G, Oracle DB 11G, Windows Vista platform
    technology EJB 3.0, jspx, backing beans, session bean
    I cannot create a namedquery on my secondary table. The method for the column uses the entity object rather than the name and value of the column.
    For instance,
    (Coketruck) table has inventory records(Products) table
    Coketruck has one to many to the Products table
    Products has a many to one to the Coketruck
    I need to return the products from the product table based on the CokeTruck but I cannot create a namedQuery because the method in the Product table is an entity object type instead of a long that I can use to look up all the products based off the column truck_id.
    This is what I was expecting…
    Private Long truckId;
    public Long getTruckId() {
    return truckId;
    public void setTruckId (Long truckId) {
    this. truckId = truckId;
    Instead this is what I have…
    @ManyToOne
    @JoinColumn(name = "TRUCK_ID")
    private Coketruck coketruck;
    this. coketruck = coketruck
    public Coketruck getCoketruck() {
    return coketruck;
    public void set Coketruck (Coketruck coketruck) {
    this. coketruck = coketruck;
    How do I do a query on the Product table to return all the products that are in the coketruck?
    If I do the following it expects for me to pass the Entity Object which I cannot use as search criteria for my find method.
    @NamedQuery(name = "Products.findById", query = "select o from Products o where o.truckId = :truckId")
    On a different note but the same song…
    I noticed that when I look at my Session Bean Data Contols that the coketruck already has a list of the products. I have created a jsp page with a backing bean and have been able to use the namedquery on the coketruck entity to retrieve the productList. Unfortunately I need to sort the products by type and was also not able to find where to perform the work to be able to iterate through the productList to get my desired display. Therefore I started looking at doing another namedquery that would only retrieve the product_type ordering by the truckId.
    Seems I have come full circle… I don’t care what method I have to use to get the info back.
    Any help is greatly appreciated!

    user9005175 wrote:
    Hi!
    I work on an application wich uses a shopping cart stored in a database. The shopping cart uses two tables:
    CART: Holds information common for one shopping cart: the user it is connected to etc.
    - Primary key: CART_ID
    CART_ROW: One row in the cart, e.g. one new product to buy.
    - Primary key: ROW_ID
    - Foreign key: CART_ROW.CART_ID references CART.CART_ID
    From the code the rows in the cart are collected per cart, as is modelled by the foreign key. There exists one more relationship, which we use in the code, but which is not modelled by a foreign key in the database. One row can be dependent on another row, which makes the other row a parent.
    CART_ROW has a column PARENT_ID which references CART_ROW.ROW_ID.
    Should we add a foreign key for PARENT_ID? Or are there any questions to consider when it is a foreign key to the same table?
    I suggest to add foreign key it wont harm the performance (except while on insert when there would be validation for the foreign key). But it would prevent users to insert wrong/corrupt data either through code or directly by loggin in the database.
    A while ago we added indexes, both on ROW_ID and on PARENT_ID. Could the index on PARENT_ID have been harmful, since there is no foreign key?
    Index on parent_id would only be harmful if you do not make use of index after creating it (i.e. there is no query which make use of this index).
    And if you decide to have a foreign key on parent_id then I suggest to have index too on parent_id as it would be helpful atleast when you delete any record in this table.
    Best regards!

  • How to Create Table Using Column Drag and Drop Feature

    Hi:
    I am new to Oracle SQL dev Data Modeler tool and would like to know if there is a way to create a new table by re-using the existing columns or column groups. The idea is to maintain consistency and save table design time. If columns created previously can be re-used and require drag and drop of column in the right pane, then only new columns need to be manually created.
    Any thoughts on this will be appreciated.
    Thanks!

    Hi Kent
    I checked out the video and tried it in Oracle designer, it works and works great!
    My other question is that I may have several set of columns that I may want to group depending on the table requirements. Can I have multiple templates and choose which one to apply to?
    Also, how do I choose the table where the table template needs to be applied. As I may be interested in applying the table template to selected tables only.
    Thanks
    Edited by: user648132 on Feb 20, 2012 10:47 AM

  • Populating Text Field using Dynamic Actions is not working

    I've a Select List (P14_ACCOUNT) and Text Field (P14_BILLING_ADDRESS_1) on a form. On selecting a value on the Select List, I've to populate the Text Fields by fetching its values from the database by using the Select List value as the primary key. To do this, I created a Dynamic Actions (Advanced) on the Select List, with event onchange and Set Value as SQL. However this is not working.
    Below are the sqls of Select List and Dynamic Action respectively:
    select ACCOUNT_NO || ' - ' || COMPANY_NAME display_value, ACCOUNT_ID return_value
    from ACCOUNT
    order by 1
    select a.address1 from account a where a.account_id = :P14_ACCOUNTNow when I substitute the Dynamic Action sql with any of the below sqls, the value shows up:
    select address1 from account where account_id = 41
    select address1 from account where rownum=1
    select user from dualI thought of seeing the value of :P14_ACCOUNT in session or debug, but session does not show any value and on clicking debug it throws a popup message "Debugging is not enabled for this application."
    I've been trying since few hours but with no luck. How can I debug further?
    Thanks for the help.
    --Hozy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hozy,
    Take alook at your application on apex.oracle.com
    The session state for items, when SQL is used, is set using the Page Items to Submit parameter as has been set in your application.
    Regards,

  • ADF 11g - Refreshing adf:Table using af:poll and ValueExpressions

    Hi,
    I am trying refresh an ADF Read-only table with the af:poll component.
    I could see the System.out message in console and Browser activity (refreshing) because of af:poll method.
    But, the values are not getting updated until I refresh the page manually and removing the "?_adf.ctrl-state=1228194074_3" part from the Browser URL.
    Please find the code which I am using:
    System.out.println("Updating table");
    FacesContext fctx = FacesContext.getCurrentInstance();
    *ValueBinding dcb = fctx.getApplication().createValueBinding("#{bindings}");*
    DCBindingContainer bindings = (DCBindingContainer)dcb.getValue(fctx);
    DCIteratorBinding dciter =bindings.findIteratorBinding("DepartmentsIterator");
    Key current_row_key = dciter.getCurrentRow().getKey();
    dciter.executeQuery();
    dciter.setCurrentRowWithKey(current_row_key.toStringFormat(true));
    Also, I could see createValueBinding / ValueBinding is deprecated and replaced by ValueExpression.
    Is this causing any issues or is there any working sample of the same in ADF 11g.
    thanks & regards,
    S.Vasanth Kumar.
    JDev Studio Edition Version 11.1.1.0.1
    Build JDEVADF_MAIN.BOXER_GENERIC_081203.1854.5188
    Edited by: vasanth.s.kumar on May 6, 2009 10:06 PM

    Thank you for the help.
    But, I am getting NullPointerException after implementing the following code.
    RequestContext.getCurrentInstance().addPartialTarget(this.getTable1());
    RequestContext.getCurrentInstance().addPartialTarget(this.getTable2());
    +"java.lang.NullPointerException+
    +For more information, please see the server's error log for+
    +an entry beginning with: Server Exception during PPR, #4"+
    Please find the complete stack trace attached.
    Inside EmployeesBean
    Updating table
    May 6, 2009 10:34:05 PM oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator handleError
    SEVERE: Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
         at com.sun.el.parser.AstValue.invoke(AstValue.java:161)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1264)
         at org.apache.myfaces.trinidad.component.UIXPoll.broadcast(UIXPoll.java:98)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:640)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:275)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:102)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:149)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl._getNearestPPRTarget(RequestContextImpl.java:770)
         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.addPartialTarget(RequestContextImpl.java:487)
         at nl.whitehorses.coherence.view.backing.EmployeesBean.refreshTable(EmployeesBean.java:105)
         at nl.whitehorses.coherence.view.backing.EmployeesBean.onPoll(EmployeesBean.java:110)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         ... 38 more
    thanks & regards,
    S.Vasanth Kumar.

Maybe you are looking for