x=this.getPane().getManager().getSelectedItems();
row=x[0].__index.text;
but as you can see, I needed to know the name of the row property in order to reference it. I tried to do something like x[0][2] to access the third column data but it didn't work. Lets say I simply need to iterate through all the columns/properties of the selected rows to get data to pass to another function, what is the easiest way to do that? Right now I only had a need to have an index value and I have that solved with your assistance. Now I am going to tackle the pre-selected flag and then a row color flag which I suspect will both be handled in the same way.
Thanks again,
Jim
On 4/23/06, Benjamin Reitzammer <[EMAIL PROTECTED]> wrote:
Jim Hunter wrote:
> This information is nice but it still doesn't tell us what we can DO
> with getSelectedItems(). In one of the demo's I think I saw that you can
> do a getSelectedItems().getData(), but no information on what you can DO
> with the returned data. I would love to see some code snippet showing
> how to access the second fields data of the second row selected assuming
> that 3 rows were selected. A simple alert would do. All of my ListViews
> are dynamically created at run time and I have no idea at design time
> what fields are going to be in a ListView so I need to be able to access
> the information generically. I tried to do something like
> getSelectedItems().getData()[0], trying to reference the first row
> selected but got a _javascript_ error.
You got an error, because it must be getSelectedItems()[0] .... the
getData() method only works on the QxListView instance ... or on your
QxData event that you receive when you listen on the "changeSelected"
event of the listviewpane's selection manager ... depending on how you
get to the data of the selected items ... maybe you want to add the
following snippet to your app and see what happens (may contain syntax
errors, sorry for being too lazy to test it)
listView.getPane().getManager()
.addEventListener("changeSelection",
function(e) {alert( e.getData().length +" "+ e.getData()[0]) }
);
> There really is no information in
> the demos that tell you how to manipulate the raw data. The examples
> that move data from one grid to another never drill down into the data,
> the leave it as a whole entity. So far I have read as many posts as I
> can and looked at the demos but I see no information that is relevant to
> what I need to do. Someone out there has had to have done this before
> and can show others how it's done.
Ok, now because I can't keep my mouth shut ... tell me an exact example
what you want to do (e.g. change one column of data at runtime,
manipulate just the selected rows of a list), so I get an idea what you
are looking for, and I'll try to do a short writeup with an extended
example.
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
_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel