本文整理匯總了Java中org.kuali.rice.krad.web.form.InitiatedDocumentInfoForm類的典型用法代碼示例。如果您正苦於以下問題:Java InitiatedDocumentInfoForm類的具體用法?Java InitiatedDocumentInfoForm怎麽用?Java InitiatedDocumentInfoForm使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
InitiatedDocumentInfoForm類屬於org.kuali.rice.krad.web.form包,在下文中一共展示了InitiatedDocumentInfoForm類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: start
import org.kuali.rice.krad.web.form.InitiatedDocumentInfoForm; //導入依賴的package包/類
@Override
@RequestMapping(method = RequestMethod.GET, params = "methodToCall=start")
public ModelAndView start(@ModelAttribute("KualiForm")UifFormBase form, BindingResult result,
HttpServletRequest request, HttpServletResponse response) {
InitiatedDocumentInfoForm initiatedDocumentInfoForm = (InitiatedDocumentInfoForm) form;
return super.start(form, result, request, response);
}
示例2: createInitialForm
import org.kuali.rice.krad.web.form.InitiatedDocumentInfoForm; //導入依賴的package包/類
@Override
public InitiatedDocumentInfoForm createInitialForm() {
return new InitiatedDocumentInfoForm();
}
示例3: docHandler
import org.kuali.rice.krad.web.form.InitiatedDocumentInfoForm; //導入依賴的package包/類
/**
* After the document is loaded calls method to setup the maintenance object
*/
@Override
@RequestMapping(params = "methodToCall=docHandler")
public ModelAndView docHandler(@ModelAttribute("KualiForm") DocumentFormBase formBase, BindingResult result,
HttpServletRequest request, HttpServletResponse response) throws Exception {
// TODO getting double view if we call base, not sure how to handle
// so pasting in superclass code
// super.docHandler(formBase, request, response);
// * begin copy/paste from the base
MaintenanceDocumentForm form = (MaintenanceDocumentForm) formBase;
// in all of the following cases we want to load the document
if (ArrayUtils.contains(DOCUMENT_LOAD_COMMANDS, form.getCommand()) && form.getDocId() != null) {
try {
loadDocument(form);
} catch (UnknownDocumentIdException udie) {
ConfigurationService kualiConfigurationService = CoreApiServiceLocator.getKualiConfigurationService();
StringBuffer sb = new StringBuffer();
sb.append(kualiConfigurationService.getPropertyValueAsString(KRADConstants.KRAD_URL_KEY));
sb.append(kualiConfigurationService.getPropertyValueAsString(KRADConstants.KRAD_INITIATED_DOCUMENT_URL_KEY));
Properties props = new Properties();
props.put(UifParameters.METHOD_TO_CALL, UifConstants.MethodToCallNames.START);
GlobalVariables.getUifFormManager().removeSessionForm(form); // removeForm(form);
return performRedirect(new InitiatedDocumentInfoForm(), sb.toString(), props);
}
} else if (KewApiConstants.INITIATE_COMMAND.equals(form.getCommand())) {
createDocument(form);
} else {
LOG.error("docHandler called with invalid parameters");
throw new IllegalArgumentException("docHandler called with invalid parameters");
}
// * end copy/paste from the base
if (KewApiConstants.ACTIONLIST_COMMAND.equals(form.getCommand()) ||
KewApiConstants.DOCSEARCH_COMMAND.equals(form.getCommand()) ||
KewApiConstants.SUPERUSER_COMMAND.equals(form.getCommand()) ||
KewApiConstants.HELPDESK_ACTIONLIST_COMMAND.equals(form.getCommand()) && form.getDocId() != null) {
// TODO: set state in view
// form.setReadOnly(true);
form.setMaintenanceAction((form.getDocument()).getNewMaintainableObject().getMaintenanceAction());
// Retrieving the FileName from BO table
Maintainable tmpMaintainable = form.getDocument().getNewMaintainableObject();
if (tmpMaintainable.getDataObject() instanceof PersistableAttachment) {
PersistableAttachment bo = (PersistableAttachment) getBusinessObjectService()
.retrieve((PersistableBusinessObject) tmpMaintainable.getDataObject());
if (bo != null) {
request.setAttribute("fileName", bo.getFileName());
}
}
} else if (KewApiConstants.INITIATE_COMMAND.equals(form.getCommand())) {
// form.setReadOnly(false);
setupMaintenance(form, request, KRADConstants.MAINTENANCE_NEW_ACTION);
} else {
LOG.error("We should never have gotten to here");
throw new IllegalArgumentException("docHandler called with invalid parameters");
}
return getUIFModelAndView(form);
}
示例4: createInitialForm
import org.kuali.rice.krad.web.form.InitiatedDocumentInfoForm; //導入依賴的package包/類
@Override
public InitiatedDocumentInfoForm createInitialForm(HttpServletRequest request) {
InitiatedDocumentInfoForm initiatedDocumentInfoForm = new InitiatedDocumentInfoForm();
return initiatedDocumentInfoForm;
}