I'm using NetBeans 6.8 RC2 on OpenSolaris 2009 11.
I created a Maven web project, chose Java EE 6, and pressed finish. The project properties "frameworks" section shows that JavaServer Faces is used by this project by default. All of the fields on the Libraries and Configuration tabs are grayed out except Preferred Page Language, which is set to JSP. There is no Facelets option. I do see JSF 2.0 is selected on the Libraries tab. I noticed that the new project wizard created an index.jsp, not an index.xhtml. When I use the New File wizard to create a Facelets template, there is an error at the bottom that prevents me from continuing: "No Facelets Libraries Found"
When I create a regular Java Web project (not Maven) and select Java EE 6, it lets me configure the frameworks in the new project wizard. Facelets was available for JSF 2.0, and selected by default. It created an index.xhtml instead of an index.jsp, and it let me create a new Facelet template.
This scenario works with Win Vista and FCS.I'll try Opensolaris,but definitelly not P1.
new project wizard does indeed generate index.jsp, not any xhtml file. that's what the archetype generates. Not sure how it relates to the other facelet problem. reassigning to jsf for evaluation.
please let me know why
1. is jsf considered a setup framework in project
2. is there no facelet option
3. what the error when creating facelet means, what j2ee api are the facelets part of.
Can't reproduce even on OpenSolaris,JDK 1.6.0_18 with FCS. Try it please with
final 6.8 build and if reproducible there,add more detailed scenario (there's
strange fact,that in just built maven web app you have already JSF
installed,because it can't be selected in wizard as for ant projects).For
now,marking as INCOMPLETE.
I tried again just now. I created a new Maven web project (JEE6), then went to the project properties and saw that no framework was selected. That is different from the first time I tried, where it added JSF to the new project automatically.
This time I manually added the JSF framework to the project using the project properties. All of the fields on the tabs are now editable, and Facelets is now an option to choose from. Once I finished adding JSF to the project, an index.xhtml was added to the project.
After closing the project properties I went to the first project (that had the problem), and looked in the project properties. The tabs in the framework section are still greyed out, but Facelets is now available and selected. There is no remove button to remove the framework, just an add button.
I closed the window, and went back to the second project. Project properties, frameworks tab. There is a remove button, but it is grayed out (useless), and now all of the fields in the tabs are grayed too. Facelets is NOT available anymore and JSP is selected! Why is everything greyed out? Are they supposed to be editable only when you are adding a framework?
Now I go back to the first project and look at project properties, frameworks.. and Facelets is gone again. What the heck?
This seems buggy to me.
Steps to reproduce:
1) Create new Maven web project, JEE6, default options
2) Go into project properties window, frameworks section.
3) Click add button, select JavaServer Faces and press OK.
4) Verify configuration tab has Facelets selected as preferred page language. Press OK.
5) Open project properties dialog for this project again, and go to frameworks tab.
6) Click the JavaServer Faces row. You will notice that the remove button is greyed out, and all of the fields on both tabs are greyed out except Preferred Page Language on the Configuration tab. Is this by design or a bug?
7) Preferred Page Language is now JSP, and there is no Facelets option.
8) Restart the IDE, come back to this screen and Facelets is still missing.
(In reply to comment #5)
> Steps to reproduce:
> 1) Create new Maven web project, JEE6, default options
> 2) Go into project properties window, frameworks section.
> 3) Click add button, select JavaServer Faces and press OK.
> 4) Verify configuration tab has Facelets selected as preferred page language.
> Press OK.
> 5) Open project properties dialog for this project again, and go to frameworks
> 6) Click the JavaServer Faces row. You will notice that the remove button is
> greyed out, and all of the fields on both tabs are greyed out except Preferred
> Page Language on the Configuration tab. Is this by design or a bug?
It is by design. And actually preferred language is also quite useless now, since it does affect only property in project.properties in Web Application, and nothing in case Maven Web Application.
> 7) Preferred Page Language is now JSP, and there is no Facelets option.
And this is the only bug I see here. And definitely not P2,
decreasing to P3
> 8) Restart the IDE, come back to this screen and Facelets is still missing.
Thanks Alexei. Should we put it into a 6.8 patch?
(In reply to comment #8)
> Thanks Alexei. Should we put it into a 6.8 patch?
If you think that it is worth to avoid confusing of the users,
after JSF framework with facelets is added into the project,
then it could be put into the patch.
Integrated into 'main-golden', will be available in build *200912110200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Alexey Butenko <email@example.com>
Log: #178401: Unable to use Facelets in Maven web project with JSF 2.0
Verified in trunk
The fix has been ported into the release68_fixes repository.
Verified in 68fixes branch
I'm still seeing this problem (or something like it) in Netbeans 7 Beta. I create a maven web project and it defaults to JSP! I try to add JSF 2 (w/Facelets) Framework and get errors. When I try to use new->JSF->Facelets Template the next button is grayed out and the dialog says that a Facelets library cannot be found.
I am having this problem in Netbeans 7 with maven java ee 6 project. When I try to use a new jsf template wizard: the next button is grayed out and the dialog says that a Facelets library cannot be found.
Created attachment 105277 [details]
screen showing jsf framework
Created attachment 105278 [details]
no facelets libraries found
I am not sure if this is the same problem as the original report, but I confirm there is a problem. For me, the exact steps to reproduce are:
1. Create a Java EE 6 Maven web project
2. Create New File -> Java Server Faces -> Facelets Template
The dialog displays an error message saying that it can not find any facelets library.
The workaround for me is to go to project properties and add the JSF framework explicitly (leave the defaults as they are). After this, the error message in the Facelets Template wizard disappears and I can create the file.
Right there were two problems:
- for new maven project couldn't be created JSF Templates
- when user set project server and server JSF libraries it wasn't allowed as well
So for the first case it will react just with warning that server wasn't found and for the second one it should work now.
Fixed in be2b4665fe37.
*** Bug 179349 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201103040000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Martin Fousek <firstname.lastname@example.org>
Log: #178401 - Unable to use Facelets in Maven web project with JSF 2.0