Bug 813751 - Portlet Bridge - NPE when loading styles via link element
Portlet Bridge - NPE when loading styles via link element
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: PortletBridge (Show other bugs)
5.2.1.CR02
i686 Linux
unspecified Severity medium
: ---
: 5.2.2.ER01
Assigned To: Ken Finnigan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-18 07:13 EDT by Miroslav Cupák
Modified: 2015-01-05 06:59 EST (History)
3 users (show)

See Also:
Fixed In Version: PBR 2.3.1.EPP522
Doc Type: Bug Fix
Doc Text:
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>
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-19 08:33:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 07:16 EDT, 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 08:32:28 EST

  None (edit)
Description Miroslav Cupák 2012-04-18 07:13:40 EDT
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 07:16:19 EDT
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 14:25:07 EDT
    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 15:51:58 EDT
Ken Finnigan <ken@kenfinnigan.me> updated the status of jira PBR-325 to Closed
Comment 4 Jared MORGAN 2012-08-19 21:42:08 EDT
    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-19 21:54:58 EDT
    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-19 22:02:15 EDT
    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 00:19:56 EDT
    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 02:28:48 EDT
    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.