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.
Summary: | CSS styles included into the page using outputStylesheet tag are not recognized in the CSS styles window | ||
---|---|---|---|
Product: | javaee | Reporter: | Martin Fousek <marfous> |
Component: | JSF Editor | Assignee: | Martin Fousek <marfous> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | denissilva, dkonecny, janario, pjiricka, rodrigorsantos |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Project sample
Project with more cases to test |
Description
Martin Fousek
2013-08-22 10:19:47 UTC
As I wrote into the issue #234775. I'm not able to reproduce issue with the selection mode within the "Browser DOM" or "CSS Styles" panels even for styles defined using the outputStylesheet Facelet component. But at least the outputStylesheet imported .css files are not customizable using the style's property editor. This is the only issue I see there now. Please Janario correct me or provide cases which doesn't work to you. Thank a lot! I've created a simple project to test it(JSFTest.zip) In the test.xhtml there is an css link that works fine. You can run the project and try to switch the background-color in test.css This one works fine: <link href="resources/css/test.css" rel="stylesheet" type="text/css" /> Also I've added an outputStylesheet to the same css file: <h:outputStylesheet library="css" name="test.css" /> This doesn't work because it renders something like: With /faces/* servlet: <link type="text/css" rel="stylesheet" href="/JSFTest/faces/javax.faces.resource/test.css?ln=css" /> With *.xhtml servlet: <link type="text/css" rel="stylesheet" href="/JSFTest/javax.faces.resource/test.css.xhtml?ln=css" /> So, it can't match the files because of the /javax.faces.resource/ prefix As I've seen the project javaee.project that does some find to match files where appears in the 'CSS Styles' tab Some details of class: org.netbeans.modules.javaee.project.api.ClientSideDevelopmentSupport Around line 307 it ignore all servlets that maps with suffix such as *.xhtml This is reported in issue 234775 Line 307: // only some patterns are currently handled; // see comments in convertServerURLToProjectFile method if (!pattern.endsWith("*")) { // NOI18N Still in class ClientSideDevelopmentSupport at method convertServerURLToProjectFile around line 362 I think this one is responsible to find and match files and resources from an url to a project file based on the servlets mappings You can try with the project test and do some debug in the ClientSideDevelopmentSupport methods Thanks Created attachment 139278 [details]
Project sample
(In reply to janario from comment #2) > I've created a simple project to test it(JSFTest.zip) Thanks for attaching testing project. > This doesn't work because it renders something like: > With /faces/* servlet: <link type="text/css" rel="stylesheet" > href="/JSFTest/faces/javax.faces.resource/test.css?ln=css" /> > With *.xhtml servlet: <link type="text/css" rel="stylesheet" > href="/JSFTest/javax.faces.resource/test.css.xhtml?ln=css" /> That's exactly what I needed to know. The ground of the issue is still the mapping of outputStylesheet links - that I tried to explain in the #234775. I'll take a look on it. Thanks a lot for your valuable comments. Created attachment 139397 [details]
Project with more cases to test
I'm attaching project where are more possibilities which should work then. They are within files:
- /index.xhtml
- /contracts/myContract/template.xhtml
Initial commits which fixes half of cases written in the test project: web-main #e3dd43e4947b web-main #d8d172dc10b6 web-main #0a145cb3423e JSF resources defined using EL resolved in web-main #d8cfe10a6a7b: <link href="#{resource['anyFolder:test3.css']}" rel="stylesheet" type="text/css"/> Ok, all cases from my testing project works well now. Reported cases using /faces servlet mapping works well too. Remains .xhtml servlet mapping which breaks the CSS selection+editing mode then. That will be solved as #234775. This one I'm marking as fixed since 4 changesets I attached before. |