Package org.zkoss.zk.ui.metainfo

Examples of org.zkoss.zk.ui.metainfo.PageDefinition


    if (uri == null || uri.length() == 0)
      throw new IllegalArgumentException("uri not specified: "+uri);

    //Note: we have to go thru UiFactory (so user can override it)
    uri = toAbsoluteURI(uri, false);
    final PageDefinition pagedef = ((WebAppCtrl)getDesktop().getWebApp()).
      getUiFactory().getPageDefinition(newRequestInfo(uri), uri);
    if (pagedef == null)
      throw new UiException("Page not found: "+uri);
    return pagedef;
  }
View Full Code Here


  }
  public void service(HttpServletRequest request,
  HttpServletResponse response, String path)
  throws ServletException, IOException {
    final Session sess = WebManager.getSession(getServletContext(), request);
    final PageDefinition pagedef = (PageDefinition)_cache.get(path);
    if (pagedef == null) {
      //FUTURE: support the error page (from Configuration)
      handleError(sess, request, response, path, null);
      return;
    }
View Full Code Here

          final Execution exec = new ExecutionImpl(
            _ctx, request, response, desktop, page);
          wappc.getUiEngine().execNewPage(exec, richlet, page, out);
            //no need to set device type here, since UiEngine will do it later
        } else {
          final PageDefinition pagedef = uf.getPageDefinition(ri, path);
          if (pagedef == null)
            return false; //not found

          final Page page = WebManager.newPage(uf, ri, pagedef, response, path);
          final Execution exec = new ExecutionImpl(
View Full Code Here

      final RequestInfo ri = new RequestInfoImpl(
        wapp, sess, desktop, request, null);
      ((SessionCtrl)sess).notifyClientRequest(true);
      final UiFactory uf = wappc.getUiFactory();
      final PageDefinition pagedef =
        uf.getPageDefinitionDirectly(ri, content, _ext);

      final Page page = WebManager.newPage(uf, ri, pagedef, response, path);
      final Execution exec =
        new ExecutionImpl(_ctx, request, response, desktop, page);
View Full Code Here

   * if not found.
   */
  private static ComponentDefinition getDefinition(Execution exec, Class cls) {
    if (exec != null) {
      final ExecutionCtrl execCtrl = (ExecutionCtrl)exec;
      final PageDefinition pgdef = execCtrl.getCurrentPageDefinition();
      final Page page = execCtrl.getCurrentPage();

      final ComponentDefinition compdef =
        pgdef != null ? pgdef.getComponentDefinition(cls, true):
        page != null ?   page.getComponentDefinition(cls, true): null;
      if (compdef != null && compdef.getLanguageDefinition() != null)
        return compdef; //already from langdef (not from pgdef)

      final ComponentDefinition compdef2 =
View Full Code Here

  }
  public void setDefinition(String name) {
    final Execution exec = Executions.getCurrent();
    if (exec != null) {
      final ExecutionCtrl execCtrl = (ExecutionCtrl)exec;
      final PageDefinition pgdef = execCtrl.getCurrentPageDefinition();
      final Page page = execCtrl.getCurrentPage();

      ComponentDefinition compdef =
        pgdef != null ? pgdef.getComponentDefinition(name, true):
        page != null ?   page.getComponentDefinition(name, true): null;
      if (compdef == null)
        compdef = getDefinitionByDeviceType(exec.getDesktop().getDeviceType(), name);
      if (compdef != null) {
        setDefinition(compdef);
View Full Code Here

            new ExecutionImpl(svlctx, httpreq, httpres, desktop, page);
          fixContentType(response);
          wappc.getUiEngine().execNewPage(exec, richlet, page,
            out != null ? out: response.getWriter());
        } else if (path != null) {
          final PageDefinition pagedef = uf.getPageDefinition(ri, path);
          if (pagedef == null)
            return false; //not found

          page = WebManager.newPage(uf, ri, pagedef, httpres, path);
          final Execution exec =
View Full Code Here

  public static final String DESKTOP_REUSE = "zkoss.spring.DESKTOP_REUSE";
  public static final String DESKTOP_URL = "zkoss.spring.DESKTOP_URL";
  private static final String BINDING_COMPOSER = "${"+ZkBeanIds.ZK_BINDING_COMPOSER+"}";

  public PageDefinition getPageDefinition(RequestInfo ri, String path) {
    PageDefinition pd = super.getPageDefinition(ri, path);
    //bug 2684322: Nullpoint when accese to a nonexist page
    if (pd != null) {
      final ServletRequest request = (ServletRequest) ri.getNativeRequest();
      //bug 2885793: ServletRequest is null for <?import?> page
      if (request != null) {
View Full Code Here

  /**
   * @since 1.2
   */
  public PageDefinition getPageDefinitionDirectly(
  RequestInfo ri, String content, String extension) {
    PageDefinition pd = super.getPageDefinitionDirectly(ri, content, extension);
    //bug 2684322: Nullpoint when accese to a nonexist page
    if (pd != null) {
//      applyZkSpringDelegatingVariableResolver(pd);
//      applyZkSpringBeanBindingComposer(pd);
    }
View Full Code Here

  /**
   * @since 1.2
   */
  public PageDefinition getPageDefinitionDirectly(
  RequestInfo ri, Document content, String extension) {
    PageDefinition pd = super.getPageDefinitionDirectly(ri, content, extension);
    //bug 2684322: Nullpoint when accese to a nonexist page
    if (pd != null) {
//      applyZkSpringDelegatingVariableResolver(pd);
//      applyZkSpringBeanBindingComposer(pd);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.metainfo.PageDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.