当前位置: 首页>>代码示例>>Java>>正文


Java KRADServiceLocatorWeb.getViewService方法代码示例

本文整理汇总了Java中org.kuali.rice.krad.service.KRADServiceLocatorWeb.getViewService方法的典型用法代码示例。如果您正苦于以下问题:Java KRADServiceLocatorWeb.getViewService方法的具体用法?Java KRADServiceLocatorWeb.getViewService怎么用?Java KRADServiceLocatorWeb.getViewService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krad.service.KRADServiceLocatorWeb的用法示例。


在下文中一共展示了KRADServiceLocatorWeb.getViewService方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testFormView

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
private UifFormBase testFormView(UifFormBase form, String viewName) throws Throwable {
    ViewService viewService = KRADServiceLocatorWeb.getViewService();
    View view = viewService.getViewById(viewName);
    form.setView(view);
    assertEquals(UifConstants.ViewStatus.CREATED, view.getViewStatus());

    MockHttpServletRequest request = new MockHttpServletRequest();
    request.setParameter(UifParameters.VIEW_ID, viewName);
    new UifServletRequestDataBinder(form).bind(request);

    ModelAndView modelAndView = new ModelAndView();
    modelAndView.addObject(UifConstants.DEFAULT_MODEL_NAME, form);

    KRADServiceLocatorWeb.getModelAndViewService().prepareView(request, modelAndView);

    view = form.getView();
    assertEquals(UifConstants.ViewStatus.FINAL, view.getViewStatus());

    return form;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:ViewLifecycleTest.java

示例2: testMutability

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void testMutability() throws Throwable {
    ViewService viewService = KRADServiceLocatorWeb.getViewService();
    View view = viewService.getViewById("DummyLoginView");

    Group group = ComponentFactory.getGroupWithDisclosureGridLayout();
    group.setId("foo");
    group.setHeaderText("bar");
    group.setItems(new ArrayList<Component>());

    ((List<Group>) view.getItems()).add(group);
    assertSame(group, view.getItems().get(view.getItems().size() - 1));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:ViewLifecycleTest.java

示例3: testInitializationPhase

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
@Test
public void testInitializationPhase() throws Throwable {
    ViewService viewService = KRADServiceLocatorWeb.getViewService();
    final View view = viewService.getViewById("TestPagedView");
    final UifFormBase form = new UifFormBase();

    ViewLifecycle.encapsulateLifecycle(view, form, null, new Runnable() {
        @Override
        public void run() {
            View currentView = ViewLifecycle.getView();

            assertSame(view, currentView);
            assertEquals("TestPagedView", currentView.getId());

            ProcessLogger.trace("begin-init");
            ViewLifecycle.getHelper().populateViewFromRequestParameters(Collections.<String, String> emptyMap());

            ProcessLogger.trace("populate-request");
            form.setViewRequestParameters(currentView.getViewRequestParameters());

            ViewLifecycle.getHelper().performCustomViewInitialization(form);

            ViewLifecyclePhase phase = KRADServiceLocatorWeb.getViewLifecyclePhaseBuilder().buildPhase(
                    UifConstants.ViewPhases.INITIALIZE, view, null, "", null);
            ViewLifecycle.getProcessor().performPhase(phase);

            ProcessLogger.trace("end-init");
        }
    });
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:31,代码来源:ViewLifecycleTest.java

示例4: getViewService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected ViewService getViewService() {
    return KRADServiceLocatorWeb.getViewService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:UifHandlerExceptionResolver.java

示例5: getViewService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
public ViewService getViewService() {
    return KRADServiceLocatorWeb.getViewService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:UifServletRequestDataBinder.java

示例6: getViewService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected static ViewService getViewService() {
    return KRADServiceLocatorWeb.getViewService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:UifSessionTimeoutFilter.java

示例7: getViewService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
/**
 * Instance of the {@code ViewService} that can be used to retrieve
 * {@code View} instances
 *
 * @return ViewService implementation
 */
protected ViewService getViewService() {
    return KRADServiceLocatorWeb.getViewService();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:UifFormBase.java


注:本文中的org.kuali.rice.krad.service.KRADServiceLocatorWeb.getViewService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。