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 - EL support in css files within JSF application [was: False error hint in CSS file that uses JSF expression]
Summary: EL support in css files within JSF application [was: False error hint in CSS ...
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 235052 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-16 14:39 UTC by Petr Jiricka
Modified: 2014-10-06 13:27 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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