Hi,
I have created a celll that extends AbstractCell. I want to use it
with a CellList and a multiSelecitonModel. However, I cannot select
more than one item. Is it possible to select more than one item in a
CellList? With Ctrl + shift + click? I tried a lot of combinations...
 I read a lot about there being issues with selection and cells. I
just updated to 2.1.1 and hoped it would work now.
I realized that the render signature was changed in 2.1.1. Do I have
to do anything with the Context?
This is how my Cell looks like:

static class SensorCell extends AbstractCell<Sensor> {

                private final String imageHtml;
                public SensorCell(ImageResource image) {
                        this.imageHtml = 
AbstractImagePrototype.create(image).getHTML();
                }

                @Override
                public void render(Context context, Sensor 
value,SafeHtmlBuilder sb)
{
                        if (value == null) {
                                return;
                        }

                        sb.appendHtmlConstant("<table>");

                        // Add the contact image.
                        sb.appendHtmlConstant("<tr><td rowspan='3'>");
                        sb.appendHtmlConstant(imageHtml);
                        sb.appendHtmlConstant("</td>");

                        // Add the name and address.
                        sb.appendHtmlConstant("<td style='font-size:95%;'>ID: 
");
                        sb.appendEscaped(value.name);
                        sb.appendHtmlConstant("</td></tr><tr><td>Status: ");
                        sb.appendEscaped(String.valueOf(value.status));
                        sb.appendHtmlConstant("</td></tr><tr><td>Subscribed: ");
                        sb.appendEscaped(String.valueOf(value.subscribed));

                        // close the html
                        sb.appendHtmlConstant("</td></tr></table>");
                }
        }


Here I add the selectionModel and set the selectionChangeHandler...
I really don't know what else to do.
                cellList.setSelectionModel(multiSelectionModel);

                // Add a new handler to register when the selection of
                // functionalities has changed
                multiSelectionModel.addSelectionChangeHandler(selectionChanged);


Thanks in advance,
Flo

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to