Search in sources :

Example 1 with IPageActionHelper

use of com.agiletec.apsadmin.portal.helper.IPageActionHelper in project entando-core by entando.

the class PageTreeTag method doStartTag.

@Override
public int doStartTag() throws JspException {
    try {
        IPageActionHelper helper = this.getHelper(this.isOnline());
        ITreeNode root = this.getAllowedTreeRootNode(helper);
        ValueStack stack = this.getStack();
        stack.getContext().put(this.getVar(), root);
        stack.setValue("#attr['" + this.getVar() + "']", root, false);
    } catch (Throwable t) {
        _logger.error("error in doStartTag", t);
        throw new JspException("Error during tag initialization", t);
    }
    return super.doStartTag();
}
Also used : JspException(javax.servlet.jsp.JspException) ITreeNode(com.agiletec.aps.system.common.tree.ITreeNode) ValueStack(com.opensymphony.xwork2.util.ValueStack) IPageActionHelper(com.agiletec.apsadmin.portal.helper.IPageActionHelper)

Example 2 with IPageActionHelper

use of com.agiletec.apsadmin.portal.helper.IPageActionHelper in project entando-core by entando.

the class PageTreeTag method getHelper.

protected IPageActionHelper getHelper(boolean online) {
    String beanName = online ? "pageActionHelperOnline" : "pageActionHelperDraft";
    IPageActionHelper helper = (IPageActionHelper) ApsWebApplicationUtils.getBean(beanName, this.pageContext);
    return helper;
}
Also used : IPageActionHelper(com.agiletec.apsadmin.portal.helper.IPageActionHelper)

Aggregations

IPageActionHelper (com.agiletec.apsadmin.portal.helper.IPageActionHelper)2 ITreeNode (com.agiletec.aps.system.common.tree.ITreeNode)1 ValueStack (com.opensymphony.xwork2.util.ValueStack)1 JspException (javax.servlet.jsp.JspException)1