PagedView and empty dataset

Hello,
I am using PagedView to display my data and getPagingInfo()
for accessing pages directly.
My code looks like this:
var dsItems = new Spry.Data.XMLDataSet(sDataSetUrl, 'root'');
var pvItems = new Spry.Data.PagedView(dsItems, {pageSize:
20});
var pvInfo = pvItems.getPagingInfo();
<span spry:region="pvItems" spry:state="ready"
spry:if="{ds_PageNumber} > 1"><a href="#"
onclick="pvItems.previousPage()">Previous
Page</a></span>
Executing this with an
empty xml dataset I get the following error:
Caught exception in Spry.Data.Region.prototype.processTokens
while evaluating: > 1 Exception:SyntaxError: syntax error
ds_PageNumber seems to be empty.
How to fix this?
Best regards,
Tobias

yes, the master dataset is empty, too.
I had a look at SpryPagedView.js (from Spry 1.5). There are
only two positions where I found ds_PageNumber:
1) Spry.Data.PagedView.prototype.updatePagerColumns():
If there are no datasets numRows is zero and ds_PageNumber
is not defined
2) Spry.Data.PagedView.PagingInfo.prototype.extractInfo():
numRows is zero, ds_PageNumber not defined
For me it seems a bit like a bug.

Similar Messages

  • Tooltips and empty Datasets

    Hello,
    I have melded a couple of Spry examples together to create a
    ToolTip example that uses XML strings to form it's dataset.
    See
    Here
    There are 3 buttons to change the dataset contents.
    What I can't figure out is how to stop the tool tip code from
    giving an error when there is not any data (button 3).
    Spry.Data.Region.addObserver('mainRegion',{onPostUpdate:function(){var
    tt1 = new Spry.Widget.Tooltip('tooltip','.trigger',
    {followMouse:true, offsetX:-25, offsetY:15,
    closeOnTooltipLeave:true});}});
    In the real world application I am wanting this for I know I
    will have no data from time to time based on user selections.
    Any help appreciated.
    Thank you.

    Hi there,
    I asked the same question here and didnt receive much help. I
    have figured out to fool the browser in a different way so that the
    tootip constructor see the element in the page but the browser will
    not display it.
    Here is the logic. While you are loading the xml content and
    displaying it in the region, perform an if function with
    spry:if="{ds_RowCount} != 0" and that would render your data and
    fire the tooltip as usual. When the xml is not available, perform
    another if with spry:if="{ds_RowCount} == 0" on another div with
    the same ID as the tooltip trigger which has a display set to none.
    looks something like this : <div id="sprytrigger1"
    spry:if="{ds_RowCount} == 0" style="display:none"></div>
    So technically,when the xml is empty or not available, this
    condition will met and the browswer will render a div in the code
    which wont display anywhere because of the style attached. the
    tooltip will see the ID existed in the page and wont give an error.
    but you have nothing to hover in the page so that the tooltip will
    popup.
    Hope that helps

  • Best Practice for Empty Dataset

    Does Spry know the difference between an empty dataset, a
    blank xml document and a bad formatted xml document? If so How do I
    test for empty dataset vs blank xml vs bad formatting?
    Currently, when no data is available the application returns
    a blank xml document. I can change this to 1 record with no fields
    or something similar. So far if the blank document shows up it
    fires the spry:state="error".

    Hello,
    I'd ask in the Windows forum on Microsoft Community.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog:http://unlockpowershell.wordpress.com
    My Book:Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Null and empty string not being the same in object?

    Hello,
    I know that null and empty string are interpreted the same in oracle.
    However I discovered the strange behaviour concerning user defined objects:
    create or replace
    TYPE object AS OBJECT (
    value VARCHAR2(2000)
    declare
    xml xmltype;
    obj object;
    begin
    obj := object('abcd');
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := '';
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := null;
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    end;
    When creating xml from object, all not-null fields are transformed into xml tag.
    I supposed that obj.value being either '' or null will lead to the same result.
    However this is output from Oracle 9i:
    <OBJECT_ID><VALUE>abcd</VALUE></OBJECT_ID>
    <OBJECT_ID><VALUE></VALUE></OBJECT_ID>
    <OBJECT_ID/>
    Oracle 10g behaves as expected:
    <OBJECT><VALUE>abcd</VALUE></OBJECT>
    <OBJECT/>
    <OBJECT/>
    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?

    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?A lot of "fixes" were done, relating to XML in 10g and the XML functionality of 9i was known to be buggy.
    I think you can safely assume that null and empty strings are treated the same by Oracle regardless. If you're using anything less than 10g, it's not supported any more anyway, so upgrade. Don't rely on any assumptions that may appear due to bugs.

  • Difference in Null and Empty String

    Hi,
    I have been wondering about the difference between Null and Empty String in Java. So I wrote a small program like this:
    public class CompareEmptyAndNullString {
         public static void main(String args[]) {
              String sNull = null;
              String sEmpty = "";
              try {
                   if (sNull.equalsIgnoreCase(sEmpty)) {
                        System.out.println("Null and Empty Strings are Equal");
                   } else {
                        System.out.println("Null and Empty Strings are Equal");
              } catch (Exception e) {
                   e.printStackTrace();
    This program throws Exception: java.lang.NullPointerException
         at practice.programs.CompareEmptyAndNullString.main(CompareEmptyAndNullString.java:10)
    Now if I change the IF Clause to if (sEmpty.equalsIgnoreCase(sNull)) then the Program outputs this: Null and Empty Strings are Equal
    Can anyone explain why this would happen ?
    Thanks in Advance !!

    JavaProwler wrote:
    Saish,
    Whether you do any of the following code, the JUnit Test always passes: I mean he NOT Sign doesnt make a difference ...
    assert (! "".equals(null));
    assert ("".equals(null));
    You probably have assertions turned off. Note the the assert keyword has nothing to do with JUnit tests.
    I think that older versions of JUnit, before assert was a language keyword (which started in 1.4 or 1.5), had a method called assert. Thus, if you have old-style JUnit tests, they might still compile, but the behavior is completely different from what it was in JUnit, and has nothing to do with JUnit at all.
    If you turn assertions on (-ea flag in the JVM command line, I think), the second one will throw AssertionError.

  • Check for null and empty - Arraylist

    Hello all,
    Can anyone tell me the best procedure to check for null and empty for an arraylist in a jsp using JSTL. I'm trying something like this;
    <c:if test="${!empty sampleList}">
    </c:if>
    Help is greatly appreciated.
    Thanks,
    Greeshma...

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

  • I put photos in trash and emptied it! Can I get files bacK?

    I threw my entire photo library in trash (don't ask) and emptied it. I've been trying to recover files with Data Rescue II -- have run it three times and every time, it sticks when I get to "Scanning Drive, Postprocessing CBR Data"
    The first time it said: remaining time = 16 mins. 2nd time: remaining time = 18 mins. This time it says: Remaining time about 17 mins.
    I started it last night at 10 pm. It's been stuck on "17 minutes remaining" since I got up this morning.
    ANyone have any suggestions for getting it to process the hard drive?
    Is there any other software I should try? I stopped using hard drive as soon as I realized what I'd done. I backed it up on external hard drive and am running off of that. (I know, I should have backed up BEFORE I deleted everything. Yikes)
    Thanks for any suggestions...!

    The File Salvage program is truly a god send. It had been recommended to me and admittedly I was a bit skeptical. Ultimately, I did decide to download and purchase the Sunday morning following my unfortunate mishap and try it.
    I am so happy that I did decide to buy and try it.
    The downside is that can be time consuming as it automatically assigns new generic file names / numbers to each file that necessitates the user to open each file to determine if it is a file that he/she wishes to rename and save.
    The upside is that I got all my files back and of course my sanity, as well.

  • Find out varchar2 string NULL columns and Empty columns

    Hi dev's ,
    my requiremnt is to find out the string columns Names of whose storing NULL values and EMPTY strings. for that i had written below code. it's getting some error.
    SET ECHO OFF;
    SET FEEDBACK OFF;
    SET SERVEROUTPUT ON;
    SET VERIFY OFF;
    SET PAGES 0;
    SET HEAD OFF;
    spool D:\stringnull.csv
    DECLARE
      v_tab_indent NUMBER(5);
      v_col_indent NUMBER(5);
      v_val1       VARCHAR2(20);
      v_val2       VARCHAR2(20);
      v_query1     VARCHAR(500);
      v_query2     VARCHAR(500);
    BEGIN
      --DBMS_OUTPUT.ENABLE(100000);
      SELECT MAX(LENGTH(table_name))+1,MAX(LENGTH(column_name))    +1
      INTO v_tab_indent,v_col_indent
      FROM user_tab_columns
      WHERE data_type='VARCHAR2';
    FOR i IN
      (SELECT table_name,
        column_name
      FROM user_tab_columns
      WHERE data_type IN ('NVARCHAR2', 'CHAR', 'NCHAR', 'VARCHAR2')
      ORDER BY table_name,
        column_name
      LOOP
        v_query1:='SELECT NVL('||i.column_name||',0) AS VAL    
                  FROM '||i.table_name||' where '||i.column_name||' IS NULL';
        v_query2:='SELECT '||i.column_name||' AS VAL    
                  FROM '||i.table_name||' where '||i.column_name||'=''''';
        --dbms_output.put_line(v_query1);
       -- dbms_output.put_line(v_query2);
        EXECUTE immediate v_query1 INTO v_val1;
        EXECUTE immediate v_query2 INTO v_val2;
        dbms_output.put_line (rpad(i.table_name,v_tab_indent,' ')||','||rpad(i.column_name,v_col_indent,' ')||' ,'||v_val1||','||v_val2);
      END LOOP;
    END;
    Spool OFF
    Set echo on
    Set feedback onERROR:
    Error report:
    ORA-01403: no data found
    ORA-06512: at line 31
    01403. 00000 -  "no data found"
    *Cause:   
    *Action:
    set feedback onpls help me on this issue..
    Thanks,

    Example:
    SQL> DECLARE
      2    v_val       VARCHAR2(20);
      3    v_query1     VARCHAR(32767);
      4  BEGIN
      5   FOR i IN (SELECT table_name, column_name FROM user_tab_columns
      6             WHERE data_type IN ('NVARCHAR2', 'CHAR', 'NCHAR', 'VARCHAR2')
      7             ORDER BY table_name, column_name
      8            )
      9   LOOP
    10     v_query1 := 'SELECT count(*) FROM '||i.table_name||' where '||i.column_name||' IS NULL';
    11     EXECUTE immediate v_query1 INTO v_val;
    12     dbms_output.put_line(rpad(i.table_name,30,' ')||' : '||rpad(i.column_name,30,' ')||' : '||v_val);
    13   END LOOP;
    14  END;
    15  /
    CHILD_TAB                      : DESCRIPTION                    : 0
    DEPT                           : DNAME                          : 0
    DEPT                           : LOC                            : 0
    EMP                            : ENAME                          : 0
    EMP                            : JOB                            : 0
    MYEMP_OLD                      : ENAME                          : 0
    MYEMP_OLD                      : JOB                            : 0
    MYNULLS                        : ENAME                          : 0
    MYNULLS                        : JOB                            : 4
    PARENT_TAB                     : DESCRIPTION                    : 0
    T                              : CHAR_VALUE                     : 0
    TABLE1                         : COL1_DESC                      : 0
    PL/SQL procedure successfully completed.

  • What is difference between Null String and Empty String ?

    Hi
    Just i have little confusion that the difference bet'n NULL String and Empty String ..
    Please clear my doubte.
    Thankx

    For the same reason I think it's okay to say "null
    String" and "empty String "as long as you know they
    really mean "null String reference" and "empty String
    object" respectively. Crap. It's only okay to say that as long as *the one you're talking to" knows what it really means. Whether you know it or not is absolutely irrelevant. And there is hardly any ambiguity about the effects that a statement like "assign an object to a reference" brings. "Null String" differs in that way.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • VARCHAR2:: How to differnciate between NULL and empty string '' ?

    Hello to all,
    I'm looking for a possibility to differnciate between NULL and empty string '' in column of type VARCHAR2.
    I have an application relying on that there is a difference between NULL and ''.
    Is it possible to configure ORACLE in some way ?
    Thanx in advance,
    Thomas

    try check if a varchar variable has an empty string
    by checking its lengthAnd that would accomplish what? But see for yourself:
    DECLARE
      v_test VARCHAR2(10);
    BEGIN
      v_test := '';
      DBMS_OUTPUT.put_line(LENGTH(v_test));
      v_test := NULL;
      DBMS_OUTPUT.put_line(LENGTH(v_test));
    END; C.

  • Difference  between null vector and empty Vector

    What is the diffrence between null vector and empty vector.

    null vector means the JVM doesn't allocate memory.It doesn't exist
    in memory. NO instance!
    empty vector means the JVM allocated memory.It exists in memory.
    it's a instance than is accessabel.But only have on elements.
    GL&HF.

  • What is the difference between String Constant and Empty String Constant

    What is the difference between string constant which does not contain any value and the Empty string constant?
    While testing a VI which contain a normal string constant in VI analyzer, it gives error to change string constant with the empty string constant?
    Please Reply
    prabhakant
    Regards
    Prabhakant Patil

    Readability.
    Functionally, they are the same. From a coding standpoint, the Empty String Constant is unambiguous.
    It is empty and will always be; good for initialization. Also, because you can not type a value into and Empty String Constant, someone would need to conciously replace it to set a 'default' value that is something other than NULL.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Script Editor does not work. Panel blue and empty.

    Hi
    I installed Oracle Database XE yesterday on
    Acer TravelMate C300, Microsoft XP SP2 Tablet Edition
    and ..
    I cannot read SQL scripts
    I cannot access to the editing panel of Scripts Editor when I want to create a new script.
    I used System and HR login.
    The panel is blue and empty.
    Thank you for any information
    Best regards
    JRD120

    I cannot read SQL scriptsWhere you want to read SQL scripts?
    I cannot access to the editing panel of Scripts
    Editor when I want to create a new script.About which "Scripts Editor" you talking about? From TOAD?
    The panel is blue and empty.Panel??

  • TS4009 How do I clean up mail in my icloud?  I have already deleted old mail on all devices, and emptied the junk & deleted files, but it still shows that I am at max on my icloud. What do I do to free up space? (photos & apps do not take up that much roo

    How do I clean up mail in my icloud?  I have already deleted old mail (from all my e-mail accounts) on all devices, and emptied the junk & deleted files, but it still shows that I am at max on my icloud. What do I do to free up space? (photos & apps do not take up that much room).  When I go to manage storage on any device & it will display how much room each program or app is using, it still shows that my e-mail is taking up the most room.  Is there a way to actually log on to the icloud server to manage what it stored there?  If so, how do I do it?  Also, on a related subject,  why does my mail not sync accross all devices?   ie. when I delete an email on one device, why do I still see it on all my other devices?  How can I change this?
    I have an iphone5, ipad2, ipod 4th gen, ipod 3rd gen, all running on my same apple id - but I have a PC not a Mac home computer - is this part of the problem?  Looking to upgrade to a Mac sometime this year...
    Thank-you for the help!

    beckyfromoz wrote:
    I do have the Time Capsule and spoke to Apple Care here in Sydney about it yesterday.  They told me my mail is not backed up there unless I create a special folder. I just tried ringing them again but Apple Care is closed today...
    Mail is backed up automatically. If you make backups automatically, open Mail application and then, open the Time Machine app (in /Applications/Utilities). You will access to the Time Machine interface, and you will be able to see all your mails of all the backups you have, and you will be able to restore them. It means that your mails are backed up onto the Time Capsule

  • Open dataset and close dataset

    Hi
    I need to write log file in fileshare.
    I am using the following FM to create the file.
    Z_FILE_OPEN_OUT_UNICODE'
    I have following qns
    1. do i need to use open dataset and close dataset stmts, even I create the files with the FM?

    Hi,
    you can fill in the name of the FM in transaction SE37, then click 'Display' and look at the source code and the 'Tables' tab.
    It's a custom build FM, so you might have to look at the import parameters it needs... ( Tab 'Import' and 'Tables' ).
    To answer your question, as the name of the FM suggests it will write the file for you, so no open/close dataset. Please doublecheck tab 'Source code' and you might find these statements there...
    hope that helps,
    Rolf

Maybe you are looking for

  • Could users filling out a form update it after submission?

    Does FormsCentral have an option to allow form repondents to update, and/or change submitted information?

  • Javax.mail.MessagingException: Missing start boundary

    I use the following code creates a Mime file MimeMultipart mmp = new MimeMultipart();                MimeBodyPart mbp = null;                // add rootpart                mbp = new MimeBodyPart();                mbp.setContentID("[email protected]");

  • Upgrade to MAC OS X 10.4.5 Leopard

    Upgraded my laptop and wiped hard drive clean. I don't remember my registration code now for quicktime pro. Is there any way to retrieve it?

  • Video Organizer

    Does anyone know of any programs which are meant to organize videos?  By that I mean an iTunes/rhythmbox like interface for videos.  You have a library of videos, tagged with metainformation to find and play the videos you want. I havent had to searc

  • Thunar Automounting

    After trying on and off for a few months, my arch install finally worked!  I've very happy with the speed of the system.  Everything seems so much more responsive!  However, I have one problem that I can't seem to fix.  I am running i686, 2.6.36-ARCH