public void doInit(Page page, Map args) throws Exception { final String zslang = page.getZScriptLanguage(); final URL url = Jsps.getPageContext( getJspContext()).getServletContext().getResource(_zscript); if (url == null) throw new UiException("File not found: "+_zscript); ZScript zs = new ZScript(null, zslang, url, null); RootTag.processZScript(page, null, zs); } public void doAfterCompose(Page page) throws Exception {}
/** Constructs a page with another page as instance * @since 6.0.0 */ public PageImpl(Page ref) { this(ref.getLanguageDefinition(), ref.getComponentDefinitionMap(), ref.getRequestPath(), ref.getZScriptLanguage()); }
/** * A useful method use to invoke zscript. * @param page page instance. * @param parent The owner of zscript segment. * @param zs A ZScript object. * @throws IOException */ public static void processZScript(Page page, Component parent, ZScript zs) throws IOException { if (zs.getLanguage() == null) zs.setLanguage(page.getZScriptLanguage()); if (zs.isDeferred()) ((PageCtrl)page).addDeferredZScript(parent, zs); else ZkProxy.getProxy().interpret(page, parent, zs); }