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.

Bug 188284 - The IDE should warn the user when adding JSF and no target server is set
Summary: The IDE should warn the user when adding JSF and no target server is set
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: Martin Fousek
URL:
Keywords: USABILITY
Depends on:
Blocks:
 
Reported: 2010-07-01 16:10 UTC by Petr Jiricka
Modified: 2012-11-15 07:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2010-07-01 16:10:31 UTC
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.
Comment 1 Quality Engineering 2010-07-16 03:17:30 UTC
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
Comment 2 Petr Jiricka 2010-07-20 07:25:44 UTC
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.)
Comment 3 Alexey Butenko 2010-07-20 09:15:04 UTC
(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.
Comment 4 Alexey Butenko 2010-07-20 09:32:00 UTC
#141884 is about project customizer, and there are 2 options 
nb.warningForeground, nb.errorForeground. In our case nb.warningForeground is used.
Comment 5 Petr Jiricka 2010-07-20 18:02:31 UTC
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.
Comment 6 Petr Jiricka 2010-08-09 13:45:51 UTC
A similar case when creating JSF artefacts is not handled either - I filed a separate bug 189309.
Comment 7 Erno Mononen 2010-10-13 11:21:46 UTC
Taking over Alexey's JSF and Spring issues.
Comment 8 Martin Fousek 2012-11-15 07:39:03 UTC
(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.