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.
1. Create a Maven Java EE 5 web application 2. Go to project properties -> Frameworks, and add JSF. 3. The JSF configuration panel is displayed (allowing the user to select JSF version etc.), but this panel is not server-aware and does not contain any UI relevant to the target server (e.g. the one that Petr H implemented for WebLogic), because the target server is not set. IMO, the correct behavior should be that the UI at some point (for example in the "Add Framework" dialog) displays a warning that encourages the user to set the target server before proceeding. We already have such a warning for JPA - it says "The project does not have the target server set properly. Java Persistence features are server-dependent." This can be used as an inspiration.
Integrated into 'main-golden', will be available in build *201007160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c03db73b2b0d User: Alexey Butenko <alexeybutenko@netbeans.org> Log: #175130: Bundling the JSF implementation in WAR archive for Maven projects does not work on WebLogic #188284: The IDE should warn the user when adding JSF and no target server is set
Hi Alexey, the current warning is definitely useful and overall it's better than it was, but: - It would be useful to display the warning sooner. i.e., when in the Frameworks pane of the project customizer user selects "Add...", and then selects a framework (JSF) in the Add Framework dialog, could the warning be shown at this point? When the user has clicked Ok, it is too late. - The warning message does not follow the look and feel of other warnings (no icon, different font color). Are you using the standard warning message support? (See issue 141884.)
(In reply to comment #2) > Hi Alexey, the current warning is definitely useful and overall it's better > than it was, but: > - It would be useful to display the warning sooner. i.e., when in the > Frameworks pane of the project customizer user selects "Add...", and then > selects a framework (JSF) in the Add Framework dialog, could the warning be > shown at this point? When the user has clicked Ok, it is too late. The problem is that WebModuleExtender is created only after OK button is clicked. Before that we have only WebFrameworkProvider instances which only knows how to create WebModuleExtender when needed. > - The warning message does not follow the look and feel of other warnings (no > icon, different font color). Are you using the standard warning message > support? (See issue 141884.) It is because Frameworks panel in that case is not the part of the new file wizard, but the part of project customizer (org.netbeans.modules.project.uiapi.CustomizerPane) which has its own warning messages.
#141884 is about project customizer, and there are 2 options nb.warningForeground, nb.errorForeground. In our case nb.warningForeground is used.
I see. Still would be nice if the user saw the warning sooner, leaving open as a P4. If we add the ability to choose the server while creating a Maven project, then the importance of this problem will decrease.
A similar case when creating JSF artefacts is not handled either - I filed a separate bug 189309.
Taking over Alexey's JSF and Spring issues.
(In reply to comment #2) > - It would be useful to display the warning sooner. i.e., when in the > Frameworks pane of the project customizer user selects "Add...", and then > selects a framework (JSF) in the Add Framework dialog, could the warning be > shown at this point? When the user has clicked Ok, it is too late. I'm really sorry, but this doesn't make sense to me. Do we really want "Add Framework" window to be validation one? I think that it should stay simple as it's since all validation runs over later and do validation on base of selected row of that dialog looks to me like really uncommon/non-standard behaviour. BTW, also warning after OK button doesn't look to be too late since the maven customizer contains button for framework removal and also cancelling of the customizer throw away all made changes. I'm closing the issue as fixed again since Alexey resolved the original request and the additional notice doesn't make much sense to me. Feel free to reopen with arguments against but the issue lies here for two years and I would expect that it's due the reason that it makes no sense to fix it as suggested in comment #2.