gwt-editors

Gwt editor with not only getter/setter bean class

纵然是瞬间 提交于 2019-12-09 21:30:05
问题 Lets say I have form build in GWT, an UI-Binder, which implements Editor interface (com.google.gwt.editor.client.Editor) with two date fields (date from and to). Bean class is expected to have members: Date fromDate; // with getter and setter Date toDate; // with getter and setter And okay, while having bean class defined as written, there is no problem, but just after I add something like this: public boolean hasFromDate() { return fromDate != null; } I got compilation error (for example for

GWT Editors framework - ListEditor, removing items, MVP violation

人盡茶涼 提交于 2019-12-09 13:30:14
问题 public class PersonListEditor extends Composite implements IsEditor<ListEditor<Person, PersonListItemWidget>> { private static PersonListEditorUiBinder uiBinder = GWT.create(PersonListEditorUiBinder.class); interface PersonListEditorUiBinder extends UiBinder<Widget, PersonListEditor> {} private class Source extends EditorSource<PersonListItemWidget> { @Override public PersonListItemWidget create(int index) { PersonListItemWidget widget = new PersonListItemWidget(); panel.insert(widget, index)

How must one use a ListEditor as a child of another Editor?

a 夏天 提交于 2019-12-06 14:23:51
I am using GWT 2.5.0 My intent was to create an editor hierarchy which binds to a ParentBean object. The ParentBean contains a List<Group> , and the Group bean has a List<ChildBean> and List<Group> . From the Editor tutorials I have found, it seemed simple enough to create an editor which contains a ListEditor as one of its sub-editors. But the parent editor never seems to properly initialize the sub ListEditor. Here is an explanation of how I attempted to do this. From the code below, I created a ParentBeanEditor which is composed of one other editor, GroupListEditor . The GroupListEditor

Gwt editor with not only getter/setter bean class

て烟熏妆下的殇ゞ 提交于 2019-12-04 15:54:53
Lets say I have form build in GWT, an UI-Binder, which implements Editor interface (com.google.gwt.editor.client.Editor) with two date fields (date from and to). Bean class is expected to have members: Date fromDate; // with getter and setter Date toDate; // with getter and setter And okay, while having bean class defined as written, there is no problem, but just after I add something like this: public boolean hasFromDate() { return fromDate != null; } I got compilation error (for example for fromDate): [ERROR] Line 17: The method hasFromDate() is undefined for the type Date [ERROR] Line 20:

GWT Editors framework - ListEditor, removing items, MVP violation

自闭症网瘾萝莉.ら 提交于 2019-12-03 16:13:08
public class PersonListEditor extends Composite implements IsEditor<ListEditor<Person, PersonListItemWidget>> { private static PersonListEditorUiBinder uiBinder = GWT.create(PersonListEditorUiBinder.class); interface PersonListEditorUiBinder extends UiBinder<Widget, PersonListEditor> {} private class Source extends EditorSource<PersonListItemWidget> { @Override public PersonListItemWidget create(int index) { PersonListItemWidget widget = new PersonListItemWidget(); panel.insert(widget, index); return widget; } } @UiField VerticalPanel panel; private ListEditor<Person, PersonListItemWidget>

How to use GWT's Editor Framework with gwt-platform?

浪子不回头ぞ 提交于 2019-11-30 07:16:13
I'm using gwt-platform and tried to implement GWT's editor framework. But I don't get it working from within the presenter. There are some answers around the web, that say I have to inject the EditorDriver somehow into the Presenter, but I don't know how to do this... At the moment I tried this without success: public class MyPresenter extends Presenter<MyPresenter.MyView, MyPresenter.MyProxy> implements MyUiHandlers { public interface MyView extends View, HasUiHandlers<MyUiHandlers>, Editor<MyModel> {} @ProxyStandard @NameToken(NameTokens.myPage) @NoGatekeeper public interface MyProxy extends

How to implement GWT editors for subclasses of a type?

久未见 提交于 2019-11-28 12:59:01
Let's say I have an object hierarchy like this: Account > Site > Supply An Account is an actual company, a Site is a building they have, and a Supply is either an ElecSupply or GasSupply . Supply is never instantiated and could be an abstract class in theory. I am using Objectify for persistence, and have a page that displays the list of Supplies for each Site, regardless of whether they are an ElecSupply or GasSupply . Now I am implementing the GWT Editor Framework and have come up against a problem with this polymorphic entity. How do I implement an Editor and set of sub-editors for an

Using GWT Editors with a complex usecase

落花浮王杯 提交于 2019-11-27 11:30:37
I'm trying to create a page which is very similar to the Google Form creation page. This is how I am attempting to model it using the GWT MVP framework (Places and Activities), and Editors. CreateFormActivity (Activity and presenter) CreateFormView (interface for view, with nested Presenter interface) CreateFormViewImpl (implements CreateFormView and Editor< FormProxy > CreateFormViewImpl has the following sub-editors: TextBox title TextBox description QuestionListEditor questionList QuestionListEditor implements IsEditor< ListEditor< QuestionProxy, QuestionEditor>> QuestionEditor implements