[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1151) Embedded plugin Facelets drop values during postback

Christian Bauer (JIRA) jira-events at lists.jboss.org
Mon Apr 16 02:54:58 EDT 2007

    [ http://jira.jboss.com/jira/browse/JBSEAM-1151?page=comments#action_12359371 ] 
Christian Bauer commented on JBSEAM-1151:

Trying your modifications now, I can see two issues immediately:

- Rendering of /10.html is broken and Firefox now complains about invalid XHTML, looks like there is a </div> that is in the source of the page (the <div> is wrapping the [<=feedTeasers] plugin) that is not closed or closed too late. I don't see it closed after the plugin is rendered, so we definitely have a problem with nesting stuff.

- Rendering of /11.html works but once I submit the comment plugin form with no values I get:

08:45:21,793 ERROR [STDERR] java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.security.SecurityFunctions
08:45:21,794 ERROR [STDERR]     at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
08:45:21,794 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:514)
08:45:21,794 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
08:45:21,794 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
08:45:21,794 ERROR [STDERR]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
08:45:21,794 ERROR [STDERR]     at java.lang.Class.forName0(Native Method)
08:45:21,794 ERROR [STDERR]     at java.lang.Class.forName(Class.java:164)
08:45:21,794 ERROR [STDERR]     at org.apache.el.lang.FunctionMapperImpl$Function.getMethod(FunctionMapperImpl.java:147)
08:45:21,794 ERROR [STDERR]     at org.apache.el.lang.FunctionMapperImpl.resolveFunction(FunctionMapperImpl.java:53)
08:45:21,794 ERROR [STDERR]     at org.apache.el.parser.AstFunction.getValue(AstFunction.java:71)
08:45:21,794 ERROR [STDERR]     at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
08:45:21,794 ERROR [STDERR]     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
08:45:21,794 ERROR [STDERR]     at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:384)
08:45:21,795 ERROR [STDERR]     at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:981)
08:45:21,795 ERROR [STDERR]     at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:989)
08:45:21,795 ERROR [STDERR]     at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:989)
08:45:21,795 ERROR [STDERR]     at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:989)
08:45:21,795 ERROR [STDERR]     at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:494)
08:45:21,795 ERROR [STDERR]     at org.ajax4jsf.framework.ajax.AjaxViewRoot.access$001(AjaxViewRoot.java:53)
08:45:21,795 ERROR [STDERR]     at org.ajax4jsf.framework.ajax.AjaxViewRoot$1.invokeRoot(AjaxViewRoot.java:254)
08:45:21,795 ERROR [STDERR]     at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:54)
08:45:21,795 ERROR [STDERR]     at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:176)
08:45:21,795 ERROR [STDERR]     at org.ajax4jsf.framework.ajax.AjaxViewRoot.processDecodes(AjaxViewRoot.java:267)
08:45:21,795 ERROR [STDERR]     at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101)
08:45:21,795 ERROR [STDERR]     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
08:45:21,795 ERROR [STDERR]     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
08:45:21,795 ERROR [STDERR]     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)

This comes from 

Caused by: javax.el.ELException: /docDisplay.xhtml @37,79 rendered="#{s:hasPermission('Node', 'create', currentDirectory)}": Function 's:hasPermission' not found
        at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
        at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:384)
        ... 54 more

Which renders fine without the postback. 

I don't understand your last question about attributes.

> Embedded plugin Facelets drop values during postback
> ----------------------------------------------------
>                 Key: JBSEAM-1151
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1151
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Wiki
>            Reporter: Christian Bauer
>         Assigned To: Pete Muir
>            Priority: Blocker
> Pete, as discussed on IM and posted here so we can coordinate what needs to be done:
> The wiki includes Facelets manually into the facelet tree when a plugin is encountered during page rendering. This is done in two phases, through a ComponentHandler when the facelet tree is build and through a custom component that renders the HTML for the tree manually. This seems to work fine visually, and the view tree looks OK.
> However, if such an included facelet contains a form, on postback of this form the tree is rebuild during RENDER RESPONSE and any invalid component from the earlier VALIDATIONS phase is lost. So we never see entered invalid values in the form again. This can be tested with the "user comment" form on the wiki.
> The interesting thing here is that it works perfectly fine for the plugin settings forms, you can see those if you edit a document, and enable the preview and plugin settings checkboxes. These forms are much more complicated than the "user comment" form, so I haven't touched them to find out why it works in that case. The trivial "user comment" form should be easier to debug...

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list