SelectInputText and Seam
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
SelectInputText and Seam  XML
Forum Index -> JBoss Seam Integration
Author Message
damianharvey

Joined: 01/02/2007 00:00:00
Messages: 6
Offline


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:
Code:
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.
Code:
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.
Code:
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.
damianharvey

Joined: 01/02/2007 00:00:00
Messages: 6
Offline


The solution to this (from Gavin King in the Seam Forum) is to ensure that you only have the icefaces jars in the EAR and not also in the WEB-INF/lib.

 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team