Sunday, January 30, 2011

GWT 2.1.1 EditorFramework CellList editor using SimpleBeanEditorDriver and JSON help...

Hi everyone,
I can't manage to make editing of CellList using
SimpleBeanEditorDriver. I tried everything and now looking for some
help, and guidelines.

I am trying to create view that will display two text fields and one
CellList widget that will display some Labels.

I managed to create editor for text fields, but can't manage to create
editor for CellList. Here is my code...
/* Basic object that need editor */
public class Module {
private int id;
private String name;
private String description;
private List<Label> fields;

(getters and setters methods)

/* Basic interface that editor will use */
public interface ModulesDetailView extends IsWidget, Editor<Module> {
IsEditor<ValueBoxEditor<String>> getNameEditor();

IsEditor<ValueBoxEditor<String>> getDescriptionEditor();

/* This is a part where i have problems */
IsEditor<ListEditor<Label, Editor<Label>>> getFieldsEditor();

/* View Implementation */
public class ModulesDetailViewImpl implements ModulesDetailView {

private static ModulesDetailViewImplUiBinder uiBinder =
private final HTMLPanel moduleDetailPanel;

@UiField TextBox name;
@UiField TextBox description;
@UiField(provided=true) CellList<Fields> fields = new
CellList<Fields>(new AbstractCell<Fields>(){

public void render(Context context,
Fields value, SafeHtmlBuilder sb) {
AbstractCell<String> c = new EditTextCell();
c.render(context, value.getName(), sb);


interface ModulesDetailViewImplUiBinder extends UiBinder<HTMLPanel,
ModulesDetailViewImpl> {

public ModulesDetailViewImpl() {
moduleDetailPanel = uiBinder.createAndBindUi(this);

public Widget asWidget() {
return moduleDetailPanel;

public IsEditor<ValueBoxEditor<String>> getNameEditor() {
return name;

public IsEditor<ValueBoxEditor<String>> getDescriptionEditor() {
return description;

/* implemented method from interface (this is where I stuck)*/
public IsEditor<ListEditor<Label, Editor<Label>>> getFieldsEditor() {
return null;

As you can see from comments in code, i am having problem with
defining method for getting editor for CellList. Currently method
getFieldsEditor is completely wrong, as i tried various things, but
without success. I have logic that gets object from server, populate
Module object, and populate name and description, but can't manage to
populate CellList with list of retrieved data.

I am using JSON and SimpleBeanEditorDriver as my code on server is

Thanks for time reading this, and thanks any help.

Milan Cvejic

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment