Search in sources :

Example 1 with RiaWrapperComponent

use of org.jaffa.presentation.portlet.component.RiaWrapperComponent in project jaffa-framework by jaffa-projects.

the class TaskMaintenanceComponent method displayBusinessEventLogFinder.

/**
 * Calls the Jaffa.Messaging.BusinessEventLogFinder component for displaying the BusinessEventLog objects.
 * @throws ApplicationExceptions This will be thrown in case any invalid data has been set.
 * @throws FrameworkException Indicates some system error.
 * @return The FormKey for the Finder screen.
 */
public FormKey displayBusinessEventLogFinder() throws ApplicationExceptions, FrameworkException {
    RiaWrapperComponent finderComponent = (RiaWrapperComponent) run("Jaffa.Messaging.BusinessEventLogFinder");
    finderComponent.getParameters().setProperty("displayResultsScreen", Boolean.TRUE.toString());
    finderComponent.getParameters().setProperty("scheduledTaskId", getScheduledTaskId());
    return finderComponent.display();
}
Also used : RiaWrapperComponent(org.jaffa.presentation.portlet.component.RiaWrapperComponent)

Example 2 with RiaWrapperComponent

use of org.jaffa.presentation.portlet.component.RiaWrapperComponent in project jaffa-framework by jaffa-projects.

the class MessageViewerComponent method displayBusinessEventLogFinder.

public FormKey displayBusinessEventLogFinder() throws ApplicationExceptions, FrameworkException {
    RiaWrapperComponent finderComponent = (RiaWrapperComponent) run("Jaffa.Messaging.BusinessEventLogFinder");
    finderComponent.getParameters().setProperty("displayResultsScreen", Boolean.TRUE.toString());
    finderComponent.getParameters().setProperty("messageId", createTx().getMessageIdForBusinessEventLog(createMessageViewerInDto()));
    return finderComponent.display();
}
Also used : RiaWrapperComponent(org.jaffa.presentation.portlet.component.RiaWrapperComponent)

Example 3 with RiaWrapperComponent

use of org.jaffa.presentation.portlet.component.RiaWrapperComponent in project jaffa-framework by jaffa-projects.

the class FormSelectionMaintenanceComponent method doUpdateDetail.

/**
 * Show the AdditionalData Component.
 * Pass the Additional Data Object if there is one.
 */
public FormKey doUpdateDetail(GridModelRow selectedRow, String actionPath) throws ApplicationExceptions, FrameworkException {
    FormKey fk = null;
    String additionalComponent = null;
    try {
        final FormSelectionMaintenanceOutRowDto rowDto = (FormSelectionMaintenanceOutRowDto) selectedRow.get("object");
        additionalComponent = rowDto.getAdditionalDataComponent();
        Component comp = (Component) run(additionalComponent);
        BeanUtils.setProperty(comp, getKey1(), getValue1());
        if (getKey2() != null) {
            BeanUtils.setProperty(comp, getKey2(), getValue2());
        }
        if (getKey3() != null) {
            BeanUtils.setProperty(comp, getKey3(), getValue3());
        }
        if (getKey4() != null) {
            BeanUtils.setProperty(comp, getKey4(), getValue4());
        }
        if (getKey5() != null) {
            BeanUtils.setProperty(comp, getKey5(), getValue5());
        }
        if (getKey6() != null) {
            BeanUtils.setProperty(comp, getKey6(), getValue6());
        }
        // implements IAdditionalDataObject.
        if (comp instanceof IAdditionalDataObject) {
            ((IAdditionalDataObject) comp).setAdditionalDataObject(rowDto.getAdditionalDataObject());
            ((IUpdateComponent) comp).addUpdateListener(new IUpdateListener() {

                public void updateDone(EventObject source) {
                    try {
                        rowDto.setAdditionalDataObject(((IAdditionalDataObject) source.getSource()).getAdditionalDataObject());
                    } catch (Exception e) {
                        log.warn("Error setting the Additional Data Object after the Update", e);
                    }
                }
            });
        }
        comp.setReturnToFormKey(getResultsFormKey());
        // Populate info to allow Web 2.0 component to return to this component
        if (comp instanceof RiaWrapperComponent) {
            RiaWrapperComponent c = (RiaWrapperComponent) comp;
            c.getParameters().setProperty("returnToActionPath", actionPath);
            c.getParameters().setProperty("returnToFormKey_componentId", comp.getReturnToFormKey().getComponentId());
        }
        fk = comp.display();
    } catch (SecurityException se) {
        log.error("SecurityException Occurred ", se);
        throw new ApplicationExceptions(new FormSelectionException(FormSelectionException.SECURITY_EXCEPTION));
    } catch (IllegalAccessException e) {
        log.error("IllegalAccessException Occurred ", e);
    } catch (InvocationTargetException e) {
        log.error("InvocationTargetException Occurred ", e);
    } catch (IllegalArgumentException e) {
        log.error("IllegalArgumentException Occurred ", e);
    } catch (ApplicationExceptions applicationException) {
        throw applicationException;
    } catch (FrameworkException frameworkException) {
        throw frameworkException;
    }
    return fk;
}
Also used : FormSelectionException(org.jaffa.modules.printing.components.formselectionmaintenance.FormSelectionException) ApplicationExceptions(org.jaffa.exceptions.ApplicationExceptions) FrameworkException(org.jaffa.exceptions.FrameworkException) IAdditionalDataObject(org.jaffa.modules.printing.components.formselectionmaintenance.IAdditionalDataObject) RiaWrapperComponent(org.jaffa.presentation.portlet.component.RiaWrapperComponent) FormKey(org.jaffa.presentation.portlet.FormKey) FrameworkException(org.jaffa.exceptions.FrameworkException) FormSelectionException(org.jaffa.modules.printing.components.formselectionmaintenance.FormSelectionException) ApplicationException(org.jaffa.exceptions.ApplicationException) InvocationTargetException(java.lang.reflect.InvocationTargetException) MandatoryFieldException(org.jaffa.datatypes.exceptions.MandatoryFieldException) InvocationTargetException(java.lang.reflect.InvocationTargetException) FormSelectionMaintenanceOutRowDto(org.jaffa.modules.printing.components.formselectionmaintenance.dto.FormSelectionMaintenanceOutRowDto) Component(org.jaffa.presentation.portlet.component.Component) RiaWrapperComponent(org.jaffa.presentation.portlet.component.RiaWrapperComponent)

Aggregations

RiaWrapperComponent (org.jaffa.presentation.portlet.component.RiaWrapperComponent)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 MandatoryFieldException (org.jaffa.datatypes.exceptions.MandatoryFieldException)1 ApplicationException (org.jaffa.exceptions.ApplicationException)1 ApplicationExceptions (org.jaffa.exceptions.ApplicationExceptions)1 FrameworkException (org.jaffa.exceptions.FrameworkException)1 FormSelectionException (org.jaffa.modules.printing.components.formselectionmaintenance.FormSelectionException)1 IAdditionalDataObject (org.jaffa.modules.printing.components.formselectionmaintenance.IAdditionalDataObject)1 FormSelectionMaintenanceOutRowDto (org.jaffa.modules.printing.components.formselectionmaintenance.dto.FormSelectionMaintenanceOutRowDto)1 FormKey (org.jaffa.presentation.portlet.FormKey)1 Component (org.jaffa.presentation.portlet.component.Component)1