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
3 answers

WPF ViewModel not active presenter

There is a ViewModel that consists of some related object (nodes and lines( , How it can be possible to display (synchronize) these VM in View and keep object connections. I use some DataTemplate to map model to view but each object would be…
mehran
  • 1,314
  • 4
  • 19
  • 33
0
votes
1 answer

How can I remove the Activity context in a Presenter when it is required?

According to this post and some other blog posts, It is bad to have Activity Context in a presenter in an MVP android app. What if one of the method in the presenter requires an Activity context, how can I remove the Activity context in the…
s-hunter
  • 24,172
  • 16
  • 88
  • 130
0
votes
1 answer

Make the Stage transparent with Actionscript 2?

I have been given a build structure that is essentially a shell swf, which I have full access to, and it loads in swf content from Articulate, Presenter, Quizmaker and Engage. Unfortunately all of the above do not allow a transparent background…
danjah
  • 2,939
  • 2
  • 30
  • 47
0
votes
1 answer

Where to call for web API in Android MVP

I want to know what is the role of presenters in Android application development? And where should I call the data APIs? Should I send my data requests inside the presenter or inside the (fragment / activity)? Also, what is the role of the…
Murtadha S.
  • 442
  • 6
  • 15
0
votes
1 answer

Presenting current date in full text format

I am using jenssegers/date and carbon to display current date and time. I can display full date in textual way by use of this code: echo Date::now()->format('l j F Y H:i:s'); // example from jenssegers docs Now, in a Codrops demo the date is…
Peter
  • 2,634
  • 7
  • 32
  • 46
0
votes
1 answer

Rails 4 - how to write a helper method to present attribute names

I have a roles table with an attribute :name in it. I'm trying to use a list of role names in a collection select. Instead of listing the :name in the way it is recorded in the database, I want to present it neatly. For example, :name has an…
Mel
  • 2,481
  • 26
  • 113
  • 273
0
votes
1 answer

initialize method for an index action presenter

I want to make a presenter for an index action for Event. here is what it looks like. there will be more methods and things added to the presenter and the view, but right now I just want to get this working: class EventPresenter def…
sivanes
  • 713
  • 1
  • 13
  • 22
0
votes
1 answer

writing a presenter for index action

I would like to make a presenter for the Event index view, which currently iterates through all events like this: <% @events each do |event| %> <%= link_to event.name, event_path(event) %> <% end %> there will be many other things in…
sivanes
  • 713
  • 1
  • 13
  • 22
0
votes
1 answer

Is template variable getting initialized from self in application_helper.rb in this presenter?

So I see some code in a Rails 4.2 app like this the below. 1) What type of object is @template in kite_presenter.rb? Is it an instance of ActionView and that is how it has access to helpers such as image_tag? 2) If the answer to 1 is that is an…
Nona
  • 5,302
  • 7
  • 41
  • 79
0
votes
1 answer

Rails Presenter - Interacting with 2 different models that share the same attribute

I have 2 models in a large Rails app room and inquiry. They both share an attribute/column cancellation_policy. At the point at the point at which an inquiry (alias: booking) is made the cancellation_policy is copied from the…
0
votes
1 answer

Gwt Mockito: @RunWith(GwtMockitoTestRunner.class) causes Exception

I'm doing a project with gwt at the moment. I have to test a presenter using Eclipse Luna, JUnit and Mockito and have problems doing anything. After I failed with mockito I discovered GwtMockito and tried that. I used this example to get started:…
JWo
  • 650
  • 1
  • 6
  • 23
0
votes
1 answer

Implementing Find & FindNext functionality inside Windows form application c#

I want to enable Ctrl+F or find or search functionality inside my windows form application. My application comprises of a main presenter & sub-presenters. My search is simple text search but inside different sub-presenters consisting of editable…
User123456
  • 179
  • 1
  • 5
  • 14
0
votes
1 answer

use gazay/gon in presenter object

I'm using a presenter object to make some complex data available to my views. Part of the data I need there is intended to be rendered by javascript, and for this I would like to use the gon gem to share the data to the browser. This my (simple for…
Don Giulio
  • 2,946
  • 3
  • 43
  • 82
0
votes
1 answer

Rails - using presenters in forms

I am using Rails 4 to make an app. I use simple form for forms. I am making presenters which display a slightly different label on form inputs. I'm using them as follows: In the form: <%= f.input :description, :as => :text, :label => " <%=…
Mel
  • 2,481
  • 26
  • 113
  • 273
0
votes
1 answer

Rails call JavaScript from PORO presenter action and return result to View

I am unsure of what the best way of doing this is, or if my thinking is fundamentally flawed. I have a controller that creates a Plain Old Ruby Object (PORO) presenter on its #index action: # app/controllers/my_controller.rb class MyController <…
Bradley Marques
  • 502
  • 3
  • 22