Swixml limitation?

Troy Ames <[email protected]> Mon, 30 Aug 2004 11:18:43 -0400
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
I have been looking at Swixml and there appears to be a couple of 
limitations supporting the common MVC pattern. Or perhaps I am just 
missed something.

I would like to have the capability to have multiple views on the same 
instance of a model. This appears to only be supported by swixml if the 
model is a singleton. In addition some views have more than one model. 
To support the latter perhaps an extension of the initclass attribute 
that allows a delimited list of models would be sufficient:

    <table  initclass="MyTableModel, MyColumnModel, 
MyListSelectionModel" ... />

If a constructor existed with all of the models in the correct order 
then the engine would construct the view using it.

The limitation with respect to controllers is that you cannot specify 
controllers at a smaller granularity then one per swixml instance. I 
would like to do something like:

<frame id="frame_1" controller="MyFrameController" ...>
    <panel id="panel _1" ...>
            <panel id="subPanel_A" controller="MyAController" ... />
            <panel id="subPanel_B" controller="MyBController"  ... />
            <panel id="subPanel_C" controller="frame_1" ... />
    </panel>
</frame>

Subpanels A and B both have their own custom controllers limiting the 
scope of contained actions. They could even have the same named actions 
just different implementations (likely if you are including external 
files). Subpanel C would reuse the controller specified by "frame_1". 
This would provide greater flexibility creating a MVC based GUI.

--Troy