[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: Facet install delegate child facet mechanism

Thanks Konstantin, that makes sense. From a UI perspective though there is a case where it still may be convenient. An example is the servlet-mappings. The JSF facet installation UI collects servlet-mapping url patterns from the user to initialize the web.xml for the Faces servlet. But if we have a dependent facet that we know will override these with separate UI in the next page of the new project wizard, this is confusing to the user. Ideally, if we know a piece of install data will be overridden, we would hide the UI.

Perhaps there is room for mechanism in the installation data model that allows facets to say "I will be setting property 'org.eclipse.jst.jsf.SERVLET_MAPPINGS'" which be constructed in such a way that overrides could be detected and a parent facet could ask "if not 'o.e.j.jsf.S' overridden, then show my UI".

Since the overriden data is overriden hierarchically (dependent facets override parents in a tree structure), the "install A and B, B->A" case would still behave the same as "install A and some time later B, B->A".


--Cam

Konstantin Komissarchik wrote:

I would recommend making the web.xml change that makes sense for the JSF-only case in the JSF install delegate. A facet that depends on JSF would then override the change in it's own install delegate. This might seem less-than-optimal, but this way it is much easier to make sure that the right thing happens in all cases. For instance, the "facets A and B installed at the same time" case should ideally behave identically to the "facet A is installed first, then facet B is installed some time later". This approach also makes it easier to figure out what should happen on uninstall.

Hope this helps.

- Konstantin