Try swapping the <nested:form> with <html:form>. I'd be surprised if it didn't start working.
Each tag sets a reference. <nested:form> tag is special in that it's a "root" tag that defines the start of a nested structure. Your example is nesting fine until you hit the form tag. I can see your logic in using "../" to get around the tag, but the relative properties ("../" "/myProp" et al) are against the bean reference itself not the tag markup. It is "possible", but would take some implementing without what I see as a real gain, as most nested forms are relative to the root form bean. Arbitrarily putting a form around an arbitrary level would be confusing, as the names wouldn't match the form going back to the server to be set by Struts anyways. I'd evaluate what it is you're trying to get back out of the form, and the use of a FormBean as the root bean. Or the quick answer is "use the <html:form> tag as it won't modify the nested context that all the child tags are using". All the best. Arron. > I'm using RC1, playing around with nested tag support, and ran into an > unexpected behavior. I'm not sure if this is by design and I'm using it > incorrectly, or a bug. > > I'm iterating over a list of users, and want to create a short form for each > user, containing their username and a submit button. However, I can't seem to > refer to the bean created by the nested:iterate tag from within the > nested:form scope. Jsp source code below. > > How, from a nested:form, can I refer to a bean in the parent scope? As > demonstrated below, "../" does not seem to work in this situation. Any > suggestions? Workarounds? Help? > > Thanks in advance, > --Scott Severtson > > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %> > > <jsp:useBean id="factory" scope="application" class="org.edutech.users.Factory"/> > > <html> > <body> > <table> > <nested:iterate name="factory" property="users"> > <tr> > <td> > <!-- Outputs username as expected --> > <nested:write property="userName"/> > </td> > <td> > <!-- Action references a form-bean named UserEditForm, who's implementation contains a userName property and get/setUserName methods --> > <nested:form action="/user/delete"> > > <!--Output is empty, and refers to the UserEditForm, as expected --> > <nested:write property="userName"/> > > <!-- Output is empty, and still seems to refer to the UserEditForm --> > <nested:write property="../userName"/> > > <!-- Output produces a JspException when uncommented: --> > <!-- No getter method for property ../userName of bean UserEditForm --> > <!--nested:write property="../../userName"/--> > > <nested:submit property="submit"/> > </nested:form> > </td> > </tr> > </nested:iterate> > </table> > </body> > </html> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]