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 web application with "JSF" framework. 2. Open JSP editor. 3. Remove namespace for html components. 4. DnD JSF Form component from JSF part of Palette. Result: Following code is added: "<f:view> <h:form> </h:form> </f:view>" But namespace for html components isn't added. In "Editor for JSP File: Code Completion" part of http://wiki.netbeans.org/JsfEditorSupport is written: "The namespace will automatically be imported into the root tag when you drag-n-drop a component or by using the code completion to add one." I added component, which contains html component, but namespace isn't added.
I believe we don't "fix" this import automatically because we default set the namespace and assume it will be there. (P4) The spec says about the IDE will automatically add namespace for "http://java.sun.com/jsp/jstl/core" and "http://java.sun.com/jsp/jstl/sql" because they are not default been added. BTW, these 2 palettes are coming from "JSF Pages from Entity Classes" area.
See findJstlPrefix and findSqlPrefix in org.netbeans.modules.web.core.palette.JSPPaletteUtilities for an example.
I will fix this as a general JSF Palette feature.
I'm wait for the approval of adding web.jsf module to the friend-package of org.netbeans.modules.web.jsps.parserapi.
*** Issue 144218 has been marked as a duplicate of this issue. ***
Fixed in the trunk: changeset 2b48f7cc6c89 in main details: http://hg.netbeans.org/main?cmd=changeset;node=2b48f7cc6c89
Integrated into 'main-golden', available in build *200808190201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/2b48f7cc6c89 User: potingwu@netbeans.org Log: Fix Issue#137433, Namespace isn't added if component is added to a page.
Verified with build 080819.