It looks for bean "myProperty". >>>> <html:checkbox property="myProperty"/>
Shed. -----Original Message----- From: Graeme Miller [mailto:[EMAIL PROTECTED] Sent: Monday, November 29, 2004 16:21 To: [EMAIL PROTECTED] Subject: Form tag spanning more than one tile - surely this is possible or is there alternative pattern? Hi guys, Here is what I think should be a very simple tiles question. So simple in fact that I am left scratching my head thinking there is no way struts could not do this - I must be doing something wrong! Lets say I have a base layout jsp simple-layout.jsp <%@ page language="java"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%> <html:html locale="true"> <head> <title><tiles:getAsString name="title"/></title> </head> <body> <html:form action="/SomeAction.do"> <tiles:insert attribute="body"/> <tiles:insert attribute="buttons"/> </html:form> </body> </html:html> Now I define a simple jsp that uses the above layout using the "body wrap" pattern hello.jsp <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> <tiles:insert page="simple-layout.jsp" flush="true"> <tiles:put name="title" value="Hello World" /> <tiles:put name="body" type="string"><html:checkbox property="myProperty"/><br></tiles:put> <tiles:put name="buttons" type="string">Buttons</tiles:put> </tiles:insert> What I get is the following error org.apache.jasper.JasperException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope This is caused as far as I can tell by the fact that the html:form tag in the base jsp is not being found by the html:checkbox in the jsp that uses it. Surely this is a very very commonly used pattern since you often want to have your submit buttons in a different tile from the form fields and therefore wrap them with one form tag? Any helpful comments? Gray --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature