Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 255097 - UI - Request to remove input fields from facet install page
Summary: UI - Request to remove input fields from facet install page
Status: RESOLVED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Gerry Kessler CLA
QA Contact:
URL: ORACLE_P2
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-12 15:07 EST by Scott Paxton CLA
Modified: 2009-04-29 23:11 EDT (History)
4 users (show)

See Also:
david_williams: pmc_approved+
raghunathan.srinivasan: pmc_approved? (naci.dai)
deboer: pmc_approved+
raghunathan.srinivasan: pmc_approved? (neil.hauge)
raghunathan.srinivasan: pmc_approved? (kaloyan)
raghunathan.srinivasan: review+


Attachments
Proposed fix (30.75 KB, patch)
2009-04-22 17:44 EDT, Gerry Kessler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Paxton CLA 2008-11-12 15:07:11 EST
This is a new feature request to separate out some comments I made to Bug 251934.  In light of the new Library Provider framework, which allows much more direct control for setting up a project, I'd like to recommend removing the remaining input fields on the facet-install page.  At best they seem to be showing defaults that would rarely or never be changed by a user, and at worst the values actually contradict what a library provider may do to the project config.

These UI fields are:

JSF Configuration File
JSF Servlet Name
JSF Servlet Classname
URL Mapping Patterns


One use case I'm thinking about here is installing the JSF facet into a project that targets a portal server.  In the portal case there is actually no FacesServlet, but instead a Faces Portlet that gets defined elsewhere (not in web.xml).  In my current implementation I have an additional facet that "fixes up" the configuration that the JSF facet already performed, by removing the servlet declaration and mappings from web.xml and doing whatever other portal-specific setup that's required.  I'd like to move that logic into a library provider and not require the weight of an extra facet, which consolidates the project setup steps nicely.  But in any case the JSF facet page is showing the values for the JSF servlet info which will not end up in a portal project in the end.  I have no problem with the JSF facet installer doing setup with these default values (i.e. I'd still remove the FacetServlet myself), but I don't think they should be shown in the UI here.

Similarly, our adopter product prefers the standard "*.faces" servlet mapping, which is not given as a URL Mapping Pattern by default.  We always add that as an additional mapping after-the-fact (again, this would ideally be incorporated into a library provider going forward).  Once again the UI is therefore inconsistent with the results.  

So I'd like see these fields removed from the facet install page.  I personally think they are such obvious defaults that they shouldn't need to be changed by most end-users anyway (though I did find Bug 154573 which might be relevant).  But even if they are necessary to keep around in a user-editable way, moving them into product preferences may make more sense.  Preferences has the advantages of:  a) the values shouldn't need to change on a project-by-project basis so it de-clutters the facet page, and b) an adopter product can more easily change default values in prefs by using a product plugin (ex. overriding the FacesServlet classname as in 154573, or adding the *.faces URL mapping as in my scenario).
Comment 1 Gerry Kessler CLA 2008-11-17 13:36:02 EST
Adding Eric Norman to bug for his comments in case he wants to chime in.
Comment 2 Raghunathan Srinivasan CLA 2009-03-13 19:16:17 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a
"hotbug" (requested by an adopter) please document it as such. 
This is a hot-bug requested by Oracle and others. This will clean up the UI associated with the JSF Facet and complete the adoption of the Library provider framework.
    * Is there a work-around? If so, why do you believe the work-around is
insufficient?
No
Comment 3 Gerry Kessler CLA 2009-04-22 17:44:28 EDT
Created attachment 132850 [details]
Proposed fix

Attached is a patch that should be sufficient to resolve this bug.   This has not been checked in yet to give brief time for comments.

A new extension-point has been supplied to allow adopter products to take full control of the JSF facet configuration by allowing the adopter to disable and hide JSF configuration elements.   An adopter will need to supply a facet install listener that will perform all configuration.

When this extension is present and the disabled flag is set: 

1) No configuration will occur: 
 - faces configuration file will not be created or modified 
 - web application (web.xml) will not be updated 

2) The JSF Facet installation page will NOT display UI for, and the underlying facet data model will not contain: 
 - JSF Configuration File 
 - JSF Servlet Name 
 - JSF Servlet Classname 
 - URL Mapping Patterns 

We are open to making the configuration options more extensible in the future.
Comment 4 Scott Paxton CLA 2009-04-24 16:38:51 EDT
Thanks Gerry.  I've tested the patch via a new extension point contribution and this does exactly what I was hoping for.
Comment 5 Gerry Kessler CLA 2009-04-27 13:34:04 EDT
Patch has been checked in to HEAD.  4/27/09.