Simplica

ProductsLearnPurchaseSupportDemoDownload
  [Search] Search   [Recent Topics] Recent Topics  
Put components on LayoutPane other than ECComponent
Forum Index -> Layout
Author Message
Jbaas


Joined: 01/27/2009 03:02:24
Messages: 2
Offline

Hi,
Im trying to integrate eCruiser LayoutPane with my existing RichFaces components. I want to put components on my LayoutPane, but when I do this, a classCastException occurs:

java.lang.ClassCastException:
org.ajax4jsf.component.html.HtmlAjaxOutputPanel cannot be cast to ecruiser.component.ECComponent

Is there any way to put a4j or richfaces components on a LayoutPane dynamically with Java?

Thx in advance
adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 189
Offline

Hi,

Please give me a simple demonstrative example so I could help you properly. BTW: one approach is to use only ECruiser components inside layoutPane, because they all are AJAX enabled... unless you don't have any special reasons..
Jbaas


Joined: 01/27/2009 03:02:24
Messages: 2
Offline

It is not possible for me to use only eCruiser components. We need those richfaces components. We spent much time on implementing them, and it's too much work to build new ones.

Attached is a Java file with the implementation:
Notes....

Its a bit wacky code, the TSFGrid isnt used in this example, nor is the TSFForm.

We have 2 layoutpanes, each containing a HtmlAjaxOutputPanel, which is an ajax4jsf component and extends UIComponent in a way.

the exception still occurs. Cannot cast HtmlAjaxOutputPanel to ECComponent
 Filename Processcherm.java [Disk] Download
 Description Java file with layoutpanes
 Filesize 4 Kbytes
 Downloaded:  945 time(s)

adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 189
Offline

Hi!

I succeeded to reproduce your problem. To avoid that exception you have to use something like:

topPane.getChildren().add(index,panel1);

instead of using topPane.addChild(panel1), where index is the the zero-based index where to add the child.
 
Forum Index -> Layout
Go to:   
Powered by JForum 2.1.7 © JForum Team
Home   |  News   |  Contact   |  About   |  License   |  Privacy   |  Documentation
Copyright © 2009 Simplica Corporation. All rights reserved.