Hi all,
I am using panelBox as container for some links in our jsp's. Looking into
the generated HTML for this component I can see the following:
<!--Start: org.apache.myfaces.trinidad.Panel["_idJsp129"]-->
<table class="af_panelBox_dark" style="" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td class="af_panelBox_top-start"></td>
<td class="af_panelBox_top"></td>
<td class="af_panelBox_top-end"></td>
</tr>
<tr>
<td class="af_panelBox_start"></td>
<td class="af_panelBox_body">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="af_panelBox_header">Organización</td>
</tr>
<tr>
<td class="af_panelBox_content">
<!--Start: org.apache.myfaces.trinidad.Panel["_idJsp130"]-->
<div class="af_panelList">
<ul>
<li> ... /li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</td>
<td class="af_panelBox_end"></td>
</tr>
<tr>
<td class="af_panelBox_bottom-start"></td>
<td class="af_panelBox_bottom"></td>
<td class="af_panelBox_bottom-end"></td>
</tr>
</tbody>
</table>
As you see, the first child of panelBox's body is a table. There is no way
of styling the width of this element, what causes that the panelBox::header
and the panelBox::content are unable to fill the width of the
panelBox::body.
I do not know if this is the correct behaviour or it is a bug. To work
around this issue, I am trying to define a custom renderer for panelBox.
Unfortunately, I have no success. I have created MyPanelBoxRenderer who
extends PanelBoxRenderer, and declared it as a renderer in
faces-config.xmlas follows:
<render-kit>
<render-kit-id>
org.apache.myfaces.trinidad.core
</render-kit-id>
<render-kit-class>
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
</render-kit-class>
<renderer>
<component-family>
org.apache.myfaces.trinidad.Panel
</component-family>
<renderer-type>
org.apache.myfaces.trinidad.Box
</renderer-type>
<renderer-class>
core.vista.renderer.MyPanelBoxRenderer
</renderer-class>
</renderer>
</render-kit>
But the application does not use this renderer at all. Any ideas?
Thanks in advance,
- - Rafa