|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.action.ActionForm
org.kuali.rice.kns.web.struts.pojo.PojoFormBase
org.kuali.rice.kns.web.struts.form.KualiForm
org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase
org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase
org.kuali.kfs.sys.document.web.struts.FinancialSystemTransactionalDocumentFormBase
org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase
org.kuali.kfs.fp.document.web.struts.VoucherForm
org.kuali.kfs.fp.document.web.struts.JournalVoucherForm
public class JournalVoucherForm
This class is the Struts specific form object that works in conjunction with the pojo utilities to build the UI for the Journal Voucher Document. This class is unique in that it leverages a helper data structure called the VoucherAccountingLineHelper because the Journal Voucher, under certain conditions, presents the user with a debit and credit column for amount entry. In addition, this form class must keep track of the changes between the old and new balance type selection so that the corresponding action class and make decisions based upon the differences. New accounting lines use specific credit and debit amount fields b/c the new line is explicitly known; however, already existing accounting lines need to exist within a list with ordering that matches the accounting lines source list.
Field Summary | |
---|---|
protected List |
balanceTypes
|
protected String |
originalBalanceType
|
protected BalanceType |
selectedBalanceType
|
Fields inherited from class org.kuali.kfs.fp.document.web.struts.VoucherForm |
---|
accountingPeriods, newSourceLineCredit, newSourceLineDebit, selectedAccountingPeriod, voucherLineHelpers |
Fields inherited from class org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase |
---|
editableAccounts, forcedLookupOptionalFields, hideDetails, LOG, newSourceLine, newTargetLine, sourceFile, targetFile |
Fields inherited from class org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase |
---|
forcedReadOnlyFields |
Fields inherited from class org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase |
---|
adHocActionRequestCodes, attachmentFile, documentActions, editingMode, suppressAllButtons |
Fields inherited from class org.kuali.rice.kns.web.struts.form.KualiForm |
---|
extraButtons |
Fields inherited from class org.kuali.rice.kns.web.struts.pojo.PojoFormBase |
---|
requiredNonEditableProperties |
Fields inherited from class org.apache.struts.action.ActionForm |
---|
multipartRequestHandler, servlet |
Constructor Summary | |
---|---|
JournalVoucherForm()
Constructs a JournalVoucherForm instance. |
Method Summary | |
---|---|
List |
getBalanceTypes()
This method retrieves the list of valid balance types to display. |
protected String |
getDefaultDocumentTypeName()
|
JournalVoucherDocument |
getJournalVoucherDocument()
This method returns the journal voucher document associated with this form. |
String |
getOriginalBalanceType()
This method retrieves the originalBalanceType attribute. |
protected BalanceType |
getPopulatedBalanceTypeInstance(String balanceTypeCode)
This method will fully populate a balance type given the passed in code, by calling the business object service that retrieves the rest of the instances' information. |
BalanceType |
getSelectedBalanceType()
This method sets the selected balance type. |
protected boolean |
isSelectedBalanceTypeFinancialOffsetGenerationIndicator()
This is a convenience helper method that is used several times throughout this action class to determine if the selected balance type contained within the form instance is a financial offset generation balance type or not. |
void |
populate(javax.servlet.http.HttpServletRequest request)
Overrides the parent to call super.populate and then to call the two methods that are specific to loading the two select lists on the page. |
protected void |
populateBalanceTypeListForRendering()
This method retrieves all of the balance types in the system and prepares them to be rendered in a dropdown UI component. |
protected void |
populateCreditAndDebitAmounts()
If the balance type is an offset generation balance type, then the user is able to enter the amount as either a debit or a credit, otherwise, they only need to deal with the amount field in this case we always need to update the underlying bo so that the debit/credit code along with the amount, is properly set. |
void |
populateSourceAccountingLine(SourceAccountingLine sourceLine,
String accountingLinePropertyName,
Map parameterMap)
Override the parent, to push the chosen accounting period and balance type down into the source accounting line object. |
protected void |
populateSourceAccountingLineEncumbranceCode(SourceAccountingLine sourceLine)
Sets the encumbrance code of the line based on the balance type. |
void |
setBalanceTypes(List balanceTypes)
This method sets the list of valid balance types to display. |
void |
setJournalVoucherDocument(JournalVoucherDocument journalVoucherDocument)
This method sets the journal voucher document associated with this form. |
void |
setOriginalBalanceType(String changedBalanceType)
This method sets the originalBalanceType attribute. |
void |
setSelectedBalanceType(BalanceType selectedBalanceType)
This method retrieves the selected balance type. |
Methods inherited from class org.kuali.kfs.sys.document.web.struts.FinancialSystemTransactionalDocumentFormBase |
---|
extendDocInfoToThreeColumns, generateErrorCorrectionButton, getExtraButtons, populateHeaderFields |
Methods inherited from class org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase |
---|
discoverDocumentTypeName, formatReversalDate, getForcedReadOnlyFields, getTransactionalDocument, instantiateTransactionalDocumentByDocumentTypeName, populateEmptyMultiSelect, populateFalseCheckboxes, populationSpecialEmptyFields, setForcedReadOnlyFields |
Methods inherited from class org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase |
---|
addRequiredNonEditableProperties, buildHtmlLink, getAdditionalScriptFile, getAdditionalScriptFiles, getAdHocActionRequestCodes, getAdHocRoutePerson, getAdHocRoutePersons, getAdHocRouteWorkgroup, getAdHocRouteWorkgroups, getAnnotation, getAttachmentFile, getBoNotes, getCommand, getDocId, getDocNum, getDocTypeName, getDocument, getDocumentActions, getDocumentHandlerUrl, getEditingMode, getErrorMapFromPreviousRequest, getFormKey, getInitiator, getInitiatorNetworkId, getMessageMapFromPreviousRequest, getNewAdHocRoutePerson, getNewAdHocRouteWorkgroup, getNewNote, getPersonInquiryUrlLink, getStandardHeaderFields, getWorkflowDocument, hasDocumentId, initializeHeaderNavigationTabs, instantiateDocument, isDocumentEnRoute, isFormDocumentInitialized, isHasWorkflowDocument, isReturnToActionList, isSuppressAllButtons, isUserDocumentInitiator, reset, setAdditionalScriptFile, setAdditionalScriptFiles, setAdHocActionRequestCodes, setAdHocRoutePersons, setAdHocRouteWorkgroups, setAnnotation, setAttachmentFile, setBoNotes, setCommand, setDerivedValuesOnForm, setDocId, setDocNum, setDocTypeName, setDocument, setDocumentActions, setEditingMode, setErrorMapFromPreviousRequest, setFormKey, setMessageMapFromPreviousRequest, setNewAdHocRoutePerson, setNewAdHocRouteWorkgroup, setNewNote, setReturnToActionList, setSuppressAllButtons, shouldPropertyBePopulatedInForm, validate |
Methods inherited from class org.kuali.rice.kns.web.struts.form.KualiForm |
---|
clearEditablePropertyInformation, getActionFormUtilMap, getAnchor, getBackLocation, getCurrentTabIndex, getDisplayedErrors, getDisplayedInfo, getDisplayedWarnings, getDocInfo, getExtraButton, getFieldNameToFocusOnAfterSubmit, getHeaderNavigationTabs, getMethodToCall, getNavigationCss, getNextArbitrarilyHighIndex, getNumColumns, getRefreshCaller, getTabState, getTabStates, incrementTabIndex, isFieldLevelHelpEnabled, populateBackLocation, populateFieldLevelHelpEnabled, reset, retrieveFormValueForLookupInquiryParameters, setActionFormUtilMap, setAnchor, setBackLocation, setCurrentTabIndex, setDocInfo, setExtraButton, setExtraButtons, setFieldLevelHelpEnabled, setFieldNameToFocusOnAfterSubmit, setHeaderNavigationTabs, setMethodToCall, setNavigationCss, setNumColumns, setRefreshCaller, setTabStates |
Methods inherited from class org.kuali.rice.kns.web.struts.pojo.PojoFormBase |
---|
addMaxUploadSize, cacheUnconvertedValue, copyPopulateEditablePropertiesToActionEditableProperties, formatterClassForKeypath, formatValue, getActionEditablePropertiesGuid, getEditableProperties, getFormatter, getFormatterTypes, getIsNewForm, getMaxUploadSizes, getMethodToCallsToBypassSessionRetrievalForGETRequests, getParameter, getParameterValues, getPopulateEditableProperties, getPopulateEditablePropertiesGuid, getPropertyType, getRequiredNonEditableProperties, getStrutsActionMappingScope, getUnconvertedValues, getUnknownKeys, initMaxUploadSizes, isPropertyEditable, isPropertyNonEditableButRequired, populateForProperty, postprocessRequestParameters, processValidationFail, registerEditableProperty, registerIsNewForm, registerRequiredNonEditableProperty, registerStrutsActionMappingScope, setActionEditablePropertiesGuid, setFormatterType, setFormatterTypes, setPopulateEditablePropertiesGuid, setUnconvertedValues |
Methods inherited from class org.apache.struts.action.ActionForm |
---|
getMultipartRequestHandler, getServlet, getServletWrapper, setMultipartRequestHandler, setServlet, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List balanceTypes
protected String originalBalanceType
protected BalanceType selectedBalanceType
Constructor Detail |
---|
public JournalVoucherForm()
Method Detail |
---|
protected String getDefaultDocumentTypeName()
getDefaultDocumentTypeName
in class org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase
public void populate(javax.servlet.http.HttpServletRequest request)
populate
in interface org.kuali.rice.kns.web.struts.pojo.PojoForm
populate
in class VoucherForm
PojoForm.populate(javax.servlet.http.HttpServletRequest)
public void populateSourceAccountingLine(SourceAccountingLine sourceLine, String accountingLinePropertyName, Map parameterMap)
populateSourceAccountingLine
in class VoucherForm
accountingLinePropertyName
- the property path from the form to the accounting lineparameterMap
- the map of parameters that were sent in with the requestorg.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase#populateSourceAccountingLine(org.kuali.rice.kns.bo.SourceAccountingLine)
protected void populateSourceAccountingLineEncumbranceCode(SourceAccountingLine sourceLine)
sourceLine
- - line to set code onpublic List getBalanceTypes()
public BalanceType getSelectedBalanceType()
public void setSelectedBalanceType(BalanceType selectedBalanceType)
selectedBalanceType
- public void setBalanceTypes(List balanceTypes)
balanceTypes
- public JournalVoucherDocument getJournalVoucherDocument()
public void setJournalVoucherDocument(JournalVoucherDocument journalVoucherDocument)
journalVoucherDocument
- The journalVoucherDocument to set.public String getOriginalBalanceType()
public void setOriginalBalanceType(String changedBalanceType)
changedBalanceType
- protected void populateBalanceTypeListForRendering()
protected BalanceType getPopulatedBalanceTypeInstance(String balanceTypeCode)
balanceTypeCode
-
protected void populateCreditAndDebitAmounts()
populateCreditAndDebitAmounts
in class VoucherForm
protected boolean isSelectedBalanceTypeFinancialOffsetGenerationIndicator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |