Bug 813751 - Portlet Bridge - NPE when loading styles via link element
Summary: Portlet Bridge - NPE when loading styles via link element
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: PortletBridge
Version: 5.2.1.CR02
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
: 5.2.2.ER01
Assignee: Ken Finnigan
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-18 11:13 UTC by Miroslav Cupák
Modified: 2015-01-05 11:59 UTC (History)
3 users (show)

(edit)
Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax:</para><programlisting>&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss&quot;/&gt;</programlisting><para>This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:</para><programlisting>&lt;a4j:loadScript src=&quot;resource:////org/ajax4jsf/framework.pack.js&quot; type=&quot;text/javascript&quot;/&gt;
    &lt;a4j:loadScript src=&quot;resource:////org/richfaces/ui.pack.js&quot; type=&quot;text/javascript&quot;/&gt;
    &lt;a4j:loadStyle src=&quot;resource:////org/richfaces/skin.xcss&quot;/&gt;</programlisting>
Clone Of:
(edit)
Last Closed: 2013-02-19 13:33:17 UTC


Attachments (Terms of Use)
NPE caused by <link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/>. (5.01 KB, text/x-log)
2012-04-18 11:16 UTC, Miroslav Cupák
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker PBR-325 Minor Closed Docs: Portlet name missing in the code for NONE LoadStyleStrategy 2013-02-19 13:32:28 UTC

Internal Trackers: 851086

Description Miroslav Cupák 2012-04-18 11:13:40 UTC
Description of problem:
Manual loading of (X)CSS files via <link> tag is often required, e.g. when using RichFaces with LoadStyleStrategy set to NONE. The documentation advises to use the code similar to the following line in that case:

<link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/>

This leads to NPE when the portlet is accessed (see the attached log).

Version-Release number of selected component (if applicable):
2.3.0.CP01.EPP521

Additional info:
There are different ways to load the styles which work fine, e.g. via a4j:loadStyle.

Comment 1 Miroslav Cupák 2012-04-18 11:16:19 UTC
Created attachment 578316 [details]
NPE caused by <link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/>.

Comment 2 Ken Finnigan 2012-06-21 18:25:07 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Documentation needs to be updated for Portlet Bridge to recommend following for including RichFaces scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:


    <a4j:loadScript src="resource:////org/ajax4jsf/framework.pack.js" type="text/javascript" />
    <a4j:loadScript src="resource:////org/richfaces/ui.pack.js" type="text/javascript" />
    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />

Comment 3 JBoss JIRA Server 2012-06-22 19:51:58 UTC
Ken Finnigan <ken@kenfinnigan.me> updated the status of jira PBR-325 to Closed

Comment 4 Jared MORGAN 2012-08-20 01:42:08 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,6 +1,6 @@
-Documentation needs to be updated for Portlet Bridge to recommend following for including RichFaces scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:
+Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax &lt;link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/&gt;. This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:
 
-
-    <a4j:loadScript src="resource:////org/ajax4jsf/framework.pack.js" type="text/javascript" />
+<programlisting>[CDATA[
+<a4j:loadScript src="resource:////org/ajax4jsf/framework.pack.js" type="text/javascript" />
     <a4j:loadScript src="resource:////org/richfaces/ui.pack.js" type="text/javascript" />
-    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />+    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />]]</programlisting>

Comment 5 Jared MORGAN 2012-08-20 01:54:58 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,6 +1,10 @@
-Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax &lt;link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/&gt;. This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:
+Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax:</para>
 
-<programlisting>[CDATA[
+<programlisting>&[CDATA[<link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/>]];</programlisting>. 
+
+<para>This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:
+
+<programlisting>&[CDATA[
 <a4j:loadScript src="resource:////org/ajax4jsf/framework.pack.js" type="text/javascript" />
     <a4j:loadScript src="resource:////org/richfaces/ui.pack.js" type="text/javascript" />
-    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />]]</programlisting>+    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />]];</programlisting>

Comment 6 Jared MORGAN 2012-08-20 02:02:15 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,10 +1,10 @@
 Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax:</para>
 
-<programlisting>&[CDATA[<link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/>]];</programlisting>. 
+<programlisting><![CDATA[<link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/>]]></programlisting>. 
 
 <para>This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:
 
-<programlisting>&[CDATA[
+<programlisting><![CDATA[
 <a4j:loadScript src="resource:////org/ajax4jsf/framework.pack.js" type="text/javascript" />
     <a4j:loadScript src="resource:////org/richfaces/ui.pack.js" type="text/javascript" />
-    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />]];</programlisting>+    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />]]></programlisting>

Comment 7 Jared MORGAN 2012-08-20 04:19:56 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,10 +1,10 @@
 Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax:</para>
 
-<programlisting><![CDATA[<link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/>]]></programlisting>. 
+<programlisting><link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/></programlisting>
 
-<para>This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:
+<para>This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:</para>
 
-<programlisting><![CDATA[
+<programlisting>
 <a4j:loadScript src="resource:////org/ajax4jsf/framework.pack.js" type="text/javascript" />
     <a4j:loadScript src="resource:////org/richfaces/ui.pack.js" type="text/javascript" />
-    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" />]]></programlisting>+    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" /></programlisting>

Comment 8 Jared MORGAN 2012-08-21 06:28:48 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,10 +1,3 @@
-Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax:</para>
+Documentation quoted that the &lt;link&gt; element could be used to import Rich Faces XCSS scripts and stylesheets using the following syntax:</para><programlisting>&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss&quot;/&gt;</programlisting><para>This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:</para><programlisting>&lt;a4j:loadScript src=&quot;resource:////org/ajax4jsf/framework.pack.js&quot; type=&quot;text/javascript&quot;/&gt;
-
+    &lt;a4j:loadScript src=&quot;resource:////org/richfaces/ui.pack.js&quot; type=&quot;text/javascript&quot;/&gt;
-<programlisting><link rel="stylesheet" type="text/css" href="/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/></programlisting>
+    &lt;a4j:loadStyle src=&quot;resource:////org/richfaces/skin.xcss&quot;/&gt;</programlisting>-
-<para>This syntax is no longer correct, and results in a NPE. To correct the issue, use a4j:loadstyle to import the scripts and stylesheets when using LoadStyleStrategy and LoadScriptStrategy of NONE:</para>
-
-<programlisting>
-<a4j:loadScript src="resource:////org/ajax4jsf/framework.pack.js" type="text/javascript" />
-    <a4j:loadScript src="resource:////org/richfaces/ui.pack.js" type="text/javascript" />
-    <a4j:loadStyle src="resource:////org/richfaces/skin.xcss" /></programlisting>


Note You need to log in before you can comment on or make changes to this bug.