Just to clarify: you have only a single copy of each RF .jar (api, impl, ui) in a packaged application and EAR contains api, while WAR/WEB-INF/lib contain impl & ui, correct?
Hi Nick! Thanks for quick reply!
Actually my application logic is contained in separate jar, which is included to EAR, so to be able to use TreeNodeImpl and org.richfaces.component.html.HtmlTree in code of the jar I need to add *impl.jar and *ui.jar to my EAR, am I correct?
So my project structure differs from one you described... is it forced to be so ?
Component classes are not expected to be used by EJB beans, so it's not correct to place impl/ui there. If you need to operate with component classes, you can use managed beans or Seam components located in EAR. The most frequent reason for CCEs is presence of different copies of the same class coming from different class loaders; they are not equal, and so it fails with CCE.
I've done some refactoring, so now I have ui and impl in my war and api in EAR. It works fine.
I've got one more question. Is it possible to load each tree node children with ajax requests?
I've noticed that there is "switchType=ajax" but it just reloads all the tree every time a node is expanded. What I'm trying to achieve is to handle each expansion event on server side and add data to expanded node. The reason for such an approach is that I'm retrieving data for tree over SOAP which is slow.
Thanks in advance.
ajax mode should working exactly as you are asking - only toggled part of node should be updated. Are you re-rendering tree explicitly or implicitly (placed it into outputPanel with ajaxRendered=true)?
Nick, you're right about tree wrapped in panel...
would you please provide me some details of switchType=ajax.
Do I need to create some specific listeners and add data to tree nodes in them or it will call getChildren() for expanded node? I'm just trying to understand , how those ajax requests are working.
Yes, it will call getChildren() for the expanded node.