Thanks Matthias for fixing this so promptly. I tested the form submission using the 1.1.5 SNAPSHOT, and it works.
Best regards, Colin. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthias Wessendorf Sent: 24 September 2006 20:57 To: MyFaces Discussion Subject: Re: MyFaces 1.1.4 with Struts-Faces 1.3.5 http://issues.apache.org/jira/browse/MYFACES-1421 On 9/24/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote: > that is a bug in myfaces, I'll fix it next days. > > The problem is caused by _ComponentUtils. > > > > On 9/23/06, Colin Doyle <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Hello, > > > > > > > > I had a struts-faces form working with MyFaces 1.1.3. > > > > The form is very simple, based on the logon.jsp that comes with the > > struts-faces-example2-1.3.5. > > > > The form definitely works with MyFaces 1.1.3, and the corresponding execute > > method of the Struts Action is successfully invoked. > > > > > > > > The main components of the form are basically: > > > > > > > > ************************************************************************ ************************************** > > > > <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%> > > > > <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%> > > > > <%@ taglib prefix="s" > > uri="http://struts.apache.org/tags-faces"%> > > > > <%@ taglib uri="http://myfaces.apache.org/tomahawk" > > prefix="t"%> > > > > > > > > <f:view> > > > > > > > > <f:loadBundle basename="applResources" > > > > var="appl_messages" /> > > > > > > > > <t:saveState value="#{calendarBean}" /> > > > > > > > > <s:form action="/logsAction" styleClass="form" id="logsForm"> > > > > > > > > <t:inputDate type="both" ampm="false" > > popupCalendar="true" > > > > > > value="#{calendarBean.firstDate}" > > > > > > title="#{appl_messages['logs.startDate']}"> > > > > </t:inputDate> > > > > > > > > > > > > <h:panelGrid columns="1" > > styleClass="form-background" > > > > > > headerClass="form-header" columnClasses="form-prompt,form-field" > > > > > > footerClass="form-footer"> > > > > > > > > > > > > <h:outputLabel > > for="logname" styleClass="label"> > > > > > > <h:outputText value="#{appl_messages['logs.enterLog']}" /> > > > > </h:outputLabel> > > > > > > > > <h:inputText > > id="logname" size="16" styleClass="field" > > > > > > value="#{logsFormBean.logname}" /> > > > > > > > > <h:commandButton > > id="submit" type="SUBMIT" > > > > > > styleClass="command-single" > > > > > > value="#{appl_messages['logs.submit']}" size="10" immediate="false" /> > > > > > > > > > > > > </h:panelGrid> > > > > > > > > </s:form> > > > > > > > > > > > > </f:view> > > > > > > > > ************************************************************************ ************************************** > > > > > > > > However, when I moved to MyFaces 1.1.4, I got the following error: > > > > > > > > SEVERE: Servlet.service() for servlet jsp threw exception > > > > java.lang.IllegalArgumentException: Component > > logsForm:submit must be embedded in an form > > > > at > > org.apache.myfaces.shared_impl.renderkit.html.HtmlButtonRendererBase.bui ldOnClick(HtmlButtonRendererBase.java:172) > > > > at > > org.apache.myfaces.shared_impl.renderkit.html.HtmlButtonRendererBase.enc odeEnd(HtmlButtonRendererBase.java:119) > > > > at > > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536 ) > > > > at > > org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(Rende rerUtils.java:442) > > > > at > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.rende rChildren(HtmlGridRendererBase.java:216) > > > > at > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encod eEnd(HtmlGridRendererBase.java:98) > > > > at > > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536 ) > > > > at > > javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495) > > > > at > > javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363) > > > > at > > org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UI ComponentBodyTagBase.java:54) > > > > at > > org.apache.jsp.WEB_002dINF.tiles.logs_jsp._jspx_meth_h_panelGrid_0(org.a pache.jsp.WEB_002dINF.tiles.logs_jsp:294) > > > > at > > org.apache.jsp.WEB_002dINF.tiles.logs_jsp._jspx_meth_s_form_0(org.apache .jsp.WEB_002dINF.tiles.logs_jsp:206) > > > > at > > org.apache.jsp.WEB_002dINF.tiles.logs_jsp._jspx_meth_f_view_0(org.apache .jsp.WEB_002dINF.tiles.logs_jsp:127) > > > > at > > org.apache.jsp.WEB_002dINF.tiles.logs_jsp._jspService(org.apache.jsp.WEB _002dINF.tiles.logs_jsp:84) > > > > at > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > > > > at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > at > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:332) > > > > at > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) > > > > at > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > > > > at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:672) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp atcher.java:574) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat cher.java:499) > > > > at > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja va:966) > > > > at > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java :643) > > > > at > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:6 37) > > > > at > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) > > > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) > > > > at java.lang.reflect.Method.invoke(Method.java:585) > > > > at > > org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:126) > > > > at > > org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:149) > > > > at > > org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:761) > > > > at > > org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTa g.java:893) > > > > at > > org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:462) > > > > at > > org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp._jspx_meth_tiles_in sert_1(org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp:153) > > > > at > > org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp._jspService(org.apa che.jsp.WEB_002dINF.tiles.main_002dlayout_jsp:84) > > > > at > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > > > > at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > at > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:332) > > > > at > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) > > > > at > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > > > > at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:672) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp atcher.java:574) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat cher.java:499) > > > > at > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja va:966) > > > > at > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java :643) > > > > at > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:6 37) > > > > at > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) > > > > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) > > > > at java.lang.reflect.Method.invoke(Method.java:585) > > > > at > > org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:126) > > > > at > > org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:149) > > > > at > > org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:761) > > > > at > > org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTa g.java:893) > > > > at > > org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:462) > > > > at > > org.apache.jsp.pages.logs_jsp._jspx_meth_tiles_insert_0(org.apache.jsp.p ages.logs_jsp:88) > > > > at > > org.apache.jsp.pages.logs_jsp._jspService(org.apache.jsp.pages.logs_jsp: 64) > > > > at > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > > > > at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > at > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:332) > > > > at > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) > > > > at > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > > > > at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:672) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:463) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:398) > > > > at > > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:301) > > > > at > > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S ervletExternalContextImpl.java:416) > > > > at > > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView HandlerImpl.java:234) > > > > at > > org.apache.struts.faces.application.ViewHandlerImpl.renderView(ViewHandl erImpl.java:130) > > > > at > > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384 ) > > > > at > > javax.faces.webapp.FacesServlet.service(FacesServlet.java:138) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) > > > > at > > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil ter.java:144) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:202) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) > > > > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:213) > > > > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) > > > > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) > > > > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) > > > > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) > > > > at > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) > > > > at > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86 9) > > > > at > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc essConnection(Http11BaseProtocol.java:667) > > > > at > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:527) > > > > at > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow erWorkerThread.java:80) > > > > at > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:684) > > > > at java.lang.Thread.run(Thread.java:595) > > > > 23-Sep-2006 13:01:18 > > org.apache.catalina.core.ApplicationDispatcher invoke > > > > SEVERE: Servlet.service() for servlet jsp threw exception > > > > java.lang.IllegalArgumentException: Component > > logsForm:logsForm:submit must be embedded in an form > > > > > > > > > > > > I've tried putting it in a regular html form, but this obviously will not > > pick up the Struts form. > > > > > > > > By debugging it, I believe I narrowed it down to the findNestingForm method > > of the > > org.apache.myfaces.shared_impl.util._ComponenetUtils. > > > > The COMPONENT_FAMILY of each parent from the above JSP is never > > "javax.faces.Form". The parents are: > > > > HTMLCommandButton -> HtmlPanelGrid -> FormComponent -> UIViewRoot, none of > > which have a component family of "javax.faces.Form". > > > > The component family of FormComponent is "org.apache.struts.faces.Form". > > > > In the faces-config.xml, I have a component defined as follows: > > > > > > > > <component> > > > > <component-type>org.apache.struts.faces.Form</component-type> > > > > <component-class> > > > > org.apache.struts.faces.component.FormComponent > > > > </component-class> > > > > </component> > > > > > > > > By changing the component-class to "javax.faces.component.UIForm", the form > > is rendered, but not submitted to the struts action. > > > > > > > > I was wondering if anyone knew how to get this struts-faces form working > > with MyFaces1.1.4 - I'm hoping there might be a configuration parameter that > > will do the trick. > > > > > > > > Any help is much appreciated. > > > > > > > > Thanks, > > > > > > > > Colin. > > This e-mail is business-confidential and may be privileged. If you are not > > the intended recipient, please notify us immediately and delete it. If the > > email does not relate to Vordel's business then it is neither from nor > > authorized by Vordel. Thank you. > > > > > -- > Matthias Wessendorf > http://tinyurl.com/fmywh > > further stuff: > blog: http://jroller.com/page/mwessendorf > mail: mwessendorf-at-gmail-dot-com > -- Matthias Wessendorf http://tinyurl.com/fmywh further stuff: blog: http://jroller.com/page/mwessendorf mail: mwessendorf-at-gmail-dot-com This e-mail is business-confidential and may be privileged. If you are not the intended recipient, please notify us immediately and delete it. If the email does not relate to Vordel's business then it is neither from nor authorized by Vordel. Thank you.

