ifs-web-service/ifs-application-service/src/main/java/org/innovateuk/ifs/registration/controller/AbstractOrganisationCreationController.java
/**
     * after user has selected a organisation, get the details and add it to the form and the model.
     */
after user has selected a organisation, get the details and add it to the form and the model.
after user has selected a organisation get the details and add it to the form and the model .
protected OrganisationSearchResult addSelectedOrganisation(OrganisationCreationForm organisationForm, Model model) {
        if (!organisationForm.isManualEntry() && isNotBlank(organisationForm.getSearchOrganisationId())) {
            OrganisationSearchResult organisationSearchResult = organisationSearchRestService.getOrganisation(organisationForm.getOrganisationTypeId(), organisationForm.getSearchOrganisationId()).getSuccess();
            organisationForm.setOrganisationName(organisationSearchResult.getName());
            model.addAttribute("selectedOrganisation", organisationSearchResult);
            return organisationSearchResult;
        }
        return null;
    }
protected OrganisationSearchResult addSelectedOrganisation ( OrganisationCreationForm organisationForm , Model model ) { if ( ! organisationForm . isManualEntry ( ) && isNotBlank ( organisationForm . getSearchOrganisationId ( ) ) ) { OrganisationSearchResult organisationSearchResult = organisationSearchRestService . getOrganisation ( organisationForm . getOrganisationTypeId ( ) , organisationForm . getSearchOrganisationId ( ) ) . getSuccess ( ) ; organisationForm . setOrganisationName ( organisationSearchResult . getName ( ) ) ; model . addAttribute ( "selectedOrganisation" , organisationSearchResult ) ; return organisationSearchResult ; } return null ; }
after user has selected a organisation, get the details and add it to the form and the model.
after user has selected a organisation get the details and add it to the form and the model .