use of org.jaffa.exceptions.ApplicationExceptions in project jaffa-framework by jaffa-projects.
the class FormDefinitionMaintenanceComponent method initDropDownCodes.
// .//GEN-END:_doPrevalidateUpdate_3_be
// .//GEN-BEGIN:_initDropDownCodes_1_be
/**
* This will retrieve the set of codes for dropdowns, if any are required
*/
protected void initDropDownCodes() throws ApplicationExceptions, FrameworkException {
ApplicationExceptions appExps = null;
CodeHelperInDto input = null;
}
use of org.jaffa.exceptions.ApplicationExceptions in project jaffa-framework by jaffa-projects.
the class FormDefinitionViewerComponent method doInquiry.
// .//GEN-END:_display_2_be
// .//GEN-BEGIN:_inquiry_1_be
private void doInquiry() throws ApplicationExceptions, FrameworkException {
FormDefinitionViewerInDto inputDto = new FormDefinitionViewerInDto();
// .//GEN-END:_inquiry_1_be
// Add custom code before building the input dto//GEN-FIRST:_inquiry_1
// .//GEN-LAST:_inquiry_1
// .//GEN-BEGIN:_inquiry_2_be
inputDto.setFormId(m_formId);
inputDto.setHeaderDto(createHeaderDto());
// create the Tx
if (m_tx == null)
m_tx = (IFormDefinitionViewer) Factory.createObject(IFormDefinitionViewer.class);
// .//GEN-END:_inquiry_2_be
// Add custom code before invoking the Tx//GEN-FIRST:_inquiry_2
// .//GEN-LAST:_inquiry_2
// .//GEN-BEGIN:_inquiry_3_be
// now get the details
m_outputDto = m_tx.read(inputDto);
// uncache the widgets
getUserSession().getWidgetCache(getComponentId()).clear();
// throw an exception if the output is null
if (m_outputDto == null) {
ApplicationExceptions appExps = new ApplicationExceptions();
appExps.add(new DomainObjectNotFoundException(FormDefinitionMeta.getLabelToken()));
throw appExps;
}
}
use of org.jaffa.exceptions.ApplicationExceptions in project jaffa-framework by jaffa-projects.
the class FormDefinitionViewerComponent method display.
// .//GEN-END:_FormDefinitionViewerOutDto_1_be
// .//GEN-BEGIN:_display_1_be
/**
* This retrieves the details for the FormDefinition.
* @throws ApplicationExceptions This will be thrown in case any invalid data has been set, or if no data has been set.
* @throws FrameworkException Indicates some system error.
* @return The FormKey for the View screen.
*/
public FormKey display() throws ApplicationExceptions, FrameworkException {
ApplicationExceptions appExps = null;
// .//GEN-BEGIN:_display_2_be
if (getFormId() == null) {
if (appExps == null)
appExps = new ApplicationExceptions();
appExps.add(new MandatoryFieldException(FormDefinitionMeta.META_FORM_ID.getLabelToken()));
}
if (appExps != null && appExps.size() > 0)
throw appExps;
doInquiry();
return getViewerFormKey();
}
use of org.jaffa.exceptions.ApplicationExceptions in project jaffa-framework by jaffa-projects.
the class BusinessEventLogViewerAction method do_RelatedAttachment_View_Clicked.
/**
* Invokes the viewAttachment() method on the component.
* @param rowNum The selected row on the Grid.
* @return The FormKey for the View screen of the Attachment object.
*/
public FormKey do_RelatedAttachment_View_Clicked(String rowNum) {
FormKey fk = null;
// .//GEN-END:do_RelatedAttachment_View_Clicked_1_be
// Add custom code before processing the action//GEN-FIRST:do_RelatedAttachment_View_Clicked_1
// .//GEN-LAST:do_RelatedAttachment_View_Clicked_1
// .//GEN-BEGIN:do_RelatedAttachment_View_Clicked_2_be
BusinessEventLogViewerForm myForm = (BusinessEventLogViewerForm) form;
BusinessEventLogViewerComponent myComp = (BusinessEventLogViewerComponent) myForm.getComponent();
GridModel model = (GridModel) myForm.getRelatedAttachmentWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null) {
try {
// .//GEN-END:do_RelatedAttachment_View_Clicked_2_be
// Add custom code before invoking the component//GEN-FIRST:do_RelatedAttachment_View_Clicked_2
// .//GEN-LAST:do_RelatedAttachment_View_Clicked_2
// .//GEN-BEGIN:do_RelatedAttachment_View_Clicked_3_be
fk = myComp.viewAttachment((java.lang.String) selectedRow.get("attachmentId"));
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Viewer Failed");
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, e);
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
}
// .//GEN-END:do_RelatedAttachment_View_Clicked_3_be
// Add custom code before returning//GEN-FIRST:do_RelatedAttachment_View_Clicked_3
// .//GEN-LAST:do_RelatedAttachment_View_Clicked_3
// .//GEN-BEGIN:do_RelatedAttachment_View_Clicked_4_be
// The Viewer will be rendered in a new window
// We don't want to see the existing HistoryNav in that window
// Hence, initialize the HistoryNav
HistoryNav.initializeHistoryNav(request);
// Direct User back to current form
if (fk == null)
fk = new FormKey(myForm.NAME, myComp.getComponentId());
return fk;
}
use of org.jaffa.exceptions.ApplicationExceptions in project jaffa-framework by jaffa-projects.
the class BusinessEventLogViewerComponent method doInquiry.
// .//GEN-END:_display_2_be
// .//GEN-BEGIN:_inquiry_1_be
private void doInquiry() throws ApplicationExceptions, FrameworkException {
BusinessEventLogViewerInDto inputDto = new BusinessEventLogViewerInDto();
// .//GEN-END:_inquiry_1_be
// Add custom code before building the input dto //GEN-FIRST:_inquiry_1
// .//GEN-LAST:_inquiry_1
// .//GEN-BEGIN:_inquiry_2_be
inputDto.setLogId(m_logId);
inputDto.setHeaderDto(createHeaderDto());
// create the Tx
if (m_tx == null)
m_tx = (IBusinessEventLogViewer) Factory.createObject(IBusinessEventLogViewer.class);
// .//GEN-END:_inquiry_2_be
// Add custom code before invoking the Tx //GEN-FIRST:_inquiry_2
// .//GEN-LAST:_inquiry_2
// .//GEN-BEGIN:_inquiry_3_be
// now get the details
m_outputDto = m_tx.read(inputDto);
// uncache the widgets
getUserSession().getWidgetCache(getComponentId()).clear();
// throw an exception if the output is null
if (m_outputDto == null) {
ApplicationExceptions appExps = new ApplicationExceptions();
appExps.add(new DomainObjectNotFoundException(BusinessEventLogMeta.getLabelToken()));
throw appExps;
}
}
Aggregations