dev@woodstock.java.net

Re: How to set Integer as Hyperlink value?

From: Winston Prakash <Winston.Prakash_at_Sun.COM>
Date: Tue, 11 Dec 2007 12:17:04 -0800

Rick,

Thanks for quickly finding the problem area. I'll file a bug against Anchor.

Mean while I have given a work around to the user

   <hyperlink
         <staticText text="<someinteger>


- Winston
> The bug is in the implementation of AnchorRendererBase
> It did not follow the implementation in the HTML renderer.
>
> HTML renderer
>
> String label =
> ConversionUtilities.convertValueToString(component,
> link.getText());
>
> Widget renderer
>
> String text = (String) component.getAttributes().get("text");
>
> -rick
>
>
> Winston Prakash wrote:
>
>> A bug have been filed against NB 6.0 saying the application worked in
>> NB 5.5.1 is breaking in NB 6.0.
>>
>> http://www.netbeans.org/issues/show_bug.cgi?id=123765
>>
>> It turned an Integer is set as value (which is a valid scenario) to
>> the hyperlink. It worked in NB 5.5.1, but sees the
>> following exception is thrown in NB 6.0 with latest Woodstock
>> components.
>>
>> I don't see any "converter" property to set the IntegerConverter as
>> in StaticText. So how do we go about it.
>>
>> Exception
>>
>> Caused by: java.lang.ClassCastException: java.lang.Integer
>> at
>> com.sun.webui.jsf.renderkit.widget.AnchorRendererBase.setContents(AnchorRendererBase.java:171)
>>
>> at
>> com.sun.webui.jsf.renderkit.widget.AnchorRendererBase.getProperties(AnchorRendererBase.java:91)
>>
>> at
>> com.sun.webui.jsf.renderkit.widget.RendererBase.encodeChildren(RendererBase.java:139)
>>
>> at
>> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
>>
>>
>> - Winston
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>