Spry table sort

It's taking 2 clicks in a browser to get table columns to sort by the headers. First click does nothing, second makes the sort happen.
Is there a way to get the sort done in 1 click?

This example sorts spry headers in one click. View source and cross reference your code.
Your first click may be doing something; sorting by column that is already sorted. Sense it's already sorted it looks like it's not doing anything when it is. Second click sorts the opposite way and that's why it shows sort effect at that time.
One can only speculate sense no page has been provided. As suggested cross reference working example against your code to discover solution.

Similar Messages

  • Spry tables: Sort by date

    I need a spry table to sort by title and date columns; the
    title works fine by selecting the 'sortable column' option when
    making the table - this didn't work for the date column, but I
    think this was because the excel/xml data used had the date info in
    a text format. Once I'd formatted the date column cells in excel
    doc as 'date' in (e.g.) Jan-07 format, the xml conversion changed
    the data to what i think is the standard date format (e.g.
    2007-07-01 00:00:00). Making this column sortable resulted in rows
    being rearranged in the spry table, but not in any logical order.
    please help!
    many thanks,
    S
    (apologies if that was long-winded, wasn't sure whether you
    needed any context)

    You cannot sort a formatted date by default using the Spry.  How is the data stored, in XML or HTML?  And is the date stored as a formatted date or a timestamp?  What is typically suggested is that you store the dates in two formats.  First is a timestamp format or a formatted date as yyyy-mm-dd.  You use that column to sort and then you have a date formatted however you want in a second column and that gets displayed to the user.
    You can see more about this in the following thread: http://forums.adobe.com/thread/85718
    The problem with the dd/mm/yy format is that Spry (and many other solutions) read the information as plain text.  So here's a quick example of oldest to newest
    30122011 - Dec 30, 2011
    31012011 - Jan 31, 2011 - January would come after Dec
    01302011 - Jan 31, 2011
    01312010 - Jan 30, 2010 - 2011 would be before 2010
    20100131 - Jan 31, 2010
    20110131 - Jan 31, 2011
    20111230 - Dec 30, 2011 - In this format all numbers show up in numerical order.

  • Sorting numberic data in a spry table

    First Problem:
    I am having trouble getting an secondary sort to work in a
    spry table. As long as I do a single sort every thing works just
    fine, but as soon as I try to do a secondary sort.... nothing
    works.
    Second Problem:
    The data I am using ranges from 0 to 10. When I sort "1" and
    "10" end up being right next one each other, but the 10 should be
    on top. So the sort ends up as 9,8,7,6,5,4,3,2,10,1. when it should
    be 10,9,8,7,6,5,4,3,2,1.
    I'm sure it is something simple that I have not figured
    out.... has anyone else run into this and solved it?
    thanks,

    there is an issue with this, regardless if you do ds1.setColumnType("Q407Q207A", "number"); the Damn thing does not sort negative numbers. Is there a way to fix this, You know what amazes me is that people would not take this into consideration, yeah lets release a framework with half the basic functionality. Sorry don't mean to complaint but I've been trying to find a fix for this for over a month and nothing not on the Live Docs nor out there on the WEB.

  • Sorting a Spry Table

    For a table listing events and fed by an xml file I need to sort the date and time columns. First priority is date, second is time. This is possible in a regular html table, but not an option in spry tables, at least not in CS 3 which I am using.
    It probably needs some change in the JavaScript to do that. Any help with that is greatly appreciated. Thanks.

    Click the column headers here http://labs.adobe.com/technologies/spry/samples/data_region/DataReferences.html and here http://labs.adobe.com/technologies/spry/samples/data_region/SortSample.html
    For a table listing events and fed by an xml file I need to sort the date and time columns. First priority is date, second is time. This is possible in a regular html table, but not an option in spry tables, at least not in CS 3 which I am using.
    Sorting is a built-in Spry function.
    It probably needs some change in the JavaScript to do that.
    Under normal circumstances, it is advisable not to touch the Spry JS files.

  • How to open a new page from a Spry Table click, with element info?

    Hello, Spry experts!
    This is probably simple, but I've searched for hours and can't find what I need. I'm using Dreamweaver CS4 and Spry 1.6.1 to create a simple Spry Table from an XML data set using PHP as my back end.  I've used Dreamweaver's Insert->Spry->Spry Data Set to create everything, and the table is working fine.  Colors, clicks, sorts, etc., are all working correctly as expected.
    What I want is to be able to add a behavior such that when a table row is clicked, I can open a new page.  Moreover, I want to pass a parameter from the table to the new page, like http://www.mydomain.com/newpage.php?aid=12345 or whatever.
    So, for example, my table has two columns, "a_id" and "a_name", and my repeat region looks like this:
    <div spry:region="xml_assignments">
    <table width="500">
    <tr>
    <th spry:sort="a_id" class="spry_header">ID</th>
    <th spry:sort="a_name" class="spry_header">Assignment</th>
    </tr>
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    <td>{a_id}</td>
    <td>{a_name}</td>
    </tr>
    </table>
    </div>
    What I want is to be able to open an entirely new URL, passing the value of the {a_id} in the selected row as a parameter to the new URL, as in something like:  http://www.mydomain.com/newpage.php?aid={a_id}
    So my questions are: 
    1. How best to apply the action to the table?  Add an onclick to the tr tag?  Something else?
    2. How to extract the {a_id} value from the current row and pass it as a parameter to the action?
    Or maybe just take another approach entirely?
    I know that I can make the actual text in the table cells hyperlinks, and use them to link to the new page, which is fine.  The desire here is just to make it so that the user can click "anywhere" on the table row (as they can currently do with the spry:select behavior) and have the link kick off, whether they actually click on the linked text or somewhere in the row where there is no text.
    I'm sure this is obvious and simple, but I'm new to this level of Spry detail, and my brain is fried from hunting.  Any guidance will be gratefully appreciated!
    Glen Barney

    I found the answer myself, after posting this, of course!
    I changed:
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    to
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select" onclick="window.location.href='./newpage.php?aid={a_id}';">
    Basically just added the onclick parameter...
    And it all just worked!

  • Using javascript to dynamically generate the html for a  Spry table

    I have some javascript which generates html code for a Spry
    table which displays the content of a Spry data set. The problem is
    that after I generate the html, Spry never fills in the values for
    the table.
    Here's what I'm doing:
    Using a data set observer, check for onPostLoad and generate
    the html code
    Using innerHTML, stuff the code into the appropriate
    <div>
    Use regionName.updateContent() to update the region I just
    created with the html code I generated
    Interestingly, if I take the generated source for my page and
    remove the data set observer, the Spry table displays correctly
    with all the expected values. This suggests to me that my generated
    html code is correct, but that there is some sort of timing issue
    (i.e. Spry doesn't know about the new code I generated).
    Any suggestions?

    jalperin wrote:
    > Here's what I'm doing:
    >
    Using a data set observer, check for
    onPostLoad and generate the html
    > code
    >
    Using innerHTML, stuff the code into
    the appropriate <div>
    >
    Use regionName.updateContent() to
    update the region I just created
    > with the html code I generated
    >
    > Interestingly, if I take the generated source for my
    page and remove the data
    > set observer, the Spry table displays correctly with all
    the expected values.
    > This suggests to me that my generated html code is
    correct, but that there is
    > some sort of timing issue (i.e. Spry doesn't know about
    the new code I
    > generated).
    >
    > Any suggestions?
    I'd guess that it is a timing issue as well. I haven't looked
    much at the dataset capability in Spry, but it may be that the
    dataset "finds" all of the regions and code that it applies to
    before the onPostLoad event is triggered. If that is the case, then
    your generated code doesn't exist yet,and so the dataset thinks
    that there is nothing for it to apply to.
    Will the HTML that you generate change based upon the dataset
    that is actually returned? I guess I'm looking for the reason why
    the HTML is being generated when it could be in the page itself and
    avoid this issue completely.
    Danilo Celic
    |
    http://blog.extensioneering.com/
    | WebAssist Extensioneer
    | Adobe Community Expert

  • Spry Table works in Firefox but not IE

    I have a Spry table working just fine in Firefox in a site
    I'm developing:
    http://www.abenaki.com/newsite/schedule.html,
    but in IE 6 and 7 it first shows the table, unpopulated, and then
    disappears altogether. I'm new to Spry and XML... have I done
    something wrong? Any light anyone could shed would be hugely
    appreciated! Thank you!!
    The XML looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <courses>
    <course id="1">
    <name>New! Introduction to Social Assistance and Case
    Management</name>
    <location>Winnipeg</location>
    <startdate>10 21 2008</startdate>
    <duration>4 days</duration>
    <price>$1695</price>
    <desc>This course covers the setup, daily and periodic
    procedures for Abenaki’s Social Assistance and Case
    Management Module.Topics to be covered include: organization
    profile setup, rate maintenance, security, vendor and client
    maintenance, cheque production in Sage Accpac, cheque production in
    the Social Assistance module, reports, case planning, month and
    year end processing.</desc>
    </course>
    <course id="2">
    <name>Introduction to Safe Water Infrastructure
    Management System</name>
    <location>Moncton</location>
    <startdate>10 28 2008</startdate>
    <duration>2 days</duration>
    <price>$1295</price>
    <desc>No description available at this
    time.</desc>
    </course>
    <course id="3">
    <name>Introduction to Housing Inspection and Management
    System</name>
    <location>Moncton</location>
    <startdate>10 30 2008</startdate>
    <duration>1 day</duration>
    <price>$495</price>
    <desc>This introductory level course covers all of the
    steps involved in the data entry and report generation for housing
    units in the community. Topics to be covered include: rating the
    condition and estimated cost to repair of the interior, exterior,
    amenities, fire and health hazard items. Students will learn how to
    generate reports to identify housing units in need of minor or
    major repairs and those units that are potential fire and/or health
    hazard.</desc>
    </course>
    <course id="4">
    <name>New! Post Secondary Education and Student
    Tracking</name>
    <location>Winnipeg</location>
    <startdate>11 12 2008</startdate>
    <duration>3 days</duration>
    <price>$1595</price>
    <desc>No description available at this
    time.</desc>
    </course>
    <course id="5">
    <name>New! Introduction to Social Assistance and Case
    Management</name>
    <location>Edmonton</location>
    <startdate>11 18 2008</startdate>
    <duration>4 days</duration>
    <price>$1695</price>
    <desc>This course covers the setup, daily and periodic
    procedures for Abenaki’s Social Assistance and Case
    Management Module.Topics to be covered include: organization
    profile setup, rate maintenance, security, vendor and client
    maintenance, cheque production in Sage Accpac, cheque production in
    the Social Assistance module, reports, case planning, month and
    year end processing.</desc>
    </course>
    <course id="6">
    <name>Introduction to Safe Water Infrastructure
    Management System</name>
    <location>Edmonton</location>
    <startdate>11 18 2008</startdate>
    <duration>2 days</duration>
    <price>$1295</price>
    <desc>No description available at this
    time.</desc>
    </course>
    <course id="7">
    <name>Introduction to Housing Inspection and Management
    System</name>
    <location>Edmonton</location>
    <startdate>11 20 2008</startdate>
    <duration>1 day</duration>
    <price>$495</price>
    <desc>This introductory level course covers all of the
    steps involved in the data entry and report generation for housing
    units in the community. Topics to be covered include: rating the
    condition and estimated cost to repair of the interior, exterior,
    amenities, fire and health hazard items. Students will learn how to
    generate reports to identify housing units in need of minor or
    major repairs and those units that are potential fire and/or health
    hazard.</desc>
    </course>
    <course id="8">
    <name>Sage Accpac ERP 5.5 Refresher</name>
    <location>Moncton</location>
    <startdate>01 20 2009</startdate>
    <duration>4 days</duration>
    <price>$1695</price>
    <desc>No description available at this
    time.</desc>
    </course>
    <course id="9">
    <name>Sage Accpac ERP 5.5 General Ledger and Accounts
    Payable</name>
    <location>Winnipeg</location>
    <startdate>01 20 2009</startdate>
    <duration>4 days</duration>
    <price>$1695</price>
    <desc>No description available at this
    time.</desc>
    </course>
    </courses>
    Abenaki Course
    Schedule

    The reason its not working its because its "crashing" at the
    sort function in IE, I have no clue why.
    To be more specific,, this part of the SpryData.js
    if (this.unfilteredData)
    this.unfilteredData.sort(sortfunc);
    if (this.filterFunc)
    this.filter(this.filterFunc, true);
    else
    /*this->*/ this.data.sort(sortfunc);
    Maby try to delete the setColumnType for your startdate, to
    see if that helps. Because your startdate is not a "valid" date
    string. (i think)

  • Spry Table - way to select only parts of the dataset to be displayed?

    I have been enjoying putting together a simple spry table (DW CS3) that pulls data from an xml file.  At this point when the table loads it pulls all rows from the dataset and displays them in the table.  My question: is it possible to create a link or some way to pull only certain rows to be displayed.  For instance if the data was about donuts and included, 4 chocolate, 6 glazed and 5 plain, is there a way to only display the 6 glazed?  I have thirty rows of data and it is just a bit too much for people to be able to go through with ease and would love to have the ability to "sort" by asking for only certain types of data and then having those types displayed.
    Is there a way to do this?
    Thanks
    Tom

    You can apply filters to your data set.
    These samples might help you out:
    Filtering with XPath
    Multiple Non-Destructive Filters
    Multiple Non-Destructive Filters Mode
    Non-destructive Filter
    XPath filtering with URL Params
    URL Utils with Spry Data
    Hopes this helps

  • Text Overlapping/Wrapping Issue in BSP(Table Sorter Using JQUERY)

    Hi ,
    I have a requirement to add a new column in existing table which has been built by Table Sorter method in JQUERY.
    I have added the new column but the issue is value for the new column is populated  on next line of the table.
    This could be a simple width issue, but i don't know JAVA much.Attached the image for reference.
    Code i have used is:
    <input type="text" name="t_rbclaim[<%= lv_tabix%>].reason" size="3" maxlenth="3" wrapping = "true"
         onBlur="javascript:this.value=this.value.toUpperCase();" value="<%= w_rbclaim-reason%>">
    Please let me know how to modify the above code in better way.

    Hi Raja,
    Can you please help on this problem. I want to know whether there is any funciton module to convert the univercel character set code (HTML Codepage) page to SAP codepage. We are going to use ECC 6.0 which is unicode system for background R/3. So we can get the correct character format if identify the correct conversion method.
    Please let me know if any information and expect some information on this.
    Regards,
    Saravanan V

  • Fade Effect from Spry Table

    In the tutorial provided by Adobe it shows one how to create
    a dynamic link list that triggers an events region. I want to know
    is can you insert a fade in Spry effect on a Spry region detail
    that is triggered from a Spry table repeat object? I placed an
    onClick function on the Div that houses the Spry region but the
    image in the Spry Detail region fades in only after it blinks in at
    100%. So the effect is only working a split second after the image
    appears at 100% then snaps to 0% and fades to 100%. What is the
    correct method for using spry effects from Spry Region Table Links
    to a targeted DIV or Spry region detail?

    So this example is exactly what I am looking for, however,
    when one uses images instead of simple text I think it fouls up the
    smoothness of the code presented here. My problem is it works,
    however, if you click through the images back and forth eventually
    the image fades out to 0%. I am guessing this it could be related
    to a preloading and cache issue? Or does this code handle spry
    details that load in images differently?
    http://www.megalomedia-inc.com/clients/bob/print.html
    Click print item 1 and 2 back and forth to create the error.
    Any insight on how to make this run smoothly would be greatly
    appreciated and when I am done with this AJAX application I will
    share it with the SPRY community.

  • Af:table sorting when immediate='true' bug

    Where can I find the patch to fix the problem of sorting an af:table when immediate='true'?

    No I don't have a bug number, I've found that this is a bug based on this thread <a href src='BUG:  ADF FACES 10.1.3_04: Table sort broken if immediate="true" but I have no idea what the number is or where to find the patch for it.
    This is a really irritating bug. I want to have sorting on my tables but if I can't put immediate='true' on the table then other components on the page will fire their validation.

  • Custom table model, table sorter, and cell renderer to use hidden columns

    Hello,
    I'm having a hard time figuring out the best way to go about this. I currently have a JTable with an custom table model to make the cells immutable. Furthermore, I have a "hidden" column in the table model so that I can access the items selected from a database by their recid, and then another hidden column that keeps track of the appropriate color for a custom cell renderer.
    Subject -- Sender -- Date hidden rec id color
    Hello Pete Jan 15, 2003 2900 blue
    Basically, when a row is selected, it grabs the record id from the hidden column. This essentially allows me to have a data[][] object independent of the one that is used to display the JTable. Instinctively, this does not seem right, but I don't know how else to do it. I know that the DefaultTableModel uses a Vector even when it's constructed with an array and I've read elsewhere that it's not a good idea to do what I'm trying to do.
    The other complication is that I have a table sorter as well. So, when it sorts the objects in the table, I have it recreate the data array and then set the data array of the ImmutableTableModel when it has rearranged all of the items in the array.
    On top of this, I have a custom cell renderer as well. This checks yet another hidden field and displays the row accordingly. So, not only does the table sort need to inform the table model of a change in the data structure, but also the cell renderer.
    Is there a better way to keep the data in sync between all of these?

    To the OP, having hidden columns is just fine, I do that all the time.. Nothing says you have to display ALL the info you have..
    Now, the column appears to be sorting properly
    whenever a new row is added. However, when I attempt
    to remove the selected row, it now removes a seemingly
    random row and I am left with an unselectable blank
    line in my JTable.I have a class that uses an int[] to index the data.. The table model displays rows in order of the index, not the actual order of the data (in my case a Vector of Object[]'s).. Saves a lotta work when sorting..
    If you're using a similar indexing scheme: If you're deleting a row, you have to delete the data in the vector at the INDEX table.getSelectedRow(), not the actual data contained at
    vector.elementAt(table.getSelectedRow()). This would account for a seemingly 'random' row getting deleted, instead of the row you intend.
    Because the row is unselectable, it sounds like you have a null in your model where you should have a row of data.. When you do
    vector.removeElementAt(int), the Vector class packs itself. An array does not. If you have an array, when you delete the row you must make sure you dont have that gap.. Make a new array of
    (old array length-1), populate it, and give it back to your model.. Using Vectors makes this automatic.
    Also, you must make sure your model knows the data changed:
    model.fireTableDataChanged(); otherwise it has no idea anything happened..
    IDK if that's how you're doing it, but it sounds remarkably similar to what I went thru when I put all this together..

  • Spry table does not display properly in Explorer 10

    I have set up a web page including a Spry table which works great in all browsers EXCEPT Explorer 10.  Does anyone know how to fix this?
    http://jarrettrifles.com/Jarrett2012-website/pet-calibers.html
    Here's how it looks in Explorer 10:
    This is how it should display (from Chrome):

    Hello,
    hm, there is no problem in my IE 10. Spry works fine - in my case even without using compatiblity mode - (see screenshot, with IE 10 Info):
    BUT you should consider - I quote from different contributions of the forum - "Spry has been deprecated and is no longer officially supported by Adobe" and: "Spry framework related examples available here: http://adobe.github.com/Spry/samples/ or use jQuery."
    Hans-Günter

  • Can't add row using table sorter

    I had a jtable with my own mytableModel that implements AbstractTableModel. In mytableModel, I have addRow, removeRow... so I can delete/add row dynamically by calling mytableModel.addRow(..). Everything works fine.
    However, after I added the table sorter and table map (got the code from the tutorial).
    MyTableModel myModel = new MyTableModel();
    TableSorter sorter = new TableSorter(myModel);
    JTable table = new JTable(sorter);
    sorter.addMouseListenerToHeaderInTable(table);
    Now, when i call mytableModel.addRow(..), it doesn't work anymore. It doesn't add a row anymore, why?
    Thank you so much for your help.

    I don't have a addRow method in TableSorter. My addRow method is in myTableModel. So, when I need to addRow, I called myTableModel.addRow, In my addRow method, I have fireTableRowsInserted method. This used to work using integrating with TableSorter.
    Do I need to move all my addRow, addCol....DelRow... to TableSorter? The table data are stored in myTableModel. I guess I really doesn't know how the TableSorter work :(
    Thanks

  • Table Sorter Not working in EP 7.01

    Hi All,
    The table sorter stopped working in ep 7.01.
    Can anyone comment why?
    Are there any notes or patches to be applied?
    Thanks and Regards,
    Nuzhat

    Hi Shanti,
    Thanks for replying.
    I am working on WD for Java.
    Can you please give me your table sorter Java file?
    I think there may be issues in versions.
    Previous server was ep 7.00 and now when code is moved to ep 7.01 sp05 patch 1, the table sort doesnt seems to work. even though I checked all the codes are there in the new system.
    Thanks and Regards,
    Nuzhat

Maybe you are looking for

  • I can't update my windows 7 64x anymore, please help.

    Hey guys, Last month my brother gave me his old computer, the thing is he is addicted to gaming, he had like 60 of them on the computer. So I deleted all of his files and let my windows 7 reset all the way. But ever since I can't complete my updates

  • Need help with warranty service on ThinkPad Yoga

    Sorry for the seemingly angry headline but I am quite irritated at this point. Around three weeks ago I lost one of the rubber feet off my Thinkpad Yoga 2. After looking on Amazon, the Lenovo store and on Ebay I tried to ask here for advice around tw

  • SMB problems with Vista and Samba 3.0.25a

    I've got a huge problem with my network setup here. I've read the previous posts about non working samba shares, but I did not found any working tips. I have done some additional tests, and I would like to share them with you, maybe anyone finds the

  • Can't get my new page to work wit my website

    I know html but I can't get this to work. I have a website and I am trying to ad a new page to it. I can't get it to work. I have checked it link and it is fine. Must be something with the page. I don't know. Can anyone help me.

  • Get the report server details of a tfs instance

    HI I have tried the following method to get the report server attached to the tfs instance. but this returns no details. Please help on this. UritfsUri = newUri(uri); TfsConfigurationServerconfigurationServer = TfsConfigurationServerFactory.GetConfig