0
votes

I'm currently trying to display an icon in a data view. The configuration of the icon column is very simple, selectedValue is equal to 1 and the icon to be displayed is in the icon resources of the database. The xpages theme is currently set to Bootstrap4XPages. The page does not display in the browser. When I set the theme to OneUI, the page displays fine with the icon. Can anyone indicate a way to debug this? Here is a snippet of the error-log on the domino server. I removed most of the exception values to keep the post as short as possible. :

<CommonBaseEvent creationTime="2015-01-12T13:49:54.885-05:00" globalInstanceId="EL0a94000600014a3fc8c8ac000001c0" msg="CLFAD0246E: Exception occurred servicing request for: /test.nsf/test.xsp - HTTP Code: 500" severity="50" version="1.0.1">
    <extendedDataElements name="CommonBaseEventLogRecord:level" type="noValue">
        <children name="CommonBaseEventLogRecord:name" type="string"> 
            <values>GRAVE</values>
        </children>
    </extendedDataElements>
    <extendedDataElements name="CommonBaseEventLogRecord:sourceClassName" type="string">
        <values>com.ibm.domino.xsp.bridge.http.engine.XspCmdManager</values>
    </extendedDataElements>
    <extendedDataElements name="CommonBaseEventLogRecord:sourceMethodName" type="string">
        <values>service</values>
    </extendedDataElements>
    <extendedDataElements name="CommonBaseEventLogRecord:Exception" type="string">
        <values>Context Path: /test.nsf&#xD;&#xA;Page Name: /test.xsp&#xD;&#xA;java.lang.NullPointerException: Argument Error: One or more parameters are null.&#xD;&#xA;&#x9;at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.writeAttribute(HtmlResponseWriter.java:308)&#xD;&#xA;&#x9;at com.ibm.xsp.theme.bootstrap.renderkit.html.extlib.data.DataViewRenderer.writeIconColumn(DataViewRenderer.java:267)&#xD;&#xA;&#x9;at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeStandardRow(DataViewRenderer.java:792)&#xD;&#xA;&#x9;at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeRow(DataViewRenderer.java:570)&#xD;&#xA;&#x9;at com.ibm.xsp.extlib.renderkit.html_extended.data.AbstractDataViewRenderer.writeRows(AbstractDataViewRenderer.java:816)&#xD;&#xA;&#x9;at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeRows(DataViewRenderer.java:548)&#xD;&#xA;&#x9;at com.ibm.xsp.extlib.renderkit.html_extended.data.DataViewRenderer.writeContent(DataViewRenderer.java:256</values>
    </extendedDataElements>
    <sourceComponentId component="Expeditor 6.2" componentIdType="ProductName" instanceId="" location="notes" locationType="Hostname" subComponent="" threadId="1" componentType="http://www.w3.org/2001/XMLSchema-instance"/>
    <situation categoryName="ReportSituation">
        <situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ReportSituation" reasoningScope="INTERNAL" reportCategory="LOG"/>
    </situation>
</CommonBaseEvent></CommonBaseEvents>
2
Instead of using the backticks for the code on that one try indenting everything by 4 spaces to display the code block better.Ding

2 Answers

1
votes

The problem lies here from the error: com.ibm.xsp.theme.bootstrap.renderkit.html.extlib.data.DataViewRenderer.writeIconColumn(DataViewRenderer.java:267)

It is a bug, one that I discovered myself just recently. I have a fix identified for it that we will release in the next extlib version (not sure when that will be). When the title attribute is left empty for the icon, it attempts to use the alt attribute as a title instead. The problem is it doesnt check if an alt value exists, and when it doesn't it tries to write null as an attribute, and you get the NullPointerException. Simple fix in the DataViewRenderer code.

I think you can work around the issue though if you set either the title or alt attributes of the image icon. So give that a go for now.

0
votes

Check devtools (browser debug tools) and see if there is an Icon in the html code and see it the path is valid. If there is no icon then maybe the bootstrap plugin may not support it.

Either way, you can always easily add an icon client side using jQuery or plain client side JavaScript