Class cast exception when partial page rendering!
Hi all.
I've got class cast exception issue:
Code:
java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
Here's the form code:
Code:
<form:form id="HRMEditForm1" modelAttribute="HRMEditForm" method="get" action="${flowExectionUrl}">
<form:select id="country" path="countryId" cssStyle="width:200px;">
<form:option id="" value=""></form:option>
<form:options items="${HRMEditForm.countryList}" itemValue="countryIso2" itemLabel="countryName"></form:options>
</form:select>
<script type="text/javascript">
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId: "country",
formId: "HRMEditForm1",
event: "onchange",
params: { _eventId: "renderAddress", fragments: "address" }
}));
</script>
<form:select id="city" path="cityId" cssStyle="width:200px;">
<form:option id="" value=""></form:option>
<form:options items="${HRMEditForm.cityList}" itemValue="cityId" itemLabel="cityName"></form:options>
</form:select>
<script type="text/javascript">
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId: "city",
formId: "HRMEditForm1",
event: "onchange",
params: { _eventId: "renderAddress", fragments: "address" }
}));
</script>
<form:select id="district" path="districtId" cssStyle="width:200px;" >
<form:option id="" value=""></form:option>
<form:options items="${HRMEditForm.districtList}" itemValue="id.districtId" itemLabel="districtName"></form:options>
</form:select>
<script type="text/javascript">
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId: "district",
formId: "HRMEditForm1",
event: "onchange",
params: { _eventId: "renderAddress", fragments: "address" }
}));
</script>
<form:select path="quarterId" cssStyle="width:200px;">
<form:option id="" value=""></form:option>
<form:options items="${HRMEditForm.quarterList}" itemValue="id.quarterId" itemLabel="quarterName"></form:options>
</form:select>
</form:form>
Here's the flow definition:
Code:
<input name="mscode"/>
<on-start>
<set name="flowScope.HRMEditForm" value="HRMEditController.createNew()"/>
<set name="flowScope.hrmEditMs" value="MedicalSpecialistDAO.findById(mscode)"/>
<evaluate expression="flowScope.HRMEditForm.setMedicalSpecialistInfo(flowScope.hrmEditMs)" />
<set name="flowScope.HRMEditForm.countryList" value="CountryDAO.findAll()" />
<set name="flowScope.HRMEditForm.cityList" value="CityDAO.findByCountryId(flowScope.HRMEditForm.countryId)" />
<set name="flowScope.HRMEditForm.districtList" value="DistrictDAO.findByCityId(flowScope.HRMEditForm.cityId)" />
<set name="flowScope.HRMEditForm.quarterList" value="QuarterDAO.findByCityAndDistrict(flowScope.HRMEditForm.cityId, flowScope.HRMEditForm.districtId)" />
</on-start>
<view-state id="start" view="admin/hrmcpedit" model="flowScope.HRMEditForm">
<transition on="renderAddress">
<set name="flowScope.HRMEditForm.cityList" value="CityDAO.findByCountryId(flowScope.HRMEditForm.countryId)" />
<set name="flowScope.HRMEditForm.districtList" value="DistrictDAO.findByCityId(flowScope.HRMEditForm.cityId)" />
<set name="flowScope.HRMEditForm.quarterList" value="QuarterDAO.findByCityAndDistrict(flowScope.HRMEditForm.cityId, flowScope.HRMEditForm.districtId)" />
<render fragments="address" />
</transition>
<transition on="back" to="back" />
</view-state>
<end-state id="back">
</end-state>
I'm using tiles 2.0.6, spring framework 2.5.6 and web flow 2.0.7.