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 234499

Summary: EL support in css files within JSF application [was: False error hint in CSS file that uses JSF expression]
Product: web Reporter: Petr Jiricka <pjiricka>
Component: CSS EditorAssignee: Milutin Kristofic <mkristofic>
Status: NEW ---    
Severity: normal CC: dkonecny, marfous
Priority: P2    
Version: 7.4   
Hardware: PC   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

Description Petr Jiricka 2013-08-16 14:39:32 UTC
The editor puts an error mark on the second line of this code snippet:

.simpletablestyle th {
  background: url(#{request.contextPath}/image.png);
}

However, I believe this is valid in JSF applications; the stylesheet is used this way from facelet files:

    <h:outputStylesheet name="css/screen.css" />

See also this thread:
http://stackoverflow.com/questions/5847473/can-i-use-el-for-external-css-files-with-jsf

and the answer by (NetBeans DreamTeam member) John Yeary.
Comment 1 Marek Fukala 2013-08-19 12:45:01 UTC
If the JSF allows to process the content of the stylesheets similar way as it does for html content via the <h:outputStylesheet name="..." /> reference, then we should provide all the EL functionality there as well, shouldn't we? Not just ignoring the parsing errors.

I'm afraid this isn't easy to do - for .xhtml there's a special hack which creates an artificial top level mimetype and then lexes/parses the whole file, strips off the EL content and then pass the modified source to the css support. Sg. similar would be necessary for the css. A "bit" more complicated as we use CSL for the dataobject/editor stuff...

I tend to switch this to an enhancement and fix it at the beginning of next cycle. 

Opinions?
Comment 2 Petr Jiricka 2013-08-19 12:47:30 UTC
I can imagine this can be difficult to implement, I agree with changing to an enhancement.
Comment 3 Marek Fukala 2013-08-27 05:30:39 UTC
*** Bug 235052 has been marked as a duplicate of this bug. ***
Comment 4 lpenet 2013-12-12 10:15:37 UTC
Is there an update on this feature ?

Netbeans lacks it for a long time, but it became even more useful as, since 7.3, netbeans flags the css file and all its tree path in error in such cases.
Comment 5 Vladimir Riha 2013-12-12 10:23:03 UTC
(In reply to lpenet from comment #4)
> Since 7.3, netbeans flags the css file and all its tree path in error in such
> cases.

You can try it in 7.4, there are no error badges displayed in this particular case