Hi,

Jim Hunter wrote:
Oops, hold the presses... it does mark it as selected initially, but when I select another row, the first row does not become unselected. I guess I have more work to do. Damn, it did seem too easy.

This is probably because the selectionmanager doesn't know of the initially selected rows, and therefore doesn't reset their state when other rows get selected. From your short message it seems to me, that you don't get around calling setSelectedItems() with the initially selected rows.

I'd say that this solution is the most "standard" way and fastest to implement. Without hacking away at the the qooxdoo sources and relying on internals that may change at any time.


Cheers

Benjamin


On 4/23/06, *Jim Hunter* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    You were correct! By adding a property _selected:{text:"true"} to
    the correct row, it is rendered as selected. Excellent call! I first
    tried just 'selected' and it didn't work, but after looking at the
    source, it's actually '_selected'. Once making the change things
    work just fine.

    Thanks!
    Jim


    On 4/23/06, * Benjamin Reitzammer* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:

        Hi,

        Jim Hunter wrote:
 Is there a way to pass in a property on a given row of data to
        signify
 that this is a selected row when the QxListView is created? I
        need to be
 able to have one or more rows marked as selected when the grid is
 created. I could not find anything about this in the list posts.

        Sorry to say, but "no it's not possible".

        But, as always, you can do it yourself, with relative ease:
        Just give the rows you want preselect a special attribute that
        you use
        to call listView.getPane ().getManager().setSelectedItems()
        after doing
        you first call to update().

        OR ..... just as untested idea, from the farthest corner of my head:
        I was hacking on QxListViewPane._updateRow() lately and there it
        seems
        that the update mechanism looks for a property 'selected' to add the
        appropriate state to the rows, which then get handled by the
        appearance
        layer. So try setting a property 'selected' on your row data and see
        what happens.
        And if nothing happens and you don't like my first idea of doing
        it by
        hand, take a look at the _updateRow() method of QxListViewPane.

        Cheers

        Benjamin


        -------------------------------------------------------
        Using Tomcat but need to do more? Need to support web services,
        security?
        Get stuff done quickly with pre-integrated technology to make
        your job easier
        Download IBM WebSphere Application Server v.1.0.1 based on
        Apache Geronimo
        http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
        
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
        _______________________________________________
        Qooxdoo-devel mailing list
        Qooxdoo-devel@lists.sourceforge.net
        <mailto:Qooxdoo-devel@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
        <https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel>





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to