GWT MVP with Activities and Places - “global” references?

后端 未结 1 376
暗喜
暗喜 2021-01-17 03:50

I\'m slightly confused with the GWT MVP Development with Activities and Places example. It\'s the first time I approach such a design pattern. I managed to implement it in m

相关标签:
1条回答
  • 2021-01-17 04:27

    you've encountered the problem described elsewhere in Stack Overflow (GWT MVP with Places & Activities - Where's the Model?) - the Activities & Places demo doesn't cover the Model component of MVP.

    Whilst it feels wrong, I recommend store this model data instance in your ClientFactory, or have your ClientFactory provide a getModel() method. The data model return could include your global option.

    Alternate strategies presented in the above article are for your 'disposable' activities actually obtain a persistent Presenter from the ClientFactory, or for your Activity to retrieve the data model on creation.

    0 讨论(0)
提交回复
热议问题