This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2 Replies Last post: Jun 4, 2007 3:00 PM by Tatyana Matveyeva  
David Fischer   52 posts since
Mar 30, 2007
Currently Being Moderated

Apr 30, 2007 6:39 PM

q:hintLabel and non-string values

Hi,

 

if you specify a value-binding for the q:hintLabel component that does not return a String (but for example to a HashSet), you get the following exception:

java.lang.ClassCastException: java.util.HashSet cannot be cast to java.lang.String
     at teamdev.jsf.renderkit.output.HintLabelRenderer.a(SourceFile:85)
     at teamdev.jsf.renderkit.output.HintLabelRenderer.encodeEnd(SourceFile:66)
     at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833)
     at teamdev.jsf.renderkit.util.RendererUtil.renderChild(SourceFile:130)
     at teamdev.jsf.renderkit.util.RendererUtil.renderChildren(SourceFile:115)
     at teamdev.jsf.renderkit.util.RendererUtil.renderChild(SourceFile:128)
     at teamdev.jsf.renderkit.datatable.AbstractTableRenderer.a(SourceFile:559)
     at teamdev.jsf.renderkit.datatable.AbstractTableRenderer.a(SourceFile:434)
     at teamdev.jsf.renderkit.datatable.AbstractTableRenderer.a(SourceFile:460)
     at teamdev.jsf.renderkit.datatable.AbstractTableRenderer.encodeChildren(SourceFile:417)
     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
     [...]

 

The HintLabelRenderer should not cast to a String, but instead call getString() on the object, just like the other JSF components.

 

Furthermore, if you specify a Converter to work around this bug, you get the same exception, even though the Converter#getAsString() method is called.

 

Can you look into this?

 

Thanks,

 

David.

Dmitry Pikhulya TeamDev Ltd. 162 posts since
Jan 5, 2007
Currently Being Moderated
1. May 1, 2007 10:21 PM in response to: David Fischer
Re: q:hintLabel and non-string values

David,

 

Thanks for reporting this issue. We will fix it in QuipuKit 1.2.

 

Just for your information, this problem appears when HintLabel's value is specified as a non-string object, AND the title attribute is not specified. If the title attribute is specified (as String), then HintLabel will work with any type of its value attribute.

 

--

Dmitry

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
2. Jun 4, 2007 3:00 PM in response to: David Fischer
Re: q:hintLabel and non-string values

Hello David,

 

We fixed this issue and it is now available in QuipuKit 1.1.3.

 

Regards,

Tatyana

More Like This

  • Retrieving data ...