use of com.agiletec.apsadmin.system.plugin.PluginSubMenuContainer in project entando-core by entando.
the class PluginsSubMenuTag method doStartTag.
@Override
public int doStartTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
WebApplicationContext wac = ApsWebApplicationUtils.getWebApplicationContext(request);
List<PluginSubMenuContainer> containters = new ArrayList<PluginSubMenuContainer>();
ValueStack stack = this.getStack();
try {
String[] beanNames = wac.getBeanNamesForType(PluginSubMenuContainer.class);
for (int i = 0; i < beanNames.length; i++) {
PluginSubMenuContainer container = (PluginSubMenuContainer) wac.getBean(beanNames[i]);
containters.add(container);
}
if (containters.size() > 0) {
stack.getContext().put(this.getObjectName(), containters);
stack.setValue("#attr['" + this.getObjectName() + "']", containters, false);
return EVAL_BODY_INCLUDE;
}
} catch (Throwable t) {
throw new JspException("Error creating the plugins menu list", t);
}
return super.doStartTag();
}
Aggregations