You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Matthias Wessendorf <ma...@apache.org> on 2006/09/24 22:32:53 UTC

findNestingForm() : FormInfo (was Re: MyFaces 1.1.4 with Struts-Faces 1.3.5)

Hi devs,

since we ran into issues with some FormComponents which *extend*
UIForm, but override the Family maybe we should add an instanceof to
the findNestingForm() method ?

Currently we test if the Form is a member of the following families:

"javax.faces.Form"
"org.apache.struts.faces.Form"
"org.apache.myfaces.trinidad.Form"
"oracle.adf.Form"

The family "org.apache.struts.faces.Form" I added to day (see [1]).
Since there are more and more coming "custom" JSF libs which may
extend UIForm, but override the family (like Struts-Faces did) I think
we should add an instanceof UIForm to the algor.

Testing against the families:
"org.apache.myfaces.trinidad.Form"
"oracle.adf.Form"

makes sense because they are not UIForms. These form are also not a
naming container.

What do you think? Should I open an issue on jira regarding that?

-Matthias

[1] http://issues.apache.org/jira/browse/MYFACES-1421


On 9/24/06, Matthias Wessendorf <ma...@apache.org> wrote:
> http://issues.apache.org/jira/browse/MYFACES-1421
>
> On 9/24/06, Matthias Wessendorf <ma...@apache.org> 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 <co...@vordel.com> 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.buildOnClick(HtmlButtonRendererBase.java:172)
> > >
> > >             at
> > > org.apache.myfaces.shared_impl.renderkit.html.HtmlButtonRendererBase.encodeEnd(HtmlButtonRendererBase.java:119)
> > >
> > >             at
> > > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
> > >
> > >             at
> > > org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:442)
> > >
> > >             at
> > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
> > >
> > >             at
> > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(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(UIComponentBodyTagBase.java:54)
> > >
> > >             at
> > > org.apache.jsp.WEB_002dINF.tiles.logs_jsp._jspx_meth_h_panelGrid_0(org.apache.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.java: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(ApplicationFilterChain.java:252)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
> > >
> > >             at
> > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> > >
> > >             at
> > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:643)
> > >
> > >             at
> > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:637)
> > >
> > >             at
> > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >
> > >             at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > >
> > >             at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(InsertTag.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_insert_1(org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp:153)
> > >
> > >             at
> > > org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp._jspService(org.apache.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.java: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(ApplicationFilterChain.java:252)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
> > >
> > >             at
> > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> > >
> > >             at
> > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:643)
> > >
> > >             at
> > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:637)
> > >
> > >             at
> > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >
> > >             at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > >
> > >             at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(InsertTag.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.pages.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.java: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(ApplicationFilterChain.java:252)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> > >
> > >             at
> > > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
> > >
> > >             at
> > > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
> > >
> > >             at
> > > org.apache.struts.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.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(ApplicationFilterChain.java:252)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > >
> > >             at
> > > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > >
> > >             at
> > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > >
> > >             at
> > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> > >
> > >             at
> > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.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:148)
> > >
> > >             at
> > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > >
> > >             at
> > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
> > >
> > >             at
> > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > >
> > >             at
> > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.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
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: findNestingForm() : FormInfo (was Re: MyFaces 1.1.4 with Struts-Faces 1.3.5)

Posted by Matthias Wessendorf <ma...@apache.org>.
 	 MYFACES-1422

On 9/25/06, Martin Marinschek <ma...@gmail.com> wrote:
> True, definitely. Let's do that.
>
> regards,
>
> Martin
>
> On 9/24/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > Hi devs,
> >
> > since we ran into issues with some FormComponents which *extend*
> > UIForm, but override the Family maybe we should add an instanceof to
> > the findNestingForm() method ?
> >
> > Currently we test if the Form is a member of the following families:
> >
> > "javax.faces.Form"
> > "org.apache.struts.faces.Form"
> > "org.apache.myfaces.trinidad.Form"
> > "oracle.adf.Form"
> >
> > The family "org.apache.struts.faces.Form" I added to day (see [1]).
> > Since there are more and more coming "custom" JSF libs which may
> > extend UIForm, but override the family (like Struts-Faces did) I think
> > we should add an instanceof UIForm to the algor.
> >
> > Testing against the families:
> > "org.apache.myfaces.trinidad.Form"
> > "oracle.adf.Form"
> >
> > makes sense because they are not UIForms. These form are also not a
> > naming container.
> >
> > What do you think? Should I open an issue on jira regarding that?
> >
> > -Matthias
> >
> > [1] http://issues.apache.org/jira/browse/MYFACES-1421
> >
> >
> > On 9/24/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > > http://issues.apache.org/jira/browse/MYFACES-1421
> > >
> > > On 9/24/06, Matthias Wessendorf <ma...@apache.org> 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 <co...@vordel.com> 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.buildOnClick(HtmlButtonRendererBase.java:172)
> > > > >
> > > > >             at
> > > > > org.apache.myfaces.shared_impl.renderkit.html.HtmlButtonRendererBase.encodeEnd(HtmlButtonRendererBase.java:119)
> > > > >
> > > > >             at
> > > > > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
> > > > >
> > > > >             at
> > > > > org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:442)
> > > > >
> > > > >             at
> > > > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
> > > > >
> > > > >             at
> > > > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(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(UIComponentBodyTagBase.java:54)
> > > > >
> > > > >             at
> > > > > org.apache.jsp.WEB_002dINF.tiles.logs_jsp._jspx_meth_h_panelGrid_0(org.apache.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.java: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(ApplicationFilterChain.java:252)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
> > > > >
> > > > >             at
> > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> > > > >
> > > > >             at
> > > > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:643)
> > > > >
> > > > >             at
> > > > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:637)
> > > > >
> > > > >             at
> > > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > >
> > > > >             at
> > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > > >
> > > > >             at
> > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(InsertTag.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_insert_1(org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp:153)
> > > > >
> > > > >             at
> > > > > org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp._jspService(org.apache.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.java: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(ApplicationFilterChain.java:252)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
> > > > >
> > > > >             at
> > > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> > > > >
> > > > >             at
> > > > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:643)
> > > > >
> > > > >             at
> > > > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:637)
> > > > >
> > > > >             at
> > > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > >
> > > > >             at
> > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > > >
> > > > >             at
> > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(InsertTag.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.pages.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.java: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(ApplicationFilterChain.java:252)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> > > > >
> > > > >             at
> > > > > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
> > > > >
> > > > >             at
> > > > > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
> > > > >
> > > > >             at
> > > > > org.apache.struts.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.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(ApplicationFilterChain.java:252)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > > >
> > > > >             at
> > > > > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> > > > >
> > > > >             at
> > > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.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:148)
> > > > >
> > > > >             at
> > > > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > > > >
> > > > >             at
> > > > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
> > > > >
> > > > >             at
> > > > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > > > >
> > > > >             at
> > > > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.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
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > http://tinyurl.com/fmywh
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: findNestingForm() : FormInfo (was Re: MyFaces 1.1.4 with Struts-Faces 1.3.5)

Posted by Martin Marinschek <ma...@gmail.com>.
True, definitely. Let's do that.

regards,

Martin

On 9/24/06, Matthias Wessendorf <ma...@apache.org> wrote:
> Hi devs,
>
> since we ran into issues with some FormComponents which *extend*
> UIForm, but override the Family maybe we should add an instanceof to
> the findNestingForm() method ?
>
> Currently we test if the Form is a member of the following families:
>
> "javax.faces.Form"
> "org.apache.struts.faces.Form"
> "org.apache.myfaces.trinidad.Form"
> "oracle.adf.Form"
>
> The family "org.apache.struts.faces.Form" I added to day (see [1]).
> Since there are more and more coming "custom" JSF libs which may
> extend UIForm, but override the family (like Struts-Faces did) I think
> we should add an instanceof UIForm to the algor.
>
> Testing against the families:
> "org.apache.myfaces.trinidad.Form"
> "oracle.adf.Form"
>
> makes sense because they are not UIForms. These form are also not a
> naming container.
>
> What do you think? Should I open an issue on jira regarding that?
>
> -Matthias
>
> [1] http://issues.apache.org/jira/browse/MYFACES-1421
>
>
> On 9/24/06, Matthias Wessendorf <ma...@apache.org> wrote:
> > http://issues.apache.org/jira/browse/MYFACES-1421
> >
> > On 9/24/06, Matthias Wessendorf <ma...@apache.org> 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 <co...@vordel.com> 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.buildOnClick(HtmlButtonRendererBase.java:172)
> > > >
> > > >             at
> > > > org.apache.myfaces.shared_impl.renderkit.html.HtmlButtonRendererBase.encodeEnd(HtmlButtonRendererBase.java:119)
> > > >
> > > >             at
> > > > javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
> > > >
> > > >             at
> > > > org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:442)
> > > >
> > > >             at
> > > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
> > > >
> > > >             at
> > > > org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(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(UIComponentBodyTagBase.java:54)
> > > >
> > > >             at
> > > > org.apache.jsp.WEB_002dINF.tiles.logs_jsp._jspx_meth_h_panelGrid_0(org.apache.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.java: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(ApplicationFilterChain.java:252)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
> > > >
> > > >             at
> > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> > > >
> > > >             at
> > > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:643)
> > > >
> > > >             at
> > > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:637)
> > > >
> > > >             at
> > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >
> > > >             at
> > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > >
> > > >             at
> > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(InsertTag.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_insert_1(org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp:153)
> > > >
> > > >             at
> > > > org.apache.jsp.WEB_002dINF.tiles.main_002dlayout_jsp._jspService(org.apache.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.java: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(ApplicationFilterChain.java:252)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
> > > >
> > > >             at
> > > > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
> > > >
> > > >             at
> > > > org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:643)
> > > >
> > > >             at
> > > > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:637)
> > > >
> > > >             at
> > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >
> > > >             at
> > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > >
> > > >             at
> > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(InsertTag.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.pages.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.java: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(ApplicationFilterChain.java:252)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> > > >
> > > >             at
> > > > org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
> > > >
> > > >             at
> > > > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
> > > >
> > > >             at
> > > > org.apache.struts.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.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(ApplicationFilterChain.java:252)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >
> > > >             at
> > > > org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> > > >
> > > >             at
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> > > >
> > > >             at
> > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> > > >
> > > >             at
> > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.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:148)
> > > >
> > > >             at
> > > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > > >
> > > >             at
> > > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
> > > >
> > > >             at
> > > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > > >
> > > >             at
> > > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.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
> >
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces