Package cn.com.wapps.style

Examples of cn.com.wapps.style.ApplicationStyle


    @Override
    public void doTag() throws JspException {
        JspWriter out = getJspContext().getOut();

        try {
            ApplicationStyle style = (ApplicationStyle) ((PageContext) getJspContext()).getAttribute("_style", PageContext.APPLICATION_SCOPE);
            out.println(style.getTemplate(TasksTemplate.class).content());
        } catch (AppException ex) {
            Logger.getLogger(TasksNavigationTag.class.getName()).log(Level.SEVERE, null, ex);
        } catch (java.io.IOException ex) {
            throw new JspException("Error in TasksNavigationTag tag", ex);
        }
View Full Code Here


    @Override
    public void doTag() throws JspException {
        JspWriter out = getJspContext().getOut();

        try {
            ApplicationStyle style = (ApplicationStyle) ((PageContext) getJspContext()).getAttribute("_style", PageContext.APPLICATION_SCOPE);
            out.println(style.getTemplate(MenuTemplate.class).content());


        } catch (AppException ex) {
            Logger.getLogger(MenuTag.class.getName()).log(Level.SEVERE, null, ex);
        } catch (java.io.IOException ex) {
View Full Code Here

     * @param pageContext
     * @return
     */
    protected ApplicationStyle settingAppStyle(PageContext pageContext) {
        String styleName = null;
        ApplicationStyle style = (ApplicationStyle) pageContext.getAttribute(_STYLE_ID, PageContext.APPLICATION_SCOPE);
        if (style == null) {
            // TODO 是否采用配置
            style = ApplicationStyle.WMS;
            pageContext.setAttribute(_STYLE_ID, style, PageContext.APPLICATION_SCOPE);
        } else {
            styleName = (String) pageContext.getAttribute(_PAGE_STYLE_ID, PageContext.REQUEST_SCOPE);
            if (styleName != null) {
                style = ApplicationStyle.valueOf(styleName);
                pageContext.setAttribute(_STYLE_ID, style, PageContext.APPLICATION_SCOPE);
            }
        }
        ApplicationStyle.setCurrentStyle(style);
        pageContext.setAttribute(_PAGE_STYLE_ID, style.name(), PageContext.APPLICATION_SCOPE);
        return style;
    }
View Full Code Here

                AnnotationParser parser = new AnnotationParser(bundleObj, group);
                // 设定元素的默认值
                if (ifIniting) {
                    parser.settingDefaultValue();
                }
                ApplicationStyle style = settingAppStyle(pageContext);
                // 设定模板路径
                templatePath = style.getTemplatePath();
                // 设定许可
                Permission permissionImpl = null;
                if (isPermission()) {
                    permissionImpl = PermissionManager.getUserPermission();
                }
                ContentTemplate contentTemplate = (ContentTemplate) style.getTemplate(ContentTemplate.class);
                contentTemplate.setParser(parser);
                contentTemplate.setPermission(permissionImpl);
                String content = contentTemplate.content();

                settingContentScope(pageContext, content, parser.getTitle());
View Full Code Here

TOP

Related Classes of cn.com.wapps.style.ApplicationStyle

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.