@Override public UIViewRoot createView(FacesContext ctx, String viewId) { UIViewRoot viewRoot = new UIViewRoot(); viewRoot.setViewId(viewId); //TODO: set locale? return viewRoot; }
@Override public UIViewRoot createView(FacesContext ctx, String viewId) { UIViewRoot viewRoot = new UIViewRoot(); viewRoot.setViewId(viewId); //TODO: set locale? return viewRoot; }
context.renderResponse(); ViewHandler handler = context.getApplication().getViewHandler(); String viewId = context.getViewRoot().getViewId(); UIViewRoot root = handler.createView(context, viewId); root.setViewId(viewId); context.setViewRoot(root);
public void navigate(FacesContext context) { if (navigateTo != null && handler != null) { context.getViewRoot().setViewId(fromViewId); handler.handleNavigation(context, navigateFrom, navigateTo); } } }
public void processDrop(DropEvent event) { //process event (not relevant code) FacesContext context = FacesContext.getCurrentInstance(); String viewId = context.getViewRoot().getViewId(); ViewHandler handler = context.getApplication().getViewHandler(); UIViewRoot root = handler.createView(context, viewId); root.setViewId(viewId); context.setViewRoot(root); }
FacesContext context = FacesContext.getCurrentInstance(); String viewId = context.getViewRoot().getViewId(); ViewHandler handler = context.getApplication().getViewHandler(); UIViewRoot root = handler.createView(context, viewId); root.setViewId(viewId); context.setViewRoot(root);
protected void refreshPage() { FacesContext fc = FacesContext.getCurrentInstance(); String refreshpage = fc.getViewRoot().getViewId(); ViewHandler ViewH = fc.getApplication().getViewHandler(); UIViewRoot UIV = ViewH.createView(fc,refreshpage); UIV.setViewId(refreshpage); fc.setViewRoot(UIV); }
@Override public UIViewRoot getViewRoot() { if (viewRoot == null) { viewRoot = new UIViewRoot(); viewRoot.setLocale(Locale.getDefault()); viewRoot.setViewId(FACES_PREFIX + "xhtml"); } return viewRoot; }
@Override public UIViewRoot getViewRoot() { if (viewRoot == null) { viewRoot = new UIViewRoot(); viewRoot.setLocale(Locale.getDefault()); viewRoot.setViewId(FACES_PREFIX + "xhtml"); } return viewRoot; }
@Override public UIViewRoot getViewRoot() { if (viewRoot == null) { viewRoot = new UIViewRoot(); viewRoot.setLocale(Locale.getDefault()); viewRoot.setViewId(FACES_PREFIX + "xhtml"); } return viewRoot; }
public UIViewRoot getViewRoot() { if (viewRoot == null) { viewRoot = new UIViewRoot(); viewRoot.setLocale(Locale.getDefault()); viewRoot.setViewId(RIConstants.FACES_PREFIX + "xhtml"); } return viewRoot; }
@Override public UIViewRoot restoreView(FacesContext ctx, String viewId) { UIViewRoot viewRoot =viewHandler.restoreView(ctx, viewId); if (viewRoot != null) { viewRoot.setViewId(viewHandler.deriveViewId(ctx,viewId)); } return viewRoot; }
/** * This template method called from the {@link #setupFacesRequest()} to create components view tree in the virtual request. * The default implementation is only creates {@link UIViewRoot} instance for view ID "/test.xhtml". * @return */ protected UIViewRoot setupView() { UIViewRoot viewRoot = (UIViewRoot) application.createComponent(UIViewRoot.COMPONENT_TYPE); viewRoot.setViewId("/test.xhtml"); viewRoot.setLocale(Locale.getDefault()); viewRoot.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); return viewRoot; }
/** * This template method called from the {@link #setupFacesRequest()} to create components view tree in the virtual request. * The default implementation is only creates {@link UIViewRoot} instance for view ID "/test.xhtml". * @return */ protected UIViewRoot setupView() { UIViewRoot viewRoot = (UIViewRoot) application.createComponent(UIViewRoot.COMPONENT_TYPE); viewRoot.setViewId("/test.xhtml"); viewRoot.setLocale(Locale.getDefault()); viewRoot.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); return viewRoot; }
@Override public UIViewRoot createView(FacesContext context, String viewId) { UIViewRoot viewRoot = super.createView(context, viewId); if (PortletUtil.isPortletRequest(context)) { PortletRequest request = (PortletRequest) context.getExternalContext().getRequest(); viewRoot.setViewId(request.getParameter(MyFacesGenericPortlet.VIEW_ID)); } return viewRoot; }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
protected void initDefaultView() { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setLocale(getLocale()); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); this.facesContext.setViewRoot(root); }
protected void initDefaultView() { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setLocale(getLocale()); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }