2010-09-13 49 views
0

我有Bean A {B b;}它封装了Bean B的实例。 我有属性名称,我想要设置Bean B的名称属性。有什么办法吗?我能做到这一点春天。目前我正在使用AbstractCommandController。在Spring MVC中设置jsp中的bean的属性

回答

0

如果你想嵌套对象的属性绑定到表单域,您可以使用.path属性做到这一点:

<form:form ...> 
    <form:input path = "b.name" /> 
</form:form> 
相关问题