本文整理汇总了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;
}