[jboss-user] [JBoss Seam] - ICEFaces SelectInputText (auto-complete)

damianharvey do-not-reply at jboss.com
Tue Feb 27 10:23:51 EST 2007


I have a problem with ICEFaces and Seam using the SelectInputText (auto-complete) component.

I can display a list well enough and have it limit based on letters typed in. However when I try to add code to get the selected item, it all goes wrong. The offending line in question is:
SelectInputText autoComplete = (SelectInputText) event.getComponent();
As you'd expect this casts the incoming component to com.icesoft.faces.component.selectinputtext.SelectInputText. This results in a ClassCastException for me. 

To further frustrate matters I have checked the incoming component class and it is indeed com.icesoft.faces.component.selectinputtext.SelectInputText.
log.info("Event Component has class :"+event.getComponent().getClass().getName());
14:38:48,571 INFO  [STDOUT] Event Component has class :com.icesoft.faces.component.selectinputtext.SelectInputText

I have added code to the ICEFaces sample and the only difference that I can see is that when it is passed in by the ICEFaces example it is an instance of SelectInputText, yet for some reason when I pass it in via Seam (and this includes using the sample code in my Seam project) it is not an instance.
event.getComponent() instanceof com.icesoft.faces.component.selectinputtext.SelectInputText

Does anyone know why this difference might result? As the ICEFaces sample code doesn't run in my project I assume that it is a configuration issue. Has anyone had ClassCast / instanceOf problems before?

Thanks,

Damian.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023104#4023104

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023104



More information about the jboss-user mailing list