webtier@glassfish.java.net

Re: [webtier] Re: JSF 2.0 CompositeComponent with f:ajax inside

From: Jim Driscoll <Jim.Driscoll_at_Sun.COM>
Date: Mon, 17 Aug 2009 00:26:22 -0700

What is the component ID in the rendered page?

Jim

On 8/10/09 10:07 AM, webtier_at_javadesktop.org wrote:
> Hello Jim,
>
> thank you for your support! Ok, i have tried this:
> <standardComp:userComp userController="#{userController}" renderId=":result" />
> error:
> javax.servlet.ServletException:<f:ajax> contains an unknown id ':result' - cannot locate it in the context of the component btnSave
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:323)
>
> and that:
> <standardComp:userComp userController="#{userController}" renderId="myform:result" />
> with
> <h:form id="myform" prependId="false">...</h:form>
> error:
> javax.servlet.ServletException:<f:ajax> contains an unknown id 'myform:result' - cannot locate it in the context of the component btnSave
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:323)
>
> I am using the Project Mojarra nightly build from saturday 8th august 2009. And here is the code of my page where i call the composite component:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:c="http://java.sun.com/jsp/jstl/core"
> xmlns:standardComp="http://java.sun.com/jsf/composite/standardComp">
> <ui:composition template="_templates/mainViewTemplate.xhtml">
> <ui:define name="formular">
> <standardComp:userComp userController="#{userController}" renderId="myform:result" />
>
> <h:link value="Neue Seite" outcome="page.xhtml" />
> <h:dataTable id="result" value="#{userService.userCache}" var="savedUser">
> <h:column>
> <h:outputText value="#{savedUser.firstname}" />
> </h:column>
>
> <h:column>
> <h:outputText value="#{savedUser.surname}" />
> </h:column>
> </h:dataTable>
> </ui:define>
> </ui:composition>
> </html>
> [Message sent by forum member 'finarfin' (finarfin)]
>
> http://forums.java.net/jive/thread.jspa?messageID=359759
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>