} else if(ServiceResource.class.isAssignableFrom(resource.getClass())) {
return new ResourceEditPanel<ServiceResource, ResourceFormData>(componentId, this.<ServiceResource>getResourceModel());
} else if(MoneyResource.class.isAssignableFrom(resource.getClass())) {
return new MoneyEditPanel(componentId, this.<MoneyResource>getResourceModel());
} else {
throw new BusinessLogicException("Unknown resource type:" + (resource == null ? "NULL" : resource.getClass().getName()));
}
case CONFIRM_SUPPLY:
return new ConfirmSupplyPanel(componentId, getResourceModel());
case TENDERS_NEED:
return new NeedsManagementPanel(componentId, getResourceModel());
case TENDERS_SUPPLY:
return new SuppliesManagementPanel(componentId, getResourceModel());
case PERSONAL_TENDER:
return new PersonalTenderPanel(componentId, getResourceModel());
}
throw new BusinessLogicException("Cannot build the panel for action '" + action + "'");
}