Limiting the number of returned rows in an HTML data set

I have a data set that is displayed and sorted by a hidden 'hits' field that is updated based on popularity.  My table has about 40 entries, but I want only the first 10 results to show.
How would I go about doing this?
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
     Spry.Utils.setInnerHTML = function(ele, str, preventScripts){Spry.$(ele).innerHTML = str;};
</script>
<script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
var PrankDialerLibrary = new Spry.Data.HTMLDataSet("SpryAssets/library.html", "pdLibrary", {sortOnLoad: "hits", sortOrderOnLoad: "descending"});
PrankDialerLibrary.setColumnType("preview", "html");
PrankDialerLibrary.setColumnType("info", "html");
PrankDialerLibrary.setColumnType("filename", "html");
//-->
</script> --- <div class="MasterDetail">
     <div spry:region="PrankDialerLibrary" class="MasterContainer">
          <div class="MasterColumn" spry:repeat="PrankDialerLibrary" spry:setrow="PrankDialerLibrary" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected" align="left">{preview}  {name}</div>
          </div>
          <div spry:detailregion="PrankDialerLibrary" class="DetailContainer">
               <div class="DetailColumn">{info}</div>
               <div class="DetailColumn">{filename}</div>
          </div>
          <br style="clear:both" />      </div></div>
Thanks!

Ansered my own question.  Simply adding
spry:test="{ds_RowNumber} < 10" 
to the MasterColumn div did the trick!

Similar Messages

  • OCI8 OCIStmtFetch() the number of processed rows

    Hello,
    Would someone help me, please.
    How may I get the number of returned rows at the end of the table after OCIStmtFetch() for multiple rows?
    The OCI7 function ofen() returns the number of processed rows.
    Thanks.
    null

    Simon
    For  deleting significant number of rows best practice is to delete rows in small batches of known size (e.g. 10 K) inside a while loop. 
    This keeps transaction log from filling up as well.
    Also between two iterations of delete you can give some wait to make sure that you do not monopolize the server. Sleep could be for a fixed number of seconds (e.g. 5) or for randomized number say from 1 to whatever makes sense.
    Typically "set rowcount " is used to set up the batch size and "waitfor delay" to sleep between iterations.
    Global variable @@rowcount gives yo actual rows deleted. For the last batch this may be lower than the batch size you set up.
    HTH
    Avinash

  • Restrict the number of output rows

    I'm using Crystal XI. 
    Is there a way to restrict the number of ouput rows comparable to a SQL "Set Rowcount" command?  If so, I would appreciate the instructions.
    Thanks.

    I don't think their is a way to do it through the select expert, but it's easy enough to suppress any records beyond a defined number through the section expert:
    recordnumber > 5
    Any records after 5 are suppressed.

  • After upgrading to Firefox 8.0.1, now on at least one website I use, it limits the number of characters that I can type in a text box to 275, is there a way to fix this?

    After upgrading to Firefox 8.0.1, now on at least one website I use, it limits the number of characters that I can type in a text box to 275, is there a way to fix this?

    That may be part of the coding that the web page is using.
    *https://developer.mozilla.org/en/HTML/element/input

  • In this iPhone is activated limiting the number of free accounts

    I would like to use on your iphone 4s ICloud, but when I try to run ICloud appears in this iPhone is activated limiting the number of free accounts. What do I do? p.s( Sorry for the broken English)

    Make the accounts on a computer. I believe the iPhone is limited
    to creating 3 accounts.

  • How to retrieve the number of "free" rows in a table?

    Hi,
    if in a client only environment (no sync to mobile server) rows are inserted and deleted into a table,
    is there a way to retrieve the number of "free" rows in a table? Number of "Free" rows stands for
    number of rows that can be inserted again, before the table extents in size.
    Is there a way in OLite 10.3.0.2.0 to retrieve the size of tables and indexes? ALL_TABLES is not
    a place that really works.
    Best regards and many thanks,
    Gerd

    Hi Gary,
    many thanks, the partner uses a Lite client db without sync. The db runs inside an laboratory device and collects measures. There must be a way to estimate the the number of "measures" rows, that stil can be stored in the db.
    Than we need to make the deleted space available for new rows. The partner tested defrag.exe and found that it
    needs very long time to run, especially if the db is bigger than 2GB. ... and that this run sometimes fails.
    Is there any recommendation the partner can follow on?
    Thanks,
    Gerd

  • HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?

    HI.
    HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
    GABRY =)

    You need to use
    data : grid1  type ref to cl_gui_alv_grid.
      call method grid1->get_selected_rows
        importing
          et_index_rows = i_sel_alvrows[].

  • What limits the number of MII connections to Oracle.

    We are using MII 12.0.5 and an Oracle database and are seeing errors in the logs to the effect:
    SQL error occurred on connection jdbc:oracle:thin:@mii001:1527:SMD: code=0, state="null", message="Listener refused the connection with the following error:
    ORA-12518, TNS:listener could not hand off client connection
    The Connection descriptor used by the client was:
    mii001:1527:SMD
    I am ot an Oracle expert and I have not seen this issue before. What is limiting the number of connections? Is this a MII configuration issue that I am not aware of or an Oracle database issue?

    Hello sparks,
    I assume you are getting this error when you are trying to connect to databse while configuring Dataservers in MII,if fo what are the value you passed in the fields PoolMax and PoolSize while connecting to the database.
    Regards,
    Kumar
    Edited by: Sudhir Kumar Shambana on May 6, 2010 10:50 AM

  • Server Administrator has Limited the Number of Items You Can Open Simultaneously

    Over the weekend, we moved all of our room mailboxes over to Exchange. For users who have lots of room calendars open in their Outlook clients, they are getting the error message "Cannot Open the free/busy information. You Server Administrator has Limited
    the Number of Items You Can Open Simultaneously" after the migration from Exchange 2010.
    Restarting the Outlook client temporary fixes the problem, but the problem comes back after they access the calendars again.
    The users impacted deal with a lot of room scheduling, so they have 30+ room calendars open in their Outlook clients.
    I have tried setting up a throttling policy with unlimited RCA connections, but that didn't help.
    I have seen with Exchange 2010 there were some registry keys people were setting on the server that pretty much makes everybody have unlimited connections, but that isn't ideal if's only affecting a few people.

    Hi,
    Since this issue only occurs to a few users, I recommend you disable all the third-party applications on Windows, especially for the desktop search apps. Meanwhile, use Outlook safe mode to disable all the add-ins and check if the issue persists.
    If the issue persists, you need to reset the value of Maximum Allowed Sessions Per User. Besides, we can't set it for only some specified users.
    Here is a thread for your reference.
    Event 9646, MSExchangeIS - Mapi session exceeded the maximum (Note: Though it is Exchange 2010, it also applies to Exchange 2013 about this issue)
    https://social.technet.microsoft.com/Forums/exchange/en-US/91922b60-38b7-4af3-ba13-3b44949cc9f7/event-9646-msexchangeis-mapi-session-exceeded-the-maximum-exchange-2010-sp1-w-update-roll-up-2?forum=exchange2010
    Hope this can be helpful.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • How to count the number of Fridays and Saturdays between two dates

    Hi every one ... If we want to count the number of Fridays and Saturdays between two dates, how would we do that ? !
    Dates are ( 11-Feb-2010) to (19-May-2010)
    how to do it in SQL
    Edited by: khalidoracleit on Jul 28, 2010 5:51 AM

    some nice coding here, I'm still amazed with what some people can do with "connect by". But I agree with some statements here that this can take "time", and to be honest, it's funny to see it working, but if you do not have a computer, just a calendar and some paper, would you go for "counting" so there must be a better solution?
    The best working math in here is done by Aketi Jyuuzou, who writes so good English that I wonder why he still insists that he doesn't ;-)
    Anyhow I "translated" that code to English, and I really like that math. Math is math and data is data.
    ALTER SESSION SET NLS_DATE_LANGUAGE='ENGLISH';
    WITH my_dates AS (
    SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100519','yyyymmdd') end_date FROM DUAL
    UNION ALL
    SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100214','yyyymmdd') end_date FROM DUAL
    UNION ALL
    SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100213','yyyymmdd') end_date FROM DUAL
    UNION ALL
    SELECT to_date('20100211','yyyymmdd') start_date,to_date('20100212','yyyymmdd') end_date FROM DUAL
    SELECT to_char(start_date,'DD.MM.YYYY') start_date,to_char(end_date,'DD.MM.YYYY') end_date,
           to_char(start_date,'DAY') start_weekday,to_char(end_date,'DAY') end_weekday,
           end_date-start_date day_difference,
           (next_day(end_date,'FRIDAY')-7
           -next_day(start_date -1,'FRIDAY'))/7+1
           +(next_day(end_date,'SATURDAY')-7
           -next_day(start_date -1,'SATURDAY'))/7+1 as count_of_fr_and_sat
    FROM my_dates;
    START_DATE END_DATE   START_WEEKDAY                        END_WEEKDAY                          DAY_DIFFERENCE         COUNT_OF_FR_AND_SAT   
    11.02.2010 19.05.2010 THURSDAY                             WEDNESDAY                            97                     28                    
    11.02.2010 14.02.2010 THURSDAY                             SUNDAY                               3                      2                     
    11.02.2010 13.02.2010 THURSDAY                             SATURDAY                             2                      2                     
    11.02.2010 12.02.2010 THURSDAY                             FRIDAY                               1                      1                      -- andy

  • Limiting the number of rows returned by SQL or ResultSet

    Hello,
    I'm trying to limit the number of rows that my application receives to a user-specified value. The user is asked how many accounts they want returned and I want to limit my ResultSet to this amount. I'd prefer to set up the SQL to do this if possible rather than waste time returning more records than necessary to the ResultSet.
    If it's not possible to limit the SQL, how can I limit the number when processing the ResultSet?
    Or, is there any way to setup a cursor in JDBC without being able to use Stored Procedures?
    I'm going up against DB2 using DB2Connect.
    Thanks!

    It's not surprising that you are confused because the documentation doesn't bother to explain what the "fetch size" actually is, it just says that setFetchSize sets it and getFetchSize gets it. As I understand it from some other documents I read about JDBC, the fetch size is a number that may be used internally by the JDBC driver. Here's an example of how I understand it (others, I know you will feel free to correct me if you disagree):
    When the driver produces a result set with a very large number of records, it has to generate those records and deliver them to the system that requested them. If the database is not on the same system, then those records must all travel over the network. It could be a performance problem if you had to wait for (say) 80,000 records to travel across the network. Enter the fetch size. If you set the fetch size to 100, then the driver will bring the records across in batches of 100, as the program calls for them. Now, this buffering is transparent to your program; the driver doesn't tell you that it's getting another batch and you can't tell it to get another batch. So it is not a solution to the problem that everybody has here, namely how to display your records 10 per page and allow the user to go back and forth among those pages, like search engines do.

  • Using DBMS_APPLICATION_INFO.SET_MODULE to get the number of updated rows.

    hi.
    i have 2 tables to sync so i use the following code. however i included DBMS_APPLICATION_INFO.SET_MODULE to track the number of rows to be updated, but its not showing in v$sessions view. can anyone tell me what am i missing over here ?
    DECLARE
    l_count NUMBER (20, 0) := 0;
    l_updates NUMBER (20, 0) := 0;
    l_inserts NUMBER (20, 0) := 0;
    BEGIN
    FOR i
    IN (SELECT date_value,
    book_id,
    amount
    FROM bookstore.book_master_transit)
    LOOP
    BEGIN
    UPDATE bookstore.book_master
    SET amount = i.amount
    WHERE date_value = i.date_value
    AND book_id = i.book_id;
    IF (sql%ROWCOUNT > 0)
    THEN
    BEGIN
    l_updates := l_updates + 1;
    END;
    ELSIF (sql%ROWCOUNT = 0)
    THEN
    BEGIN
    INSERT INTO bookstore.book_master (     date_value, book_id, amount)
    VALUES (i.date_value, i.book_id, i.amount);
    l_inserts := l_inserts + 1;
    END;
    END IF;
    l_count := l_count + 1;
    DBMS_APPLICATION_INFO.set_module ('sync_book_info','total = '|| l_count|| '; updates = '|| l_updates|| '; inserts = '|| l_inserts);
    IF (MOD (l_count, 1000) = 0)
    THEN
    COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL;
    END;
    END LOOP;
    COMMIT;
    END;
    when i query v$sessions after running this i couldnt find any entry with the value 'sync_book_info' as the module name. please advice me what i am doin wrong and how to do it right..
    thanks in advance,
    noviceDBA

    novicedba wrote:
    hi.
    i have 2 tables to sync so i use the following code. however i included DBMS_APPLICATION_INFO.SET_MODULE to track the number of rows to be updated, but its not showing in v$sessions view. can anyone tell me what am i missing over here ?
    DECLARE
    l_count NUMBER (20, 0) := 0;
    l_updates NUMBER (20, 0) := 0;
    l_inserts NUMBER (20, 0) := 0;
    BEGIN
    FOR i
    IN (SELECT date_value,
    book_id,
    amount
    FROM bookstore.book_master_transit)
    LOOP
    BEGIN
    UPDATE bookstore.book_master
    SET amount = i.amount
    WHERE date_value = i.date_value
    AND book_id = i.book_id;
    IF (sql%ROWCOUNT > 0)
    THEN
    BEGIN
    l_updates := l_updates + 1;
    END;
    ELSIF (sql%ROWCOUNT = 0)
    THEN
    BEGIN
    INSERT INTO bookstore.book_master (     date_value, book_id, amount)
    VALUES (i.date_value, i.book_id, i.amount);
    l_inserts := l_inserts + 1;
    END;
    END IF;
    l_count := l_count + 1;
    DBMS_APPLICATION_INFO.set_module ('sync_book_info','total = '|| l_count|| '; updates = '|| l_updates|| '; inserts = '|| l_inserts);
    IF (MOD (l_count, 1000) = 0)
    THEN
    COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL;
    END;
    END LOOP;
    COMMIT;
    END;
    when i query v$sessions after running this i couldnt find any entry with the value 'sync_book_info' as the module name. please advice me what i am doin wrong and how to do it right..
    Totally, 100%, remove & eliminate entire EXCEPTION handler.
    Then you will be able to see error being RAISED; like No Privs

  • Limiting the number of records to be pooled from the database in DB adapter

    Hi
    I am using Oracle SOA 11g and Jdeveloper 11.1.1.4
    My requirement is i need to poll on a database and process the records. I have a primary key on which i can do the polling.
    My challenge over here is, I need to pick up one and only one record per 1 minute.
    I tried to acheive this using the polling options
    Database Rows per Transaction =1
    Polling Frequency =60 Seconds
    But when i deploy and run this process it is picking up all the records based on the criteria but not a single record.
    Please help on how we can acheive the above requirement.
    Thanks
    Vamsi

    I guess you haven't changed the setting in your schema file.
    You need to set the Database rows per XML document to 1, you can see this setting in screen number 10, while configuring database adapter.
    Have you ?
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_db.htm#CHDEFACG
    *7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*
    Thanks,
    Vijay

  • ADF-BC JSF Counting the number of displayed rows that meet certain criteria

    Hi everyone.
    I have a JSF page that displays a table containing rows with a type attribute that may be either 'A' or 'B'. The page uses an executeWithParams form in order to set query parameters and execute the query. My users have asked me to display percentage information for type A rows at the same page.
    One way to do this would be to create an application module method that would parametrize the query, execute it, iterate through the results, do the calculation and return everything in a formatted string.. Somehow this approach does not seem right.
    Is there a best practice regarding situations like this? Any reference to code example would be perfect.
    Thanassis

    Maybe you can use the getEstimatedRowCount() method on the view.
    See more info here:
    http://download.oracle.com/docs/html/B25947_01/bcquerying006.htm

  • How to count the number of deleted rows processed

    Sybase ASE version: 15.7-SP52
    Hi all,
    I have a delete statement that will potentially delete millions of rows
    DELETE from TAB_A where COL_A='Y'
    The delete is long, at some point I'd like to know how many rows were deleted.
    If I do SELECT COUNT(*) from TAB_A where COL_A='Y', the query should be locked because of the exclusive-lock held by the DELETE in progress.
    If this is the case, how can I actually count the number of rows deleted so far?
    Thanks all
    Simon

    Simon
    For  deleting significant number of rows best practice is to delete rows in small batches of known size (e.g. 10 K) inside a while loop. 
    This keeps transaction log from filling up as well.
    Also between two iterations of delete you can give some wait to make sure that you do not monopolize the server. Sleep could be for a fixed number of seconds (e.g. 5) or for randomized number say from 1 to whatever makes sense.
    Typically "set rowcount " is used to set up the batch size and "waitfor delay" to sleep between iterations.
    Global variable @@rowcount gives yo actual rows deleted. For the last batch this may be lower than the batch size you set up.
    HTH
    Avinash

Maybe you are looking for

  • Mobile Device error

    Today when I tried to hook my iphone to my computer iTunes said it can't connect because the Mobile Device was not running? anyone know what to do - apple has been useless in solving this . . . . .

  • IDOCs to send Employee Data

    Hi All, In my current project, I have lots of interfaces to send employee data to third party. Now the interface team has decided to use IDOCs to transfer employee data. Employee data is of the order of 20,000 and many interface will be scheduled to

  • Filter ArrayCollection by index

    What is the syntax to reference the index in an ArrayCollection? I know if you remove  any filterFunction from an ArrayCollection it will be automatically ordered by index, but I want to explicitly refer to the index in a filterFunction: private func

  • Does iCal really push?

    Testing my setup with Snow Leopard MBP at home, iPhone at home and Snow Leopard Server on Xserve at the office. I have iCal server setup up on my xserve at my office. I have push notifications enabled for iCal. I created a test calendar on my MBP at

  • External tools for monitoring job scheduling

    Hello All, Please give me the infomation on third party tool used for monitoring the process chains, handling issues and job scheduling. Also why do we need third party tools and what are the available third party tools.. Thanks Regards M.A