Updating regions with setDataFromArray()

Hey people,
I have a Spry Region "players" that has a Spry.Data.DataSet "dsPlayers"  that is EMPTY onload
on an unrelated  event I "add" rows to the dataset by first acquring any array of rows currently in the dataset and adding a new row on to it.
I then setDataFromArray(rows) with the new array of rows. My problem is that the spry:region DOES NOT update and list out the data.
here is the code
var dsPlayers = new Spry.Data.DataSet();
//........ on event function { ...
     var rows = dsPlayers.getData();
     var player = {ds_RowID: rows.length, fbid: row['id'], passes:0, defense:0, scored:0, shots:0,  played:0 };
     rows.push(player);
dsPlayers.setDataFromArray(rows);
inside a div spry:region="dsPlayers" .................
<table spry:state="ready" class="fbgreybox">
      <thead>
        <tr>
          <!--<th>Jersey No</th>-->
          <th>Player Name</th>
          <th>Time Played</th>
          <th>Scored</th>
          <th>Passess</th>
           <th>Passes Intercepted</th>
          <th>Shots at Goal</th>
        </tr>
      </thead>
      <tbody>
        <tr spry:repeat="dsPlayers">
          <!--<td>{ds_RowNumberPlus1}</td>-->
          <td><img src="http://graph.facebook.com/{fbid}/picture?type=small"/> <!--{function::getPlayerNameById}--></td>
          <td align="center" valign="middle">{played}</td>
          <td align="center" valign="middle">{scored}</td>
          <td align="center" valign="middle">{passes}</td>
          <td align="center" valign="middle">{defense}</td>
          <td align="center" valign="middle">{shots}</td>
        </tr>
      </tbody>
    </table>
Note that in debugging I see the dataset recieving the data and the regions notification events go off.

the definition for setDataFromArray() is
Replaces the data inside the data set with the row data in the specified array. If the row data does not have a ds_RowID column defined, it will automatically create one and assign an ID that is the equivalent of the row's index within the array.
Developers should be aware that the data set takes ownership of the objects within the array that is passed in. That is, it uses those objects as its row object internally. It does not make a copy of the objects.
By default, this function will trigger a synchronous "onPreLoad" notification, followed by asynchronous "onPostLoad" and "onDataChanged" notifications that are made sometime *after* the function has exited. If developers want these notifications to happen synchronously before the function exits, they can pass a true for the optional 2nd argument to the function. Developers should be aware that synchronous notifications could cause potential notification cycles in complex situations where data sets and regions are used together, so use sync notifications with caution.
Are you guys NOT suggesting that even though the notifications happen after they DON'T affect the regions?

Similar Messages

  • Multi update region with 5 checkboxes - problem in updating

    Hi,
    I have a multi update region with more 5 checkboxes which 2 tables LO & SCLO. LO ID is the unique id for each row.
    1st checkbox - If we select 1st checkbox, I am adding a record to SCLO with LO ID.
    2nd Checkbox - yes/no attribute in SCLO table.
    3rd - 5th checkboxes - T/F attributes in LO table.
    Everything is working well if there is LO ID, because I will have a hidden item for LO ID and process where I am only updating LO and adding SCLO.
    When I add a new LO, the trouble occurs for updating 3rd - 5th ck boxes because there will be null value for all the columns in the row.
    What I did is, I first insert LO and gets LO ID from OUT parameter, sets 3rd - 5th ckboxs as null. Then get the out parameter (LO ID) and tried to update again the LO table which is causing some problem and the code, loops are getting very tricky.
    Is there any easy way to handle this?

    Try waiting, a lot of people are also interested in updating to iOS 5.1 so it's probably server related.
    Hope I helped,
    Simmm

  • Editable region with ecommerce

    Can client without dreamweaver update content in an editable region containing Paypal ecommerce buttons?
    My client wants to be able to update region with seasonal item photo and add to cart button.

    <!-- InstanceBeginEditable name="tracking" --><!-- InstanceEndEditable -->
    We need to update this empty region with content across 300+ pages, but the basic Find & Replace will not do the trick, as this is a locked region within the child page and therefore -- I believe -- is not 'findable'. Aside from manually updating each page with the tracking pixel (groan!), is there an Ace up anyone's sleeve to help me expedite this task?
    Help me understand what you are trying to do, please. The region you show above and are wanting to populate (as I understand it) is not a locked region. It would be completely editable in both template and child pages. However, if what you want is to make changes to a NON-EDITABLE region, you could do that several ways:
    1. Use a server-side include to carry the desired content into the non-editable region. The link to the include would be in the non-editable part of the template, but the include file is still editable.
    2. Use a DW Library item in the exact same way.
    3. Add the desired content in a PHP block at the top of the page, and then just echo it where desired.
    The advantage of method 1 is that you edit one file and upload it, and all 300 pages are changed at the server level. The advantage of method 2 is that you edit one library file, and all pages will also be changed, but then you must upload all 300 pages subsequent to that change. The advantage of method 3 is that it, too, is simple both to implement and to Find/Replace when needed, but again, all changed pages need to be uploaded.

  • Update Content with fade effect - How do I do this in 1.5?

    Hello,
    Just wondering what would be the equivalent code in spry 1.5
    to the following update content with effect code in 1.4?
    function fadeIt(ele,url){
    Spry.Effect.DoFade('apDiv1',{ duration: 500, from: 100, to:
    0, finish: function() {
    Spry.Utils.updateContent(ele, url, function() {
    Spry.Effect.DoFade('apDiv1',{ duration: 500, from: 0, to:
    100 });
    I am a little stumped how to achieve this now that the effect
    code must be BELOW the html region the effect code works on. Any
    help on this would be appreciaed.
    Regards,
    Kiwwwi.

    Hi,
    We have a special article that explains the changes from
    Spry1.4 to Spry 1.5 regarding the effects.
    You can find it
    here.
    Diana

  • Dynamic Refresh Region with APEX 4.0

    Greetings!
    With APEX 4.2, when you want to refresh a region that depends on an page-item-value, there are different ways to submit that item with the dynamic action ("Page Item zu Submit"). But this is not imcorperated in APEX 4.0 yet. Is there a way to work around that? I have tought about an apex.submit({...}) call, but I am not sure, where to insert it, also that would be a.. well... submit, not ajex.
    Thanks for any help,
    so long,
    tobi

    Thanks for the hint, but its still not working. I have another item, that gets the value of the item passed to on key-up event. This works. But no refresh of the region.
    My setup looks like that now:
    Event: Key Release
    Selection Type: Item
    Item: ... an auto complete text field
    Condition: is not null
    True Actions:
    1) Action: Execute PL/SQL Code
    &emsp;Fire on Page Load, Stop exec on error
    &emsp;PL/SQP Code: null;
    &emsp;Page Items to Submit: ... that same autocomplete field
    2) Action: Refresh
    &emsp;Fires on Page Load
    &emsp;Selection Type: Region
    &emsp;Region: ... the report region with the where clause comparing the text field.
    The identical action I created for the Get Focus Event, because that happens, when the user clicks on the dropdown list to select an item, then the text field gets focused again. Thats when I want the report to update.
    Only when I hit the enter key (what I actually dont want to happen, and thats another issue) the page gets submitted. Then the report is displayed with the new selection. But I dont want the user to wait for the page reload process.

  • Update Region Iframe source via javascript

    I have looked at Carls example on showing an iframe within a table. I have a tree of records on left side of page and html region on right.
    I have the iframe html in the region source.
    How can I update this in javascript.
    I tried
    document.getElementById("test").innerHTML = gReturn
    where gReturn has the iframe source.
    it returns javascript error - I am thinking that I can't use innerhtml for my region (named test).
    Any help or direction would be greatly appreciated.
    Peter

    Any takers on this?
    How to update a region with Iframe from a tree?
    Thanks
    Peter

  • More than one multi row update region on one page - how ?

    Hi.
    I have a page on which i want to use two multi row update regions ( updateable report with three buttons like new/delete/save ).
    But i do not find a setting for the MRU-Process oder "Add-New-Line" Process that lets me reference this process to a specific region.
    The problemm is, that after adding the second region to the page, the "Add-New-Line" - process only adds the new line to the second region and not to the first region anymore.
    How can i make two processes where one adds a line to region1 and the second adds to region2. Same question is with updates too. How can i say that process on updates the changes in region1 and the other process updates the changes in region2 ?
    Thanks for help.
    greetings
    bernd

    Unfortunately, the builtin MRU process supports only 1 updatable region per page.

  • Issue in Invoking an Updatable View with Instead of Trigger

    Hi,
    I am trying to insert a record using Updatable View with Instead of Trigger. When i try to save the data, i get the below error:
    java.sql.SQLException: ORA-01403: no data found
    ORA-06512: at line 1
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1075)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3887)
    at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9323)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1508)
    at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:172)
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:432)
    at oracle.jbo.server.EntityImpl.doDMLWithLOBs(EntityImpl.java:8566)
    Can someone help me resolve this issue?
    Also it would be great if you can share Sample codes for Invoking an updatable view with instead of trigger on Save/commit.
    Regards,
    Jeevan

    As a trigger is executed in the db and not in your app it's really hard to help as you did not give any useful information.
    Have you read this blog http://stegemanoracle.blogspot.com/2006/03/using-updatable-views-with-adf.html ?
    Timo
    Edited by: Timo Hahn on 22.09.2011 09:15
    And my friend google also found http://technology.amis.nl/blog/1447/adf-business-components-resfresh-after-insertupdate-and-instead-of-triggers

  • I updated my computer to the new software and now the iPhoto has a circle with a line through it.  When I try to update, it pops up to say "These apps cannot be accepted by your apple id". Then will say "update unavailable with this apple id" how do i fix

    I updated my computer to the new software and now the iPhoto has a circle with a line through it.  When I first try to open it the pop us says: "You can't use this version of the application "iPhoto" with this version of OS X. Version: 9.2.1"  When I try to update, it pops up to say "These apps cannot be accepted by your apple id - These apps were already assigned to another Apple ID and they will be available in that Apple ID's purchases list.  If you don't have access to that Apple ID and want to receive future updates, you will need to purchase the application".  I checked and there is nothing under the "purchases" in my App store.  Then will say "update unavailable with this apple id - This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or canceled." Then the third pop up says "We could not complete your request. There was an error in the App Store.  Please try again".  Just want to know how do to fix.

    After I upgraded to Mavericks I was also having this message when I tried to update. There was a previous post about this problem which offered this simple solution which worked for me:
    b0n0b0
    Re: Recently upgraded to Maverick from SnowLeopard. Unable to get updates from App store.
    Mar 15, 2014 9:05 AM (in response to Terence Devlin)
    Got it! Thanx.  What I did was go to my account, check that they had my new ID and Password which they did, then hit reset button. All fixed.

  • After the most recent FF update, FF 3.6.6 will not load, citing the error message: "XULRunner / Error: Platform version '1.9.2.3' is not compatible with minVersion =1.9.2.6 / maxVersion". Tried updating XULRunner with no luck. Downloaded fresh copy and

    After the most recent FF update, FF 3.6.6 will not load, citing the error message: "XULRunner / Error: Platform version '1.9.2.3' is not compatible with minVersion>=1.9.2.6 / maxVersion". Tried updating XULRunner with no luck. Downloaded fresh copy and installed. Still no luck.
    == This happened ==
    Every time Firefox opened
    == FF updated to 3.6.6 ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    Do a clean reinstall and download a fresh Firefox copy from http://www.mozilla.com/firefox/all.html and save the file to the desktop.
    Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    You can skip the step to create a new profile, that is not necessary for this issue.
    See http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • "Update unavailable with this Apple ID" when trying to update or re-download FREE apps purchased with this same ID

    This morning I tried to update my apps through the app store. Many of them updated, but some (Soundcloud, Evernote, Viber, and IMDB) gave me the error message "Update unavailable with this Apple ID"
    I removed those apps and tried to re-install them, only to receive the same message. I then logged out of the App Store and logged back in but this did not make a difference.
    These apps are not showing up on my "purchased" list.
    I have only ever had one Apple ID, and have been using and updating these free apps for some time now.
    Any idea how I can resolve this? Searching the forums has not helped at all.

    Same problem here. IMDB, TWC (weather app) Goodreader… Started this morning, out of the blue.
    After deleting IMDB (hoping to reinstall), that app cannot be installed again! Trying to, gets you the same “Update unavailable” error.
    Also, the problematic apps are not listed in my “Purchased” list (which is the real problem I think).
    I also tried through iTunes. Same problem.
    Can someone confirm that the problem apps are not showing in your purchased list?
    I don’t know if it’s on Apple’s side (in which case it will get fixed) or on my side (meaning I will have to do something).
    (I contacted Apple, waiting for reply.)

  • Hey, ive recentley got a new phone and im trying to download apps but it wont let me. And when i click download this is what comes up, "Update unavailable with this apple ID.

    Hi, ive recentley got a new iphone 5C. I am trying to download apps on the appstore but it wont let me. It says this: Update Unavailable with this Apple ID.
    This update is not available for this apple ID because it was bought by a different user or the item was refunded or cancelled.
    How do u fix this??

    Apps are forever tied to the AppleID used to download them.
    Either use the original AppleID or delete the app and then download again
    using your current AppleID. You cannot transfer an app from one AppleID to
    another, nor can you merge AppleIDs.

  • How to create the Contribution region with Native document

    HI,
    I have the below scenario to have the Contribution region in my custom page.
    1) I am displaying all Campaign records in primary page.
    2) When I click on each Campaign record, this will take me to secondary page to display the Editable Contribution region assigned with Native document.
    My requirement :
    3) I have 4 more Contribution Regions which will have to relate to the same above said Campaign in secondary page. To achieve this, I have only one contribution region with multiple elements within that region in my secondary page.
    Please let me know how I can add different native documents to 4 different Contribution Regions. Now if I add different document to the region, same document will be assigned to the each region having different elements. Also if I add multiple regions in secondary page, primary page will only point to first region available in that secondary page.
    Please let me know how I can add 4 different native documents to 4 different Contribution Regions available in secondary page. It would be great if any one give idea as soon as possible.
    Thanks in advance.
    Anyone did not come across this type of scenario?
    Thanks,
    Ramesh
    Edited by: Ramesh_Est on Aug 10, 2010 9:35 PM

    The secondary page is used to display a specified content item. One content item, specified on demand. Only one. Period.
    If you want to assign multiple content items to multiple regions, well you're talking about primary pages.

  • Report region with sql query

    Hi
    I have a report region with sql query. There are two regions in page. On top of page, user enters data and after that second region show enterd data which is report region
    based on sql query.
    Now,when this page is opned, as user had not entered any thing, report region shows "no data found" message. Is it possible to remove that message or
    may i conditionally disaply report region i.e if data is inserted then only report region is dispalyed.
    Thanks

    >
    i was trying with select count(1) in expression.
    >
    Just for your info, COUNT() (without any grouping obviously) with always return 1 row. If there are no result for the query then 1 row will be returned with a value of zero - so there are results returned.
    Secondly, why were you using COUNT(1) rather than COUNT(*)? That is is faster is a very common misconception and not true. If you need to know how many rows have been returned, use COUNT(*). If you need to take nulls into account (ie. not include them in your count) then use COUNT(column_name) and name the column that you are interested in specifically.
    Cheers
    Ben

  • MacBook Pro battery had accumulated more than a 1000 charges, and stopped functioning unexpectedly. Went and got the battery replaced. Just saw that SMC Firmware 1.6 update deals with this. Possible to get my money back?

    MacBook Pro battery had accumulated more than a 1000 charges, and stopped functioning unexpectedly. Went and got the battery replaced. Just saw that SMC Firmware 1.6 update deals with this. Possible to get my money back?

    The firmware update corrects an error that may occur, however the techs would have checked the condition of the battery prior to installing a new one.  If the battery was questionable, the firmware update was really not too important.
    You can check the battery condition by going to the apple, left side of the menu bar, About This Mac, More Info, System Report, Hardware, Power and see what it says about Cycle Count, Condition, Capacity: Condition anything but Normal needs to be checked and may need to be replaced.
    The cycle count of 1,000 charge cycles is the typical life of a Lithium-Ion battery, the point at which the capacity drops to 80% of the as built capacity.

Maybe you are looking for