本文整理汇总了Java中org.kuali.rice.krad.document.DocumentViewPresentationControllerBase类的典型用法代码示例。如果您正苦于以下问题:Java DocumentViewPresentationControllerBase类的具体用法?Java DocumentViewPresentationControllerBase怎么用?Java DocumentViewPresentationControllerBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DocumentViewPresentationControllerBase类属于org.kuali.rice.krad.document包,在下文中一共展示了DocumentViewPresentationControllerBase类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performInitialization
import org.kuali.rice.krad.document.DocumentViewPresentationControllerBase; //导入依赖的package包/类
/**
* The following initialization is performed:
*
* <ul>
* <li>Retrieve the document entry</li>
* <li>Set up the document view authorizer and presentation controller</li>
* </ul>
*
* @see org.kuali.rice.krad.uif.container.ContainerBase#performInitialization(org.kuali.rice.krad.uif.view.View,
* java.lang.Object)
*/
@Override
public void performInitialization(View view, Object model) {
super.performInitialization(view, model);
// get document entry
DocumentEntry documentEntry = getDocumentEntryForView();
pushObjectToContext(UifConstants.ContextVariableNames.DOCUMENT_ENTRY, documentEntry);
// setup authorizer and presentation controller using the configured authorizer and pc for document
if (getAuthorizer() == null) {
setAuthorizer(new DocumentViewAuthorizerBase());
}
if (getAuthorizer() instanceof DocumentViewAuthorizerBase) {
DocumentViewAuthorizerBase documentViewAuthorizerBase = (DocumentViewAuthorizerBase) getAuthorizer();
if (documentViewAuthorizerBase.getDocumentAuthorizer() == null) {
documentViewAuthorizerBase.setDocumentAuthorizerClass(documentEntry.getDocumentAuthorizerClass());
}
}
if (getPresentationController() == null) {
setPresentationController(new DocumentViewPresentationControllerBase());
}
if (getPresentationController() instanceof DocumentViewPresentationControllerBase) {
DocumentViewPresentationControllerBase documentViewPresentationControllerBase =
(DocumentViewPresentationControllerBase) getPresentationController();
if (documentViewPresentationControllerBase.getDocumentPresentationController() == null) {
documentViewPresentationControllerBase.setDocumentPresentationControllerClass(
documentEntry.getDocumentPresentationControllerClass());
}
}
getObjectPathToConcreteClassMapping().put(getDefaultBindingObjectPath(), getDocumentClass());
}
示例2: performInitialization
import org.kuali.rice.krad.document.DocumentViewPresentationControllerBase; //导入依赖的package包/类
/**
* The following initialization is performed:
*
* <ul>
* <li>Retrieve the document entry</li>
* <li>Makes sure that the header is set.</li>
* <li>Set up the document view authorizer and presentation controller</li>
* </ul>
*
* {@inheritDoc}
*/
@Override
public void performInitialization(Object model) {
super.performInitialization(model);
// get document entry
DocumentEntry documentEntry = getDocumentEntryForView();
pushObjectToContext(UifConstants.ContextVariableNames.DOCUMENT_ENTRY, documentEntry);
// default document type on the header
String documentTypeName = documentEntry.getDocumentTypeName();
DocumentType documentType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(documentTypeName);
if (getHeader() != null && StringUtils.isBlank(getHeaderText())) {
setHeaderText(documentType.getLabel());
}
// setup authorizer and presentation controller using the configured authorizer and pc for document
if (getAuthorizer() == null) {
setAuthorizer(new DocumentViewAuthorizerBase());
}
if (getAuthorizer() instanceof DocumentViewAuthorizerBase) {
DocumentViewAuthorizerBase documentViewAuthorizerBase = (DocumentViewAuthorizerBase) getAuthorizer();
if (documentViewAuthorizerBase.getDocumentAuthorizer() == null) {
documentViewAuthorizerBase.setDocumentAuthorizerClass(documentEntry.getDocumentAuthorizerClass());
}
}
if (getPresentationController() == null) {
setPresentationController(new DocumentViewPresentationControllerBase());
}
if (getPresentationController() instanceof DocumentViewPresentationControllerBase) {
DocumentViewPresentationControllerBase documentViewPresentationControllerBase =
(DocumentViewPresentationControllerBase) getPresentationController();
if (documentViewPresentationControllerBase.getDocumentPresentationController() == null) {
documentViewPresentationControllerBase.setDocumentPresentationControllerClass(
documentEntry.getDocumentPresentationControllerClass());
}
}
getObjectPathToConcreteClassMapping().put(getDefaultBindingObjectPath(), getDocumentClass());
}