Java 类ims.therapies.vo.AdaptationsVo 实例源码

项目:AvoinApotti    文件:Logic.java   
public void open() throws PresentationLogicException
{
    if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
        populateListControl(domain.listByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdListRow row = form.grdList().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row != null && row.getValue() != null)
        {
            form.getLocalContext().setSelectedRecord((AdaptationsVo)row.getValue());
            form.grdList().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdList().getValue());
        }
        else
            clearInstanceControls();
        updateControlsState();          
    }
    else        
        form.ctnDetail().setCollapsed(true);

    form.setMode(FormMode.VIEW);        

}
项目:openMAXIMS    文件:Logic.java   
public void open() throws PresentationLogicException
{
    if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
        populateListControl(domain.listByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdListRow row = form.grdList().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row != null && row.getValue() != null)
        {
            form.getLocalContext().setSelectedRecord((AdaptationsVo)row.getValue());
            form.grdList().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdList().getValue());
        }
        else
            clearInstanceControls();
        updateControlsState();          
    }
    else        
        form.ctnDetail().setCollapsed(true);

    form.setMode(FormMode.VIEW);        

}
项目:openMAXIMS    文件:Logic.java   
public void open() throws PresentationLogicException
{
    if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
        populateListControl(domain.listByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdListRow row = form.grdList().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row != null && row.getValue() != null)
        {
            form.getLocalContext().setSelectedRecord((AdaptationsVo)row.getValue());
            form.grdList().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdList().getValue());
        }
        else
            clearInstanceControls();
        updateControlsState();          
    }
    else        
        form.ctnDetail().setCollapsed(true);

    form.setMode(FormMode.VIEW);        

}
项目:openmaxims-linux    文件:Logic.java   
public void open() throws PresentationLogicException
{
    if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
        populateListControl(domain.listByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

    //set selection back
    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        //need to get timestamp from record retrieved from List call.
        GenForm.grdListRow row = form.grdList().getRowByValue(form.getLocalContext().getSelectedRecord());
        if (row != null && row.getValue() != null)
        {
            form.getLocalContext().setSelectedRecord((AdaptationsVo)row.getValue());
            form.grdList().setValue(form.getLocalContext().getSelectedRecord());
            populateInstanceControl(form.grdList().getValue());
        }
        else
            clearInstanceControls();
        updateControlsState();          
    }
    else        
        form.ctnDetail().setCollapsed(true);

    form.setMode(FormMode.VIEW);        

}
项目:AvoinApotti    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    AdaptationsVo voAdaptation = populateInstanceData();

    //set clinical contact
    if (!voAdaptation.getClinicalContactIsNotNull())
        voAdaptation.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    voAdaptation.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voAdaptation.validate(validateUIRules()); 

    if(arrErrors != null)
    {
        arrErrors = SearchErrS(arrErrors);
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.save(voAdaptation));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new AdaptationsVo());
        clearInstanceControls();
        loadAdaptationCategories();
        form.ctnDetail().setCollapsed(false);
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }   
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdListSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    //Display Panel and detail
    form.getLocalContext().setSelectedRecord((AdaptationsVo)form.grdList().getValue());
    populateInstanceControl(form.grdList().getValue());
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    AdaptationsVo voAdaptation = populateInstanceData();

    //set clinical contact
    if (!voAdaptation.getClinicalContactIsNotNull())
        voAdaptation.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    voAdaptation.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voAdaptation.validate(validateUIRules()); 

    if(arrErrors != null)
    {
        arrErrors = SearchErrS(arrErrors);
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.save(voAdaptation));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new AdaptationsVo());
        clearInstanceControls();
        loadAdaptationCategories();
        form.ctnDetail().setCollapsed(false);
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }   
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdListSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    //Display Panel and detail
    form.getLocalContext().setSelectedRecord((AdaptationsVo)form.grdList().getValue());
    populateInstanceControl(form.grdList().getValue());
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    AdaptationsVo voAdaptation = populateInstanceData();

    //set clinical contact
    if (!voAdaptation.getClinicalContactIsNotNull())
        voAdaptation.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    voAdaptation.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voAdaptation.validate(validateUIRules()); 

    if(arrErrors != null)
    {
        arrErrors = SearchErrS(arrErrors);
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.save(voAdaptation));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new AdaptationsVo());
        clearInstanceControls();
        loadAdaptationCategories();
        form.ctnDetail().setCollapsed(false);
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }   
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdListSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    //Display Panel and detail
    form.getLocalContext().setSelectedRecord((AdaptationsVo)form.grdList().getValue());
    populateInstanceControl(form.grdList().getValue());
    updateControlsState();
}
项目:openmaxims-linux    文件:Logic.java   
public boolean save() throws PresentationLogicException
{
    AdaptationsVo voAdaptation = populateInstanceData();

    //set clinical contact
    if (!voAdaptation.getClinicalContactIsNotNull())
        voAdaptation.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    voAdaptation.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    //validate Vo
    String[] arrErrors =  voAdaptation.validate(validateUIRules()); 

    if(arrErrors != null)
    {
        arrErrors = SearchErrS(arrErrors);
        engine.showErrors(arrErrors);
        return false;
    }

    try
    {
        form.getLocalContext().setSelectedRecord(domain.save(voAdaptation));
    }
    catch(StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
public void newInstance() throws PresentationLogicException
{
    if (allowNew())
    {
        // initalise the screen for a new record
        form.getLocalContext().setSelectedRecord(new AdaptationsVo());
        clearInstanceControls();
        loadAdaptationCategories();
        form.ctnDetail().setCollapsed(false);
        //set the form mode
        form.setMode(FormMode.EDIT);
        //set any control status specific this form         
    }   
}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdListSelectionChanged() throws ims.framework.exceptions.PresentationLogicException
{
    //Display Panel and detail
    form.getLocalContext().setSelectedRecord((AdaptationsVo)form.grdList().getValue());
    populateInstanceControl(form.grdList().getValue());
    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(ims.vo.ValueObject refVo)
{
    clearInstanceControls();

    if (refVo != null)
    {
        AdaptationsVo voAdaptation = (AdaptationsVo)refVo;

        if (voAdaptation.getItemCategoryIsNotNull())
        {
            //if (form.ctnDetail().comboBoxAdapt1().size() == 0)
            form.ctnDetail().comboBoxAdapt1().newRow(voAdaptation.getItemCategory(),voAdaptation.getItemCategory().toString());
            form.ctnDetail().comboBoxAdapt1().setValue(voAdaptation.getItemCategory());

            //loadChildAdaptations();
            if(voAdaptation.getItemType() != null)
                form.ctnDetail().comboBoxAdapt2().newRow(voAdaptation.getItemType(), voAdaptation.getItemType().toString());
            form.ctnDetail().comboBoxAdapt2().setValue(voAdaptation.getItemType());
        }
        else
            form.ctnDetail().comboBoxAdapt1().clear();

        form.ctnDetail().comboBoxSupplier().setValue(voAdaptation.getSupplierIsNotNull() ? voAdaptation.getSupplier(): null);

        form.ctnDetail().dateRequired().setValue(voAdaptation.getDateRequiredIsNotNull() ? voAdaptation.getDateRequired() : null);

        form.ctnDetail().dateSupplied().setValue(voAdaptation.getDateSuppliedIsNotNull() ? voAdaptation.getDateSupplied() : null);

        form.ctnDetail().comboBoxSuppliedFor().setValue(voAdaptation.getSuppliedForIsNotNull() ? voAdaptation.getSuppliedFor() : null);

        form.ctnDetail().comboBoxLoan().setValue(voAdaptation.getLoanIsNotNull() ? voAdaptation.getLoan(): null);

        form.ctnDetail().comboBoxFunded().setValue(voAdaptation.getFundedByIsNotNull() ? voAdaptation.getFundedBy(): null);

        form.getLocalContext().setSelectedRecord(voAdaptation);

        form.grdList().setValue(form.getLocalContext().getSelectedRecord());

        form.ctnDetail().setCollapsed(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(ims.vo.ValueObject refVo)
{
    clearInstanceControls();

    if (refVo != null)
    {
        AdaptationsVo voAdaptation = (AdaptationsVo)refVo;

        if (voAdaptation.getItemCategoryIsNotNull())
        {
            //if (form.ctnDetail().comboBoxAdapt1().size() == 0)
            form.ctnDetail().comboBoxAdapt1().newRow(voAdaptation.getItemCategory(),voAdaptation.getItemCategory().toString());
            form.ctnDetail().comboBoxAdapt1().setValue(voAdaptation.getItemCategory());

            //loadChildAdaptations();
            if(voAdaptation.getItemType() != null)
                form.ctnDetail().comboBoxAdapt2().newRow(voAdaptation.getItemType(), voAdaptation.getItemType().toString());
            form.ctnDetail().comboBoxAdapt2().setValue(voAdaptation.getItemType());
        }
        else
            form.ctnDetail().comboBoxAdapt1().clear();

        form.ctnDetail().comboBoxSupplier().setValue(voAdaptation.getSupplierIsNotNull() ? voAdaptation.getSupplier(): null);

        form.ctnDetail().dateRequired().setValue(voAdaptation.getDateRequiredIsNotNull() ? voAdaptation.getDateRequired() : null);

        form.ctnDetail().dateSupplied().setValue(voAdaptation.getDateSuppliedIsNotNull() ? voAdaptation.getDateSupplied() : null);

        form.ctnDetail().comboBoxSuppliedFor().setValue(voAdaptation.getSuppliedForIsNotNull() ? voAdaptation.getSuppliedFor() : null);

        form.ctnDetail().comboBoxLoan().setValue(voAdaptation.getLoanIsNotNull() ? voAdaptation.getLoan(): null);

        form.ctnDetail().comboBoxFunded().setValue(voAdaptation.getFundedByIsNotNull() ? voAdaptation.getFundedBy(): null);

        form.getLocalContext().setSelectedRecord(voAdaptation);

        form.grdList().setValue(form.getLocalContext().getSelectedRecord());

        form.ctnDetail().setCollapsed(false);
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(ims.vo.ValueObject refVo)
{
    clearInstanceControls();

    if (refVo != null)
    {
        AdaptationsVo voAdaptation = (AdaptationsVo)refVo;

        if (voAdaptation.getItemCategoryIsNotNull())
        {
            //if (form.ctnDetail().comboBoxAdapt1().size() == 0)
            form.ctnDetail().comboBoxAdapt1().newRow(voAdaptation.getItemCategory(),voAdaptation.getItemCategory().toString());
            form.ctnDetail().comboBoxAdapt1().setValue(voAdaptation.getItemCategory());

            //loadChildAdaptations();
            if(voAdaptation.getItemType() != null)
                form.ctnDetail().comboBoxAdapt2().newRow(voAdaptation.getItemType(), voAdaptation.getItemType().toString());
            form.ctnDetail().comboBoxAdapt2().setValue(voAdaptation.getItemType());
        }
        else
            form.ctnDetail().comboBoxAdapt1().clear();

        form.ctnDetail().comboBoxSupplier().setValue(voAdaptation.getSupplierIsNotNull() ? voAdaptation.getSupplier(): null);

        form.ctnDetail().dateRequired().setValue(voAdaptation.getDateRequiredIsNotNull() ? voAdaptation.getDateRequired() : null);

        form.ctnDetail().dateSupplied().setValue(voAdaptation.getDateSuppliedIsNotNull() ? voAdaptation.getDateSupplied() : null);

        form.ctnDetail().comboBoxSuppliedFor().setValue(voAdaptation.getSuppliedForIsNotNull() ? voAdaptation.getSuppliedFor() : null);

        form.ctnDetail().comboBoxLoan().setValue(voAdaptation.getLoanIsNotNull() ? voAdaptation.getLoan(): null);

        form.ctnDetail().comboBoxFunded().setValue(voAdaptation.getFundedByIsNotNull() ? voAdaptation.getFundedBy(): null);

        form.getLocalContext().setSelectedRecord(voAdaptation);

        form.grdList().setValue(form.getLocalContext().getSelectedRecord());

        form.ctnDetail().setCollapsed(false);
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * displays the Family History record specified by FamilyHistoryVo
 * @param voFamHist
 */
public void populateInstanceControl(ims.vo.ValueObject refVo)
{
    clearInstanceControls();

    if (refVo != null)
    {
        AdaptationsVo voAdaptation = (AdaptationsVo)refVo;

        if (voAdaptation.getItemCategoryIsNotNull())
        {
            //if (form.ctnDetail().comboBoxAdapt1().size() == 0)
            form.ctnDetail().comboBoxAdapt1().newRow(voAdaptation.getItemCategory(),voAdaptation.getItemCategory().toString());
            form.ctnDetail().comboBoxAdapt1().setValue(voAdaptation.getItemCategory());

            //loadChildAdaptations();
            if(voAdaptation.getItemType() != null)
                form.ctnDetail().comboBoxAdapt2().newRow(voAdaptation.getItemType(), voAdaptation.getItemType().toString());
            form.ctnDetail().comboBoxAdapt2().setValue(voAdaptation.getItemType());
        }
        else
            form.ctnDetail().comboBoxAdapt1().clear();

        form.ctnDetail().comboBoxSupplier().setValue(voAdaptation.getSupplierIsNotNull() ? voAdaptation.getSupplier(): null);

        form.ctnDetail().dateRequired().setValue(voAdaptation.getDateRequiredIsNotNull() ? voAdaptation.getDateRequired() : null);

        form.ctnDetail().dateSupplied().setValue(voAdaptation.getDateSuppliedIsNotNull() ? voAdaptation.getDateSupplied() : null);

        form.ctnDetail().comboBoxSuppliedFor().setValue(voAdaptation.getSuppliedForIsNotNull() ? voAdaptation.getSuppliedFor() : null);

        form.ctnDetail().comboBoxLoan().setValue(voAdaptation.getLoanIsNotNull() ? voAdaptation.getLoan(): null);

        form.ctnDetail().comboBoxFunded().setValue(voAdaptation.getFundedByIsNotNull() ? voAdaptation.getFundedBy(): null);

        form.getLocalContext().setSelectedRecord(voAdaptation);

        form.grdList().setValue(form.getLocalContext().getSelectedRecord());

        form.ctnDetail().setCollapsed(false);
    }
}