Make App's showView()
more consistent when working with new vs. existing views.
#436
Labels
showView()
more consistent when working with new vs. existing views.
#436
App's
showView()
method can take a view name or an existing view instance. A problem arises with ad-hoc attributes in the following scenario:When passing an existing view instance with the
update
option set, theshowView()
method will callsetAttrs()
on the view instance with anything in theconfig
argument. This means that atemplate
attribute is created.Compare the above with calling
showView()
using a named view:The problem is that non-ad-hoc attributes specified in a view class'
_NON_ATTRS_CFG
property only apply at construction time.Some possible solutions:
_NON_ATTRS_CFG
whenshowView()
is updating an existing view.showView()
'supdate
option, and let people who are managing their own view life cycles, also manage updating their view's properties and attributes.I don't see a great solution above to address this. I'm open to hear other ones and/or which of the above you like best.
The text was updated successfully, but these errors were encountered: