/* * (non-Javadoc) * * @see org.mspring.mlog.web.freemarker.widget.render.AbstractWidgetRender# * nativeWidgetRender * (org.mspring.mlog.web.freemarker.widget.config.WidgetConfig, * org.mspring.mlog.web.freemarker.widget.http.HttpWidgetRequest, * org.mspring.mlog.web.freemarker.widget.http.HttpWidgetResponse) */ @Override protected void nativeWidgetRender( WidgetConfig widgetConfig, HttpWidgetRequest widgetRequest, HttpWidgetResponse widgetResponse) { // TODO Auto-generated method stub if (widgetConfig == null) { return; } HttpWidget widget = getHttpWidgetCache(widgetConfig, widgetRequest, widgetResponse); if (widget != null) { return; } try { String path = widgetConfig.getPath(); if (StringUtils.isNotBlank(path)) { try { widgetRequest.getRequestDispatcher(path).include(widgetRequest, widgetResponse); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } } } catch (Exception e) { // TODO: handle exception throw new WidgetNotFoundException("widget render exception!", e); } }
/* * (non-Javadoc) * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { // TODO Auto-generated method stub if (obj != null && obj instanceof Tag) { Catalog c = (Catalog) obj; if (StringUtils.isNotBlank(c.getName()) && c.getName().equals(this.getName())) { return true; } if (c.getId() != null && c.getId().equals(this.getId())) { return true; } } return false; }