Editors framework and MVP - gwt

Is there a conflict in development or architecture that prevents me from using Editors inside the View in a GWT MVP application?
I am developing a business application and I am thinking of making Editor widgets for my beans and use RequestFactory. I will place editors inside the views when I need to display or edit single object but I will use CellWidgets when I need to display multiple objects.
Will this make a mess of my application or am i heading to the right direction?
What do you recommend according to your experience?

There's no conflict between Editors and MVP. Editors are for easy binding between view and backing beans. Using them together you can fill model via Editor framework.

Related

TreeView instead of WebView?

Once createTreeView() has created a TreeView instance, the reveal() takes your derived implementation of TreeItem. The reveal() does not take a ViewColumn as does the WebView[Panel]. The only way the vscode extension API can specify a ViewColumn is either a ExtHostTestEditor which implements the TextEditor interface, and the WebView. So do all custom editors have to be implemented with WebView? Are TreeView(s) only for activity bar side views?
It seems odd, since there is the admonition to not use WebView(s) since they are so heavy weight. Plus there is additional effort to make the WebView's look-and-feel match the editor. The vscode-json-editor uses a WebView and I haven't found any custom editors that do not use a WebView. Validating the WebView approach would help avoid going down a whole host of rabbit holes. Thank you.
These types of views have different use cases. Here's a quick overview of each VS Code 1.28:
TreeView
TreeViews can be shown in the side bar, such as in the explorer or source control section. Tree views use a data driver api where VS Code controls the presentation. This means that you get a lot for free but that you cannot fully customize the behavior of a tree view.
Use a tree view if you want to add an additional data view. A good example of a tree view would be a custom file explorer, showing the outline of an editor, or presenting a list of resources.
WebView
Webviews can be shown in an editor. They can contain any sort of html content but you are entirely responsible for the user experience of this content.
Use a webview if you need a custom user experience or need to present a completely custom view of data.

GWT: In an MVP design, should the underlying page layout be a considered a view?

I have been following the GWT MVP tutorial (https://developers.google.com/web-toolkit/articles/mvp-architecture-2) and while it all makes a lot of sense, I have some trouble taking it from the example they explain to a larger scale application.
In particular, I would like to use a DockLayoutPanel to have a separate navigation, content and header section. What I'm struggling with is primarily the question of: where does the main dock panel live? Is it a view with it's own associated presenter? Does it constitute a special case where I don't want to use a view as this is really just the fundamental page layout?
It would be greatly appreciated to get some practical insights from people having faced a similar issue before.
Well I think as always it depends.
But I would recommend to create a View (i.e. MainPageView) with it's own associated Presenter (i.e. MainPagePresenter) even when there is almost no business logic and the View only defines the layout of the application.
Maybe in the future there will be some business logic.
For example if you want to show alerts or notification popups to a user you will probably do this in this View.
So your MainPagePresenter will listen for Notification events on the global EventBus and once an event is fired from any nested Presenter it will display a notification popup in the MainPageView.
Another use case would be if you want to display breadcrumbs in the north panel.
Of course you could create a separate Presenter for breadcrumbs but IMHO that's too much overengineering. You could however easily do that in the MainPagePresenter
I am using GWTP as my MVP framework and there it is really trivial to create View/Presenter pairs and it also supports nested PresenterWidgets which you can for example embed in any panel of your DockLayoutPanel
After searching for something related, I stumbled across another thread that asks a similar question and was quite insightful for me:
GWT MVP - maintaining multiple displays that are separate of one another

GWT Editors - handling different layouts for view / edit / create

I'm starting to work with the GWT editors framework.
My app allows to view some entities, edit them, or create new ones.
However, in each state, the layout of the form is a bit different -
Labels in "view" mode should become textboxes in "edit" and "create"
Some fields are only visible in edit/create mode but not in view mode
Some fields are only editable when creating but cannot be changed later on in edit
The general layout might differ (order of fields, location in the form)
Many, many more...
I know that this is a very very general question - I'm looking for best practices that will be powerful yet flexible to deal with those issues. What I'm afraid of is having to write three different editors...
Maybe you don't like to hear this but I create different editors for each. But finally, that's hardly more to implement than a different UIBinder with corresponding Composite for each editor. The subeditors are the same so it does not comprise that much work at the end of the day;

j2me form how to define gui properties

i'm new to j2me. how to set form elements (text field ,text box) width,font,alignment and other Gui related properties.
i tried to find solution for setting form background but no success. can you guide me
Firstly, J2ME is a very limited framework.
As far as I can remember if you are just using an item from the basic javax.microedition.lcdui package there is very limited styling available. It allows you to give directives on how to lay the item out on the screen and what the item's appearance mode will be.
An Item is not responsible for where it is placed and is down to the Screens layout management algorithm to place your item on the Screen. For example, the way Items are laid out on Forms and Lists differ based upon how the layout management works.
You can create your own customs items by extending CustomItem and implementing and overriding various functions to get the desired visual effect. This however is a lot of work
and the end result is not always very pleasing. You could also do the same by extending the Form class and overriding the paint methods to get your disered visual effect.
The best way to have control over form elements is to use one of the Widget like frameworks that exist and are built upon these basic J2ME classes. For example LWUIT and J2ME Polish allow you to style items in a very similar manner and layout Items using a CSS box inspired manner.
Although I have no used LWUIT so cannot vouch for it.

Panel Control for MVC?

I am looking for a Panel UI option comparable to the AJAX Update Panel or ASP.NET Panel Server controls for MVC but so far I am not getting much results.
I am not interested so much in the AJAX Panels capability to control full page postbacks since that's not an issue in the MVC world, but toward of the ability to contain other objects within another container on the page with scrollbars.
I have used the div tags in effort to simulate this and its a hack at best because I am rendering a object tree structure and sometimes the scrollbars don't seem to detect the need to be present using overflow: scroll; and setting it to always be present does not neccessarily mean that the scrollbars will be functional when needed.
Can anyone provide some direction to a web control that would give this functionality for MVC? Preferrably free. :-) I have found nothing in the Telerik suite of controls for MVC for this.