Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 172828 - JSF wizard issues
JSF wizard issues
Product: javaee
Classification: Unclassified
Component: JSF
All All
: P3 (vote)
: 7.1
Assigned To: Martin Fousek
Depends on:
Blocks: 172613
  Show dependency treegraph
Reported: 2009-09-23 01:09 UTC by David Konecny
Modified: 2016-07-07 08:53 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2009-09-23 01:09:44 UTC
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)
Comment 1 David Konecny 2009-09-24 00:45:25 UTC
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.
Comment 2 David Konecny 2009-09-24 00:51:06 UTC
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?
Comment 3 chase 2009-09-24 01:38:37 UTC
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.
Comment 4 David Konecny 2009-09-24 02:11:45 UTC
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)?
Comment 5 chase 2009-09-24 02:39:26 UTC
I could live with it. I posted to the Sun Instructor mailing list to see if any of the other instructors had an opinion.
Comment 6 Alexey Butenko 2009-09-24 05:57:36 UTC
#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?

Comment 7 Alexey Butenko 2009-09-24 09:24:40 UTC
Marking as fixed. If I missed something, please reopen it or file new issue.
Comment 8 Marek Fukala 2009-09-24 17:57:08 UTC
>#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
Comment 9 David Konecny 2009-09-24 21:16:25 UTC
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.
Comment 10 David Konecny 2009-09-24 22:24:16 UTC
I filed issue 173064 to update JSF From Entity wizard which depends on presence of template.xhtml.
Comment 11 Quality Engineering 2009-09-25 09:12:36 UTC
Integrated into 'main-golden', will be available in build *200909241442* on (upload may still be in progress)
User: Alexey Butenko <>
Log: #172828: JSF wizard issues
Comment 12 Quality Engineering 2009-09-27 22:38:55 UTC
Integrated into 'main-golden', will be available in build *200909270201* on (upload may still be in progress)
User: Alexey Butenko <>
Log: #172828: Generating simple index.html without template
Comment 13 Troy Giunipero 2009-09-30 14:11:59 UTC
Regarding #1 above:

Suggest changing description:

    Creates new Facelets file of JSP file(JSP segment).


    Creates new Facelets file _or_ JSP file (JSP fragment).

(Why not 'fragment', to correspond with the 'f' in .jspf ? Also, see:
Comment 14 Alexey Butenko 2009-09-30 14:15:38 UTC
Thanks for the catch, it is just a typos, I'll fix it
Comment 15 Quality Engineering 2009-10-01 17:23:22 UTC
Integrated into 'main-golden', will be available in build *200910010513* on (upload may still be in progress)
User: Alexey Butenko <>
Log: #172828: Fixed typos
Comment 16 Alexey Butenko 2009-11-02 13:37:18 UTC
mark as future, since UI freeze,
issue is:
generating second panel for choosing template in New JSF Page wizard 
Comment 17 Erno Mononen 2010-10-13 11:20:47 UTC
Taking over Alexey's JSF and Spring issues.
Comment 18 Martin Balin 2016-07-07 08:53:26 UTC
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

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo