ポストバック中にリスト内にネストされたオブジェクトにチェックボックスの値をバインドするのは非常に困難です。リスト内の Webflow とネストされたオブジェクトに問題はありますか?.
jsp
<div style="margin-left: 15px; margin-bottom: 8px;">
<form:checkbox id="firmUserBeingEditedPermissionList[${status.index}].cascading" path="firmUserBeingEditedPermissionList[${status.index}].cascading"
onclick="toggleCascading(${status.index}, this, event);"/><spring:message code="setFirmPermissions.cascading" />
</div>
フロー.xml
<input name="userName" required="true"/>
<on-start>
<evaluate expression="firmUserPermissionDetailViewBuilder.createFirmUserPermissionDetailView(userName)" result="flowScope.firmUserPermissionView" />
</on-start>
<view-state id="setFirmPermissions" view="admin/setFirmPermissions3" model="firmUserPermissionView">
<binder>
<binding property="firmUserBeingEditedPermissionList" required="true"/>
</binder>
<transition on="submitAddFirm" to="setFirms">
</transition>
<transition on="submitPermissions" to="viewAndConfirm"/>
<transition on="cancelSetFirmPermissions" to="cancelChange"/>
</view-state>
事務所ユーザー権限ビュー
public class FirmUserPermissionView は Serializable を実装します {
private static final long serialVersionUID = -7219027256643534729L;
public static final String KEY = "firmUserPermissionView";
private AbstractUser currentAdminUser;
private AbstractUser firmUser;
private List<UserPermissionFirmDetail> firmUsersCurrentUserPermissionDetailList;
private List<UserPermissionFirmDetailFBO> firmUserBeingEditedPermissionList;
private Map<String, Collection<FirmSession>> firmCdAndExchangeSessionMap;
private Map<String, Collection<Firm>> firmCdAndExchangeSubFirmMap;
private Map<String, Collection<String>> firmCdAndExchangeExcludedSubFirmMap;
private Collection<String> exchangeSymbolsAvailableToLoggedInUser;
private List<PresentableFirmPermission> unSelectedFirmPresentablePermissions;
private List<PresentableFirmPermission> selectedFirmPresentablePermissions;
public List<UserPermissionFirmDetail> getFirmUsersCurrentUserPermissionDetailList() {
return firmUsersCurrentUserPermissionDetailList;
}
public void setFirmUsersCurrentUserPermissionDetailList(
List<UserPermissionFirmDetail> firmUsersCurrentUserPermissionDetailList) {
this.firmUsersCurrentUserPermissionDetailList = firmUsersCurrentUserPermissionDetailList;
}
サーブレット
<bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
<property name="flowExecutor" ref="flowExecutor"/>
</bean>
<flow:flow-executor id="flowExecutor" flow-registry="flowRegistry"/>
<!-- This creates an XmlFlowRegistryFactory bean -->
<flow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
<flow:flow-location path="/WEB-INF/flows/setFirmPermissions.xml"/>
</flow:flow-registry>
<flow:flow-builder-services id="flowBuilderServices" view-factory-creator="viewFactoryCreator" development="true"/>
<bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
<property name="useSpringBeanBinding" value="true"/>
<property name="viewResolvers">
<list>
<ref bean="viewResolver"/>
</list>
</property>
UserPermissionFirmDetailFBO は UserPermissionFirm を拡張します
public class UserPermissionFirm extends AbstractUserPermission {
private static final long serialVersionUID = 1L;
private Long firmId;
private String brokerCd;
private String accountCd;
private boolean cascading;
private boolean supervisor;
private boolean authorisedForSessionCancel;
//used to store supervisor own entering Trader Id
private String enteringTraderId;
private boolean inherited = false;
//Permissions are 'disabled' if they have no sessions
private boolean pseudoDisabledForNoSessions;
private Long exchangeId;
/**
* @return the cascading
*/
public boolean isCascading() {
return cascading;
}
/**
* @param cascading
* the cascading to set
*/
public void setCascading(boolean cascading) {
this.cascading = cascading;
}