gwt-editors

How to implement GWT editors for subclasses of a type?

北慕城南 提交于 2020-01-19 15:06:47
问题 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

How to implement GWT editors for subclasses of a type?

戏子无情 提交于 2020-01-19 15:06:29
问题 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

ListEditor with polymorphic types

五迷三道 提交于 2020-01-15 06:30:08
问题 I have searched around and been trying to figure out if I can use the editor framework with polymorphic types. I found this post at Using GWT Editors with a complex usecase which is close to what I am trying to do. I am fairly new to the editor framework, so any help would be much appreciated. For example, here is some of the code, Data Transfer Objects: public class Employee{ public List<Contact> contacts } public class Contact { public class ContactEmail extends Contact {} public class

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

安稳与你 提交于 2020-01-13 19:39:27
问题 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

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

吃可爱长大的小学妹 提交于 2019-12-30 02:19:09
问题 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

Using GWT Editors with a complex usecase

蓝咒 提交于 2019-12-28 03:32:09
问题 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

GWT CompositeEditor - Dynamically switched editor not being added to chain properly

做~自己de王妃 提交于 2019-12-25 07:16:30
问题 I've got a value type Commission that's part of a larger editor graph: public class Commission implements Serializable { private CommissionType commissionType; // enum private Money value; // custom type, backed by BigDecimal private Integer multiplier; private Integer contractMonths; // ... } What I want to achieve is to initially only show the dropdown for the commissionType enum, and then select an appropriate sub-editor to edit the rest of the fields based on the value selected: I have

Implement NullableSetEditor by wrapping a NullalbleListEditor

℡╲_俬逩灬. 提交于 2019-12-13 07:34:02
问题 I have a working NullableStringListEditor implementation: public class NullableStringListEditor extends Composite implements IsEditor<OptionalFieldEditor< List<String>, ListEditor<String, StringEditor> >> {...} Now, I am building a NullableStringSetEditor by wrapping it: public class NullableStringSetEditor extends Composite implements ValueAwareEditor<Set<String>>, LeafValueEditor<Set<String>> { private NullableStringListEditor wrappedEditor = new NullableStringListEditor(); @Override public

Editing Collections with GWT Editors and RequestFactory

帅比萌擦擦* 提交于 2019-12-12 10:07:25
问题 See the orignal question for context. Additional Context: Objectify-Appengine is used for persistence. FormProxy and QuestionProxy are of type EntityProxy QuestionDataProxy and its subtypes are of type ValueProxy All Editors implement HasRequestContext , and in the case of QuestionData subtype Editors, HasRequestContext.setContext() is called explicitly from the parent. The first problem has to do with Collections, and the second has to do with Polymorphic types. I'm not sure if the problem

How to get access to underlying POJO from GWT Editor class

时光毁灭记忆、已成空白 提交于 2019-12-10 19:27:14
问题 I have a HashMap inside my POJO that I am using the Editor framework in GWT to edit. While I have access to the standard member variables bound through thier getters/setters, I don't know how to access the values inside the HashMap. How do I get access to the underlying POJO that is being edited through my editor that is using the SimpleBeanEditorDriver? My POJO: @Entity(noClassnameStored=true) public class ProfileConfig extends BaseEntity { @Indexed(unique=true) private String name; private