binding in HTMLPanelMenu results in IllegalAccessError
temmink Feb 13, 2009 1:49 AMHello,
I'm trying to create a dynamically created htmlPanelMenu, the binding attribute points to a method in the backing bean. Once I add the binding attribute to htmlPanelMenu tag, any link on the page(links in htmlPanelMenu but also separate commandLink) results in recursively loading the debug page. The exception that appears in the log is:
java.lang.IllegalAccessError: tried to access class com.sun.facelets.StateWriter from class com.sun.facelets.StateWriterControl
I have debugged the source, and checked if there was a problem with versions of jars, but previous/newer versions of the jars (jsf-facelets and seam-debug.jar) do not show any changes in the relevant classes.
The StateWriteControl class is a seam-debug class, so I'm assuming the issue is related to Seam.
Can anybody give me a pointer what is going wrong here? I'm using JBoss 4.2.2.GA Seam 2.1.1 GA
page:
<ui:define name="body"> <h:form id="roll" styleClass="photobook"> <h:commandLink action="#{testClass.navigate}" >blabla</h:commandLink> <f:facet name="header">#{rollHome.managed ? 'Edit' : 'Add'} Roll</f:facet> <h:commandLink action="http://www.nu.nl" value="testLink"/> <rich:panelMenu binding="#{albumList.albumsAsPanelMenu}"/> </h:form> </ui:define>
code:
public UIComponent getAlbumsAsPanelMenu(){ HtmlPanelMenu component = new HtmlPanelMenu(); component.setId("panelMenu"); for(Album album: getResultList()){ HtmlPanelMenuGroup panelGroup = new HtmlPanelMenuGroup(); panelGroup.setId(album.getName()); panelGroup.setName(album.getName()); panelGroup.setLabel(album.getName()); for(Roll roll: album.getRolls()){ HtmlPanelMenuItem panelMenuItem = new HtmlPanelMenuItem(); panelMenuItem.setLabel(roll.getDisplayname()); panelMenuItem.setValue("/" + album.getId() + "/" + roll.getId() + "/"); panelMenuItem.setName("Roll"+ roll.getDisplayname()); panelGroup.getChildren().add(panelMenuItem); } component.getChildren().add(panelGroup); } return component; }
Exception:
Caused by: java.lang.IllegalAccessError: tried to access class com.sun.facelets.StateWriter from class com.sun.facelets.StateWriterControl at com.sun.facelets.StateWriterControl.initialize(StateWriterControl.java:18) at org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(SeamDebugPhaseListener.java:52) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)