[
https://issues.apache.org/jira/browse/TOBAGO-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498513
]
Arvid Hülsebus commented on TOBAGO-410:
---------------------------------------
Style classes are now handled by specific objects not plain strings anymore. In
the Java code snippet this could be easily changed.
But changing the style this way was not really intended anyway. With 1.0.11 we
introduced the ability to provide markup for tc:panel and you can define the
available markup values directly in the tobago-config.xml without the need to
write a complete theme. See the address book demo for an example where we
defined 3 different levels for a progress bar.
Can you switch to markup for your application?
> 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
> Fix For: 1.0.11, 1.0.12
>
>
> 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.