maybe some code will help . am I doing something wrong here :
Code:
protected void onBindAndValidate(HttpServletRequest request,
Object command, BindException errors)
throws Exception {
log.debug ("apartmentFormController::onbind, error count is: " + errors.getErrorCount());
Apartment apt = (Apartment) command;
String bldgId = request.getParameter("building");
log.debug("bldgId is " + bldgId);
apt.setBuilding(buildingManager.getBuilding(bldgId));
log.debug ("set apt's building id, leaving method.");
}