You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org> on 2007/05/24 12:56:17 UTC

[jira] Resolved: (TOBAGO-410) attribute-tag causes ClassCastException

     [ https://issues.apache.org/jira/browse/TOBAGO-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann resolved TOBAGO-410.
----------------------------------

    Resolution: Fixed

tc:attribute is able to handle styleClass with the new StyleClass implementation, now.

You can use ',' or ' ' for separator.

For Component code please use the suggestion from udo.





> attribute-tag causes ClassCastException
> ---------------------------------------
>
>                 Key: TOBAGO-410
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-410
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>            Reporter: Matthias Wronka
>         Assigned To: Bernd Bohmann
>
> We use the tc:attribute-Tag to assign styles to components such as
> <tc:panel>
> 	<tc:attribute name="styleClass" value="tobago-panel-default my-style" />
> ...
> or using Java Code:
>        ivPanel = (UIPanel) ComponentUtil.createComponent(facesContext, UIPanel.COMPONENT_TYPE, "Panel");
>        Map lvAttr = ivPanel.getAttributes();
>        lvAttr.put("styleClass", "tobago-panel-default my-style");
> In the current snapshots this causes a ClassCastException:
> java.lang.ClassCastException
> 	at org.apache.myfaces.tobago.renderkit.html.StyleClasses.ensureStyleClasses(StyleClasses.java:64)
> 	at org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil.createCssClass(HtmlRendererUtil.java:115)
> 	at org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil.prepareRender(HtmlRendererUtil.java:90)
> 	at org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.prepareRender(DefaultLayoutRenderer.java:40)
> 	at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:73)
> 	at org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:364)
> 	at org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:71)
> 	at org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:277)
> 	at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
> 	at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:77)
> 	at org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent(DefaultLayoutRenderer.java:47)
> 	at org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:71)
> 	at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
> 	at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:77)
> As this feature worked fine with version 1.0.10 we would appreciate a transition period, in which the styles are still assigned but a warning is logged. Currently our applications cannot use these snapshots.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.