0
votes

I currently use a CompositeView to display numerous ItemViews, each representing a comment. Now, I want to be able to reply to a comment: when the user selects a "reply" button (part of the ItemView), I want to show a form right underneath the comment for the user to reply in.

My idea was to use a Layout for this, containing two regions: one for the comment (as currently represented by the ItemView) and one for the reply form (the latter being only shown after the user clicks the "reply" button).

Is it possible to specify a Layout as the itemView-property of a CompositeView and render the original ItemView (representing, in my case, a comment) within this Layout?

1

1 Answers

1
votes

Layout extends ItemView adding support for regions, so that should work fine. When you handle the 'reply' event, display your commenting view in your (previously empty) comments region.