Questions tagged [presenter]

In MVP pattern the presenter acts upon the model and the view. It retrieves data from repositories (the model), and formats it for display in the view.

143 questions
0
votes
0 answers

Using presenters in Laravel 5

I've watched Laracasts video about presenters and I want to use them in my project. I have a page where I display user activity log. In foreach loop I display "activity" model. Activity uses polymorphic relationship, so depending on the activity…
Victor
  • 5,073
  • 15
  • 68
  • 120
0
votes
2 answers

Using a presenter on attributes in a pivot table in Laravel

I'm just wondering how to go about implementing the Presenter pattern for attributes inside of a pivot table? For example, consider this code (it's just an example and is not a replication of my actual code): @foreach($users->comments as $comment) …
keonovic
  • 47
  • 4
0
votes
0 answers

Presenter classes, in a tree model diagram

Many presenters, have something of the form of class MyClassPresenter < SimpleDelegator def something_extra end end view_obj = MyClassPresenter.new my_class_instance I want to transverse the instance: view_obj.nested_obj.nested_obj.value This…
Daniel
  • 7,006
  • 7
  • 43
  • 49
0
votes
1 answer

How to parse json with array to presenter with collection?

I receive from external service JSON with trainings information for my current_user(by email). { “id:”5357c5d17303b5357c5d173078”, “email”:”some@email.com”, ”trainings”:[ { “training_id“:…
tomekfranek
  • 6,852
  • 8
  • 45
  • 80
0
votes
2 answers

mvp4g LazyPresenter with option multiple=true is binded twice

I am using mvp4g in my gwt project. For one of my presenters I am using option multiple=true and I am creating and binding presenters in that way: ObjectPresenter mainObject = eventBus.addHandler(ObjectPresenter.class,…
kpater87
  • 1,190
  • 12
  • 31
0
votes
1 answer

undefined method `SomePresenter' for SomeNamespace:Module

I user namespace to create some module in Rails. It works fine in controllers, models, but something is wrong with presenters which are in a presenters path. This is one of presenters, without namespace: class MainPresenter < Struct.new(:main,…
ciembor
  • 7,189
  • 13
  • 59
  • 100
0
votes
1 answer

ASP.NET Model-View-Presenter and List versus Details

In Model-View-Presenter what is the correct pattern to do a page that: a) contains a grid for browsing a list of items b) an alternate mode for editing single items maybe you are toggling between two asp:panels. Do you just make the presenter…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
0
votes
0 answers

How to wait for RPCs from another presenter?

Im using gwt-platform and I have 2 Presenters ( MainpagePresenter and SecondpagePresenter). MainpagePresenter is my DefaultPlace. So, onModuleLoad I am starting to load data from the server part with rpc and saving my data into the client cache. I…
kArvee
  • 84
  • 1
  • 11
0
votes
1 answer

Using presenters (Ryan Bates' style) without an associated model

I would like to use presenters (as seen here: http://railscasts.com/episodes/287-presenters-from-scratch?view=asciicast) to clean up my static_pages views, but his method seems to rely on an underlying model, which static_pages does not have. Can I…
jackerman09
  • 2,492
  • 5
  • 29
  • 46
0
votes
1 answer

Rails: Presenters, Facades, and Helpers - where does the html markup go?

In a fairly large rails application we are running into the issue of overly complex views. Most of the views have too much logic. Views have between 2 and 4 related instance variables, and make use of various logic checks and helper methods to…
Drew
  • 738
  • 8
  • 15
0
votes
1 answer

How to refine strokes of an inkpresenter WP8

I'm using ink presenter to draw the strokes. But the problem is while drawing curved lines, its draws jagged lines.. Straight lines do not have a problem. This is how I have done.. I dont know where to make changes so as to make the lines smoother. …
alfah
  • 2,077
  • 1
  • 31
  • 55
0
votes
1 answer

Laravel presenting data when returning JSON

I have an issue with presenting data from an Eloquent model as JSON. Let's say I have a Post model extending Eloquent. If in my route I simply return Post::find(1) I will have the following JSON : { id: 1, title: "My cool blog post", …
Lukmo
  • 1,688
  • 5
  • 20
  • 31
0
votes
0 answers

How to create AsyncCallback call for Presenter Widget in GWTP?

Ok, we often see people use AsyncCallback for client to call methods from Server. That's easy, even more easy if we use GWTP platform. My question is how we create AsyncCallback for a presenter widget in GWTP? Thre is no server involved. Ex, i want…
Tum
  • 3,614
  • 5
  • 38
  • 63
0
votes
1 answer

Setting presenter property throws 'cannot be used as type parameter' exception

Here's my presenter class: public class ListPresenter : Presenter where TViewInterface : IContextView, IListView where TContext : IObservableObject { protected…
0
votes
2 answers

GWTP : events and nested presenters

I have some problems with events in GWTP. I have a MainPresenter which extends TabContainerPresenter. This presenter is linked to a MainView which contains some ui components + some com.gwtplatform.mvp.client.Tab : HomeTab, ContactTab and so…
user2147970
  • 412
  • 2
  • 7
1 2 3
9
10