Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 216926 - h:outputScript and h:outputStylesheet "name" attribute is not required
h:outputScript and h:outputStylesheet "name" attribute is not required
Product: javaee
Classification: Unclassified
Component: JSF Editor
All All
: P3 (vote)
: 7.3.1
Assigned To: Martin Fousek
Depends on:
  Show dependency treegraph
Reported: 2012-08-15 17:01 UTC by lu4242
Modified: 2013-04-17 07:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description lu4242 2012-08-15 17:01:12 UTC
Writing some code I notice that h:outputScript and h:outputStylesheet "name" attribute is not required.

Facelets tlddoc for JSF 2.0 / 2.1 says so, but on the description of h:outputScript it says how the component should behave with/without such attribute. 

Netbeans JSF Editor shows an error when name attribute is not set.

I have also filled the spec bug here:

But anyway it could be good to fix this on the IDE, to prevent that error appear when editing a JSF page. Example

<h:outputScript rendered="#{!empty cc.attrs.script}"><!--  
.myCustomScript = #{cc.attrs.script} ;


<h:outputStylesheet rendered="#{!empty}"><![CDATA[
.myCustomStyle { #{} }
Comment 1 Marek Fukala 2012-10-10 08:44:00 UTC
The editor support finds .taglib.xml files on the project's classpath and parses them to get the info about the components. We also bundle jsf2.1 in case you want to add it to the project if the server doesn't contain the jsf libs.

So this issue depends on what version of jsf the project contain and if the the library descriptors in the jsf jars contains the correct information.

To address this kind of issues some kind of components definition overlay (per jsf version) would have to be introduced to fix the issues.
Comment 2 lu4242 2012-10-11 22:54:12 UTC
Please note in practice, both Mojarra and MyFaces does not use .taglib.xml files to load tag libraries provided by the standard spec (h, f, ui, c, composite), to make startup faster (avoid parse the xml file). In theory it should be some file from inside netbeans.
Comment 3 Marek Fukala 2012-10-12 05:47:43 UTC
I'm aware of this - they are mainly a documentation. But as for NB - we need something to work with and this is a prefect object - it is supposed to contain all the necessary information. The problem and truth is that it is buggy, but this doesn't mean we should maintain another data chart out of the engine.
Comment 4 Martin Fousek 2013-04-17 07:17:26 UTC
I asked JSF guys for the specification change but it was too late to be available for the new JSF2.2 spec. Anyway at least they changed the taglib metadata to be corresponding to the reality and the JSF impl removed requirement for the "name" attribute.

In other words, in NetBeans 7.3.1 by using latest JSF library (JSF2.2) this will be fixed.

web-main #7bffc0db038a

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo