You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kuga <kv...@infoblox.com> on 2009/08/11 02:58:02 UTC

Re: Exception adding a SimpleAttributeModifier to a TextField

Hi,
Did this issue get solved for you? 
I am also facing the similar issue. I am just adding and AttributeReplacer
and this issue happens when i Click on an AjaxButton.

Can you please share with me about the soution?
thanks
Kuga


Miguel Munoz wrote:
> 
> Comrades,
> 
>   I'm getting a strange exception. I created a SimpleAttributeModifier and
> added it to a TextField component, like this:
> 
>   textField.add(modifier);
> 
> When I run it, I get an exception that says this:
> 
> java.lang.ClassCastException:
> org.apache.wicket.behavior.SimpleAttributeModifier cannot be cast to
> org.apache.wicket.behavior.IBehaviorListener
>      at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:91)
> 
> The line of code that generates the exception looks like this:
> 
> 	behaviorListener =
> (IBehaviorListener)component.getBehaviors().get(idAsInt);
> 
> It appears to be extracting from a list of IBehaviors, so I have no idea
> why it's trying to cast it as an IBehaviorListener. Does anybody know what
> I'm doing wrong? Or is this a bug in Wicket?
> 

-- 
View this message in context: http://www.nabble.com/Exception-adding-a-SimpleAttributeModifier-to-a-TextField-tp16262822p24910082.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org