nfuids
13 Dec 2011, 7:33 AM
Hi,
I have a viewport set up like that:
North: Application header with a few link like Help and Logout
West: Accordion panel that acts as a menu
Center: A tab panel that act as the main container, may contain any kind of stuff
South: Application footer
Right now, I added a tab in the center tab panel and that has a "ProcessGroupMasterPanel" in it. This panel is configured like that:
Center: a grid displaying data
South: a Detail pane that display the currently selected item in more detail
In the detail pane, I have a toolbar with a "Open in new tab", so the user can open the selected item in its own tab.
Where should the event listener be, with respect to the MVC framework. The data are about "Process group".
I created a ProcessGroup controller that listen to the grid selected row event and update the detail pane, and the itemdoubleclick event to open up an edit window, but these are all events that can/should be managed for the "ProcessGroupMasterPanel", so it makes sense.
But now I want to open new tabs and all, that are outside the ProcessGroupMasterPanel, I think it would make sense to have some sort of MasterController that would listen for application wide event and act appropriately, what do you think?
That way, my widget/component could fire event such as "OpenTab" with parameter saying what should be in that tab and that MasterController, which would have references to the main tab panel could listen to that and create the tab.
I inspired all this by the "FeedViewer" demo, but this demo is not using the MVC framework... So I adjusted mine to work like that and came up with this question!
Thanks
I have a viewport set up like that:
North: Application header with a few link like Help and Logout
West: Accordion panel that acts as a menu
Center: A tab panel that act as the main container, may contain any kind of stuff
South: Application footer
Right now, I added a tab in the center tab panel and that has a "ProcessGroupMasterPanel" in it. This panel is configured like that:
Center: a grid displaying data
South: a Detail pane that display the currently selected item in more detail
In the detail pane, I have a toolbar with a "Open in new tab", so the user can open the selected item in its own tab.
Where should the event listener be, with respect to the MVC framework. The data are about "Process group".
I created a ProcessGroup controller that listen to the grid selected row event and update the detail pane, and the itemdoubleclick event to open up an edit window, but these are all events that can/should be managed for the "ProcessGroupMasterPanel", so it makes sense.
But now I want to open new tabs and all, that are outside the ProcessGroupMasterPanel, I think it would make sense to have some sort of MasterController that would listen for application wide event and act appropriately, what do you think?
That way, my widget/component could fire event such as "OpenTab" with parameter saying what should be in that tab and that MasterController, which would have references to the main tab panel could listen to that and create the tab.
I inspired all this by the "FeedViewer" demo, but this demo is not using the MVC framework... So I adjusted mine to work like that and came up with this question!
Thanks