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.
Site root folder is not taken into account when creating local libraries. It is hard coded to js/libs. Additionally html file target folder should be Site root by default. To reproduce: - Create Web Project with GF as a target server. - Use RESTful from Web Service from Database. - Select f.e. MANUFACTURER table in the wizard. - finish the wizard - open new project wizard - select "HTML/JavaScript|HTML Application" - finish the wizard with defaults - right-click Site Root node and choose "New|RESTful JavaScript Client" - click Browse to select "REST Project Resource" - choose previously created web service - check "Add Backbone.js to project sources" - click Next - type "public_html" as target folder - here should be also Browse button to be able to select target folder and Site root should be default value - click Finish - JavaScript libraries are created in project/js/libs and they are not shown in projects view - references in html file are broken: <script src='null'></script> <script src='null'></script> <script src='null'></script> <script src='RestClient.js'></script> Product Version: NetBeans IDE Dev (Build EaselCSS-482-on-20120813) Java: 1.7.0_06; Java HotSpot(TM) 64-Bit Server VM 23.2-b09 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
*** Bug 217662 has been marked as a duplicate of this bug. ***
Related bug 216789 is now fixed - Denis, could you please look at this now? This will be needed in the demo that John will be showing tomorrow evening, so this is quite high priority. Thanks.
Partial fix : web-main6f5b5671afd8 prevents to produce null values.
Correction: web-main#52db3847a6c5
There is a related issue #217958 because libraries generation are implemented in the same way as for project wizard.
web-main#0d0c34e461c7 Fix for issue #216789 cannot be applied to this issue. The fix has to be improved.
Denis, this change: --- 3.7 - public static final String LIBS = "js/libs"; // NOI18N 3.8 + public static final String LIBS = "public_html/js/libs"; // NOI18N --- is not correct. The path should stay "js/libs" as the path is relative to project's site root. To get Site Root you need to do: ProjectUtils.getSources(project).getSourceGroups(WebClientProjectConstants.SOURCES_TYPE_HTML5); (I just added the API: f7072a63ba00)(and btw. note also: 965c207929de, a16eb17ff8fb) That will give you root folder for sources. As for "js/libs" - at the moment this is just hardcoded location. Tomas, what do you think? Should we store it in some project property if user changes it.
Integrated into 'main-golden', will be available in build *201209070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6f5b5671afd8 User: Denis Anisimov <ads@netbeans.org> Log: Basic correction for BZ#216797.
(In reply to comment #7) > As for "js/libs" - at the moment this is just hardcoded location. Tomas, what > do you think? Should we store it in some project property if user changes it. From what I know (new project wizard, project properties), I would not store it. The only reason to store the value now could be to remember the last location user used. For JavaScript Files (in Project Properties), all the JS files in the project are found and listed; if one want to add a new JS library, (s)he can specify the path in the same dialog - that is IMHO OK (user can later move his/her JS libraries directly in the Projects view - how can we notice that?)
(In reply to comment #7) > Denis, > > this change: > > --- > 3.7 - public static final String LIBS = "js/libs"; // NOI18N > 3.8 + public static final String LIBS = "public_html/js/libs"; // > NOI18N > --- > > is not correct. The path should stay "js/libs" as the path is relative to > project's site root. To get Site Root you need to do: > > I absolutely agree with you. But I didn't know how to get libraries path via API. I will correct the code. Thanks you.
web-main#0eb9f50c0fa4
Integrated into 'main-golden', will be available in build *201209080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0eb9f50c0fa4 User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#216797 - RESTful JavaScript Client wizard - wrong location of local libraries