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();
}
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();
}
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;
}
Aggregations