You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Schachter, Michael" <MS...@Bluestone.com> on 2001/01/06 20:24:20 UTC
Nested/Indexed Properties Now Supported
Although strangely there was no commit email, last night I committed changes
to BeanUtils, PropertyUtils, and BaseFieldTag that enable form elements to
have nested and indexed properties. If you check CVS the latest code is
there. Just letting everyone know.
Re: Nested/Indexed Properties Now Supported
Posted by Oleg V Alexeev <go...@penza.net>.
Hello Michael,
Saturday, January 06, 2001, 10:24:20 PM, you wrote:
SM> Although strangely there was no commit email, last night I committed changes
SM> to BeanUtils, PropertyUtils, and BaseFieldTag that enable form elements to
SM> have nested and indexed properties. If you check CVS the latest code is
SM> there. Just letting everyone know.
Great! Thanks for this.
--
Best regards,
Oleg mailto:gonza@penza.net
Re: Nested/Indexed Properties Now Supported
Posted by Oleg V Alexeev <go...@penza.net>.
Hello Michael,
Sorry, but some questions.. I try to write test Form with listed
below indexed properties and this is not work... What part of code is
wrong?
public class TestForm extends ActionForm {
protected HashMap test = new HashMap();
protected String[] ind = new String[10];
public void setProp( int index, String value ) {
test.put( new Integer( index ), value );
}
public String getProp( int index ) {
return (String)test.get( new Integer( index ) );
}
public String[] getIndex() {
return ind;
}
}
and test jsp page to use this form -
<html><head>
<%@ page contentType="text/html;charset=windows-1251" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/bcom.tld" prefix="bcom" %>
</head>
<body bgcolor="#F7E7CE" text="#510000" link="#800000" vlink="#800000" alink="#800000" topmargin="0" leftmargin="0">
prop[4] = <%= request.getParameter("prop[4]") %><br>
prop[2] = <%= request.getParameter("prop[2]") %><br>
index[1] = <%= request.getParameter("index[1]") %><br>
index[4] = <%= request.getParameter("index[4]") %><br>
<form:form name="testForm" type="bcom.actions.TestForm" method="post" action="test.do">
<form:text property="prop[4]"/><br>
<form:text property="prop[2]"/><br>
<form:text property="index[1]"/><br>
<form:text property="index[4]"/><br>
<form:submit/>
</form:form>
</body>
</html>
Saturday, January 06, 2001, 10:24:20 PM, you wrote:
SM> Although strangely there was no commit email, last night I committed changes
SM> to BeanUtils, PropertyUtils, and BaseFieldTag that enable form elements to
SM> have nested and indexed properties. If you check CVS the latest code is
SM> there. Just letting everyone know.
--
Best regards,
Oleg mailto:gonza@penza.net