Contents contributed and discussions participated by Esfand S
Share user input data within MVP + Lady_Gaga - Google Web Toolkit | Google Groups - 0 views
-
use the history and pass the information as parameters in the history token.
-
has a number of advantages provided the parameter is serializable (and small enough). For example, it could let the user bookmark the detail page of "Lady_Gaga". A bit trickier when the presenter is a dialog box, but totally doable.
Client session - Google Web Toolkit | Google Groups - 0 views
-
The way I would do is to define a application event (eg. LocationEvent<LocationHandler>) & handler encapsulating whatever data (ex. co ordinates) that you need to send and fire the event. First presenter fires the event when the mouse is clicked. Second Presenter handles the event and takes appropriate action.
DockLayoutPanel MVP and events - Google Web Toolkit | Google Groups - 0 views
-
how does the PlaceChange Event gets fired?? As of 2.1M2, PlaceController still isn't bound to History, so only PlaceController#goTo will fire first a PlaceChangeRequestedEvent (which can be rejected) and then (if the first hasn't been rejected by listeners) a PlaceChangeEvent.
Menu Item and MVP (2) - Google Web Toolkit | Google Groups - 0 views
-
>> Would the MenuItem class need to implement HasClickHandler so that >> when a MenuItem is clicked, the action can be handled in the >> presenter. At this time, the MenuItem needs an object that implements >> the Command interface, so the view seems to know about the presenter. >> I would like to know what others think about this.
DockLayoutPanel MVP and events - Google Web Toolkit | Google Groups - 0 views
-
he generally adopted way of doing things in GWT is to have custom events go through the event bus. In this case, you're talking about "navigation", so maybe the concept of "place" would be better than "just" some custom event. I encourage you to look at gwt-platform, gwt- presenter and other MVP frameworks for GWT, and/or look at the Activity concept from the upcoming GWT 2.1. Using actvities, you'd have an ActivityManager managing your "center". The tree would use the PlaceController.goTo to navigate to a new "place". An ActivityMapper (that you passed to the ActivityManager in the constructor) would map the place to an Activity (a presenter), and the ActivityManager will manage the current Activity for the display it manages, i.e.it will stop() the current activity if its ok (willStop returns true) and then only start the new Activity, which will call the Display back to show its view. The tree would probably also listen to PlaceChangeEvent on the event bus to update the selected item depending on the current place (in case some other component calls the PlaceController.goTo)
DockLayoutPanel MVP and events - Google Web Toolkit | Google Groups - 0 views
-
he generally adopted way of doing things in GWT is to have custom events go through the event bus. In this case, you're talking about "navigation", so maybe the concept of "place" would be better than "just" some custom event. I encourage you to look at gwt-platform, gwt- presenter and other MVP frameworks for GWT, and/or look at the Activity concept from the upcoming GWT 2.1.
-
Using actvities, you'd have an ActivityManager managing your "center". The tree would use the PlaceController.goTo to navigate to a new "place". An ActivityMapper (that you passed to the ActivityManager in the constructor) would map the place to an Activity (a presenter), and the ActivityManager will manage the current Activity for the display it manages, i.e.it will stop() the current activity if its ok (willStop returns true) and then only start the new Activity, which will call the Display back to show its view. The tree would probably also listen to PlaceChangeEvent on the event bus to update the selected item depending on the current place (in case some other component calls the PlaceController.goTo)
MVP multiple buttons/fields - Google Web Toolkit | Google Groups - 0 views
-
Start moving the code of addStock to the view. Try not to use widget code on the presenter. Then create an interface and implement in the presenter: class SomeViewHandlers { void deleteStock(Stock code); } You already have the deleteStock method... so just add "implements SomeViewHandlers" to it. Then you need to give to the display that interface (generally in the constructor): display.setViewHandlers(this); Then in the presenter lease the method as: private void addStock(JsArray<Stock> stocks) { display.addStock(stocks); } And in the view copyPaste the code of the method and change this: removeButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { *viewHandlers.*deleteStock(code); } });
concerns on 2.1 MVP approach - Google Web Toolkit | Google Groups - 1 views
-
I really do not approach the different features of 2.1 as a whole "MVP" set of things: there's - RequestFactory and ValueStore (I don't think ValueStore has any real use besides RequestFactory, though I'd be happy to be proved wrong) for a record-oriented client-server communication; - Cell-based widgets for efficient data-backed lists, trees and tables - PlaceController as typed layer over History (objects rather than strings, even though it's not yet plumbed to History, which at least proves it can be used without it) - ActivityManager as an "application controller" (to use the term from the GWT tutorials) on top of PlaceController - and on top of that, GWT provides some base activities plumbed with RequestFactory - and finally, though it's not documented at all, EditorSupport which works with UiBinder in a view to generate "data-binding code" (as far as I understood) You're free to use any of them independently of the others.
concerns on 2.1 MVP approach - Google Web Toolkit | Google Groups - 0 views
-
o summarize, here are some quotes: * It's extremely fast to build an initial scaffold (CRUD for all entities), but I'm not sure how easy it is to customize it for real world usage * When skimming the generated sources I saw A LOT of artifacts, which I don't feel comfortable with because it means that although "officially" my code is not coupled with Roo, if I were to drop it I would have to manage all these generated artifacts myself. * This expenses example is a nightmare to follow. The bindings/ wiring of all the pieces both client and server is nuts. * In M2, things have been cleaned up a bit
overlook - Tech Blog - 2 views
-
The main issue in MVC is that these three elements are tighly bound together: the controller has to register to both the model and the view (and unregister if either changes), and when a view serves multiple controllers or a controller uses multiple models, that becomes quickly a mess.
-
MVP approach is more message-oriented. All messages (events) are fired on a single EventBus that is shared by all Presenters. Each presenter listens to events of interest, and fires new events according to actions. So a change in the in the EmployeeModel may be fired with an EmployeeModelChangedEvent, instead of attaching a listener to the model object. And we can easily create new Presenters that receive that same event and react accordingly.
-
The magnitude of such a shift is great: the model is no more the center and source of events (which would require special care in attaching and detaching to a specific instance), but it more a passive container of data, which may be copied, proxied, transformed, cached, without the GWT appliction any special care.Since the model is more a container of data ment for communication, I've highlighted the fact that it needs to be Serializable.
- ...11 more annotations...
MVP with EventBus question - Google Web Toolkit | Google Groups - 0 views
-
Yeah, the one problem with UiBinder and MVP is this pattern collision.... UiBinder says, "view are directly attached to views". MVP says, "view's are attached to presenters, if you want to chain views the presenters control this". Consequently, you can't get UiBinder to create your @UiFields (i.e. empty constructor) and you can't get Gin to @Inject them into the view either... because they are in the presenter. Unless of course you use @Named+Singleton bindings in Gin and then both presenter and view will be injected with the same object. This is the one bit of boilerplate we're still writing.
-
I looked into that, and (unless I'm wrong), I think that @UiField(provided=true) will cause the UiBinder to look in the .ui.xml file for argument to satisfy Foo. In my case I am trying to "inject" an EventBus into the widget, not a visual element.
History and server call. - Google Web Toolkit | Google Groups - 0 views
-
First, though, I think you shouldn't call it MVP. In my opinion it seems that what you're doing is MVC where the model is helped out by RPC. There is already so much variety in the meanings of this (MVP, MVC, etc...), especially with Activities and Request Factory coming into the picture that terminology is becoming important. Not because I don't know what you're describing, but because someone new to the frameworks will get thoroughly confused.
MVP questions - Google Web Toolkit | Google Groups - 0 views
-
What is the best way to implement that ? 1) only one couple of presenter/view for object1 and this couple manages the display of object2 in each tab 2) one presenter/view object for object1 and one presenter/view for each instance of object2 ? in other words, do I have one couple of presenter/view by object model ?
« First
‹ Previous
101 - 120 of 212
Next ›
Last »
Showing 20▼ items per page