On Thu, Jul 19, 2012 at 10:47 AM, Ravi Lal <[email protected]> wrote:

> Hi I'm really enjoying the qooxdoo framework however I have one problem.
>
> I have a table which I'd like to customise the cells to ideally show a
> select box with multiple selection and then the rendering of the cell to
> string join to show all the options selected. I can't do this with the
> current CellEditorFactory implementations.
>

Yes, you should be able to do that. Depending on what data you require in
your model, it can be done one of two ways:

1. If your data model can contain an array of selected items, then you'd
write a cell *renderer* that knows how to render an array into a joined
string. In this case, your SelectBox cell editor would return
selectBox.getSelection(), which is an array, from its getCellEditorValue()
method.

2. If your data model requires the joined string, then your cell editor
must join the selected items into a single string, in its
getCellEditorValue() method.

Hopefully that gets you started. What you're looking to do should not be
too difficult. I'd suggest looking at the source for
qx.ui.table.celleditor.SelectBox, which currently uses single selection,
and manipulates the value somewhat (checking its type, and possibly calling
parseFloat()). You could modify it to return a join of the selection
values. Be aware, though, that you'll encounter problems if ever your list
values can contain commas. In that case, you're better off keeping the
model data (the value) as an array of strings.

Cheers,

Derrell
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to