Changeset 3058

Show
Ignore:
Timestamp:
02/02/12 09:28:11 (4 months ago)
Author:
hvrijn
Message:

Issue 1596 Error creating pathwayparticipation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • his/trunk/frontend/internal/src/main/java/org/joiningtracks/his/frontend/employee/patient/pathway/PathwayParticipationPanel.java

    r1797 r3058  
    5151/** 
    5252 * Abstract Panel that holds the basis for creating and editing a pathway participation. 
    53  *  
     53 * 
    5454 * @author Tim van Baarsen 
    5555 */ 
     
    9797        form.add(searchOrNewChoiceGroup); 
    9898 
    99         Model searchModel=new Model("search"); 
     99        Model searchModel = new Model("search"); 
    100100        newModel = new Model("new"); 
    101101 
     
    112112            } 
    113113        }); 
    114          
     114 
    115115        Radio newReferrer = new Radio("new", newModel); 
    116116        newReferrer.add(new AjaxEventBehavior("onchange") { 
     
    211211     */ 
    212212    protected final boolean creatingNewContactPerson() { 
    213         return searchOrNewChoiceGroup.getDefaultModelObject().equals(newModel.getObject()); 
     213        boolean bool; 
     214        try { 
     215            bool = searchOrNewChoiceGroup.getDefaultModelObject().equals(newModel.getObject()); 
     216        } catch (Exception ex) { 
     217            bool = false; 
     218        } 
     219        return bool; 
    214220    } 
    215221 
     
    217223        AddressableEntity payingParty = payment.getPayingParty(); 
    218224        if (payingParty instanceof ContactCompany) { 
    219             ContactCompany contactCompany = (ContactCompany)payingParty; 
    220             if(!contactCompany.isPersisted())
     225            ContactCompany contactCompany = (ContactCompany) payingParty; 
     226            if (!contactCompany.isPersisted())
    221227                ContactCompany foundContact = contactCompanyService.findByName(contactCompany.getName()); 
    222228                if (foundContact == null) { 
     
    248254     * Handle to form submit for the given form. 
    249255     * 
    250      * @param form   the form to handle the form submitting for 
     256     * @param form                the form to handle the form submitting for 
    251257     * @param cancelButtonPressed true if the cancel button is pressed otherwise false 
    252258     */ 
     
    260266        Collection<PathwayParticipationCustomValueProvider> customValueProviders = osgiUtils.getServices(PathwayParticipationCustomValueProvider.class); 
    261267        for (PathwayParticipationCustomValueProvider customValueProvider : customValueProviders) { 
    262             if(customValueProvider.customValuePanelEnabled(processDefinition))
     268            if (customValueProvider.customValuePanelEnabled(processDefinition))
    263269                Panel customValuePanel = customValueProvider.getCustomValueEditPanel(rv.newChildId(), processDefinition, Model.ofSet(pathwayParticipationCustomValues)); 
    264270                rv.add(customValuePanel);