This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
copy pasted from issue 172613: #1) The Description of the JSF File Type when using the New File wizard only mentions JSP pages and not Facelets. Needs updating for JSF 2.0 #2) When using the New File wizard it is confusing that there is a "JSF" choice underneath the "Web" category and a "JSF Page" choice underneath the "JavaServer Faces" category that do the same thing. The "Web -> JSF" option should be removed. #3) An index.xhtml and template.xhtml are create when a new JSF file is created using the New File wizard even if you don't want them. They are also created when adding the JSF Framework to a project. Both the Add Framework and New File wizards should have a checkbox to create a template. It could be skipped by default and have a New JSF Template wizard as a separate thing. (even creating a new JSF Managed Bean causes the unwanted JSF template files to be created)
re #2 - the same templates should have the same name if they are in multiple categories. In general I would say that having one template in several categories is fine - it makes it easier for user to find templates (for example JSF from Entity should be under Persistence but also under JSF). If we decide that "JSF" should be moved from Web to JavaServer Faces then what should happen to XHTML file template? Is it Web or JavaServer Faces category? What do you think guys? Based on the outcome we should also move JSF from Entity from Web to JavaServer Faces. And if it stays in Web then it should be moved to the top just underneath JSF template.
Re. #3 - I think that in practice you always going to use template file with facelets. Similarly like you almost always going to use some CSS file in your web project. That's why I feel slightly hesitant to not generate these files or adding yet another checkbox to UI for user to decide. What others think about it?
RE: RE: #3: But I don't get a CSS file created every time I create a new xhtml file. The thing is the files won't stay deleted, they IDE isn't listening to what I want as a developer. Why does creating a new JSF managed bean recreate these files after I've deleted them? From a training perspective I don't want to teach about templates when I'm trying to show JSF Hello World. I will have to train students to start with XHTML files and Plain Java Classes and avoid any JSF wizards. I could see having a New File option for a JSF template design pattern instead of a check box.
re. "The thing is the files won't stay deleted" - I see. That's definitely defect. The files should be created only once and that's when JSF framework is added to a project. But I can see that if I delete them and create second Managed Bean then index.xhtml and template.xhtml are recreated which is really silly bug. Alexey, could you please fix it and make sure the files are generated only if framework was added. If that's resolved will it be OK Matthieu or would you still prefer to not generate them even once (controlled via a checkbox)?
I could live with it. I posted to the Sun Instructor mailing list to see if any of the other instructors had an opinion.
Ok, #2: I'll made the same name in the Web category #3: index and template files will be generated only when adding JSF framework. Template wizard will be added(moved) from facelets support (Do we need template client wizard then, or existing JSF page wizard is enough?) JSF from entity wizard will be also available from JavaServer Faces. Did I miss something here?
pushed http://hg.netbeans.org/web-main/rev/1bf0d6f7a435 Marking as fixed. If I missed something, please reopen it or file new issue.
>#3: index and template files will be generated only when adding JSF framework. Please do not do that, generate just a simple JSF page (the one from JSF Page template). We already have a new JSF Template Wizard and will have new JSF Template Client Wizard soon. So for users who wants to use templates there is a simple way how to do that. I really do not see a big benefit in creating a relatively complicated template and its clien't by default. Also note Jim Driscoll's comment to issue #170828: >BTW - I'm still not delighted by the default project being a template setup - it seems like that won't be what users >*usually* want for a beginning JSF Project - if they do use templates, it's likely that those templates will be in a >separate directory, rather than the root, and it's likely that their first few projects won't use templates at all. I am sorry for reopening the issue even if Alexey fixed all the issues properly, it is just easier to refer to the context...
If you all think that template setup should not be a default then I'm OK to go with it. My main motivation is to make IDE which promotes useful features. And templating is such a feature IMO. The thing with templating is that if you start a new project you do not need templating till you reach certain size and you need to change css/js/layout in all your pages you realize how useful it would be to use templating since the beginning. And from then you will generally start next projects with templates - just for flexibility given. That's why I think IDE should be "smart" and push these features to user or at least make them aware of them. Perhaps New JSF Page wizard for facelets should have second panel allowing to choose an existing template or create a new one and generate template based page. I know that there is a separate wizard for Template and Template Client but I would do this just for sake of promoting templating feature. But it is definitely P3 and higher.
I filed issue 173064 to update JSF From Entity wizard which depends on presence of template.xhtml.
Integrated into 'main-golden', will be available in build *200909241442* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/1bf0d6f7a435 User: Alexey Butenko <alexeybutenko@netbeans.org> Log: #172828: JSF wizard issues
Integrated into 'main-golden', will be available in build *200909270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8f2c64639f60 User: Alexey Butenko <alexeybutenko@netbeans.org> Log: #172828: Generating simple index.html without template
Regarding #1 above: Suggest changing description: Creates new Facelets file of JSP file(JSP segment). To: Creates new Facelets file _or_ JSP file (JSP fragment). (Why not 'fragment', to correspond with the 'f' in .jspf ? Also, see: http://java.sun.com/javaee/5/docs/tutorial/doc/bnagy.html)
Thanks for the catch, it is just a typos, I'll fix it
Integrated into 'main-golden', will be available in build *200910010513* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b0710b4aa48f User: Alexey Butenko <alexeybutenko@netbeans.org> Log: #172828: Fixed typos
mark as future, since UI freeze, issue is: generating second panel for choosing template in New JSF Page wizard
Taking over Alexey's JSF and Spring issues.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss