Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6367091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:30:20+00:00 2026-05-25T00:30:20+00:00

I been reading through Large scale application development and MVP and I was wondering

  • 0

I been reading through Large scale application development and MVP and I was wondering how you guys deals with dynamically added components within this suggested way of implementing the pattern.

Lets say you have a table, where you have three buttons in each table row, and table rows can be added dynamically. How would you guys suggest binding these to the presenter?

The new row, if following Google’s proposed structure, will get generated in the view, which does not have a direct link to the presenter and can not call back to it (so no calling bindNewButtons(Button, Button, Button)-ish type method).

So, what’s good practice here? I was thinking since the presenter will be handling the event which adds a new row in the widget inside the view (handles as in, fires the method in the view which generates this new row), I could have a getRowButtons(int index) method in the view, and then using this to retrieve the components and bind them after they where added.

I’m sure there’s a more clever way of doing this though, so I’m seeking a bit of advice here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:30:20+00:00Added an answer on May 25, 2026 at 12:30 am

    The second article in this series shows a view which does have a reference to the presenter.

    The view:

    private Presenter<T> presenter;
    
    public void setPresenter(Presenter<T> presenter) {
        this.presenter = presenter;
    }
    

    The presenter:

    public interface Presenter<T> {
        void onAddButtonClicked();
        void onDeleteButtonClicked();
        void onItemClicked(T clickedItem);
        void onItemSelected(T selectedItem);
    }
    

    You could now define a method in the presenter interface which has a parameter which indicates which row was clicked. If you don’t want to make the view aware of the presenter interface you could always choose to fire an event on the event bus which the presenter could respond to. Based on your question though, the first option seems a more reasonable answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading through the C++ FAQ and was curious about the friend
I've been reading through a lot of the rookie Java questions on finalize() and
recently I've been reading through Scott Meyers's excellent Effective C++ book. In one of
I've been reading through the details of the System libraries set and get methods
I've been reading through a few tutorials about css, and I saw two different
I have been reading through the CodePlex supported open source licenses, i couldn't quite
i've been reading through the linq to xml documentation in msdn and some other
I've been reading through Programming Clojure, and I've been having some trouble understanding Stuarts
I have been reading through this wonderful website regarding the recommended Python IDEs and
I've been reading through Beej's Guide to Network Programming to get a handle on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.