Author: phuong_vu
Date: 2011-10-25 22:54:20 -0400 (Tue, 25 Oct 2011)
New Revision: 7878
Removed:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Decorator.java
Modified:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Lifecycle.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java
Log:
GTNPORTAL-2221 Clean up variable bindings being used webui groovy template
Deleted:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Decorator.java
===================================================================
---
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Decorator.java 2011-10-26
02:47:15 UTC (rev 7877)
+++
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Decorator.java 2011-10-26
02:54:20 UTC (rev 7878)
@@ -1,53 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.webui.core.lifecycle;
-
-import org.exoplatform.webui.application.WebuiRequestContext;
-
-/**
- * Created by The eXo Platform SAS
- * Aug 23, 2006
- *
- * Writes a decorator template with the given css class style
- */
-public class Decorator
-{
- //<%decorator.start(.., ..)%>
- final public void start(String cssClass, String style) throws Exception
- {
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
- context.getWriter().append("<div
class=\"").append(cssClass).append("\">").append("<div
class=\"").append(style)
- .append("\" style=\"margin:
0px\">").append("<div
class=\"TopLeftCornerBoxDecorator\">").append(
- "<div
class=\"TopRightCornerBoxDecorator\">").append(
- "<div
class=\"TopCenterBoxDecorator\"><span></span></div>").append("</div>").append("</div>").append(
- "<div
class=\"MiddleLeftSideBoxDecorator\">").append("<div
class=\"MiddleRightSideBoxDecorator\">").append(
- "<div class=\"DecoratorBackground\">");
-
- }
-
- final public void end() throws Exception
- {
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
-
context.getWriter().append("</div>").append("</div>").append("</div>").append(
- "<div
class=\"BottomLeftCornerBoxDecorator\">").append("<div
class=\"BottomRightCornerBoxDecorator\">")
- .append("<div
class=\"BottomCenterBoxDecorator\"><span></span></div>").append("</div>").append("</div>")
- .append("</div>").append("</div>");
- }
-}
\ No newline at end of file
Modified:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Lifecycle.java
===================================================================
---
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Lifecycle.java 2011-10-26
02:47:15 UTC (rev 7877)
+++
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/core/lifecycle/Lifecycle.java 2011-10-26
02:54:20 UTC (rev 7878)
@@ -37,8 +37,6 @@
protected static Log log = ExoLogger.getLogger("portal:Lifecycle");
- private Decorator decorator_ = new Decorator();
-
// public void init(UIComponent uicomponent, WebuiRequestContext context)
// throws Exception {}
@@ -103,7 +101,6 @@
protected void renderTemplate(String template, WebuiBindingContext bcontext) throws
Exception
{
WebuiRequestContext context = bcontext.getRequestContext();
- bcontext.put("decorator", decorator_);
bcontext.put("locale", context.getLocale());
ExoContainer pcontainer =
context.getApplication().getApplicationServiceContainer();
TemplateService service =
(TemplateService)pcontainer.getComponentInstanceOfType(TemplateService.class);
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java 2011-10-26
02:47:15 UTC (rev 7877)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java 2011-10-26
02:54:20 UTC (rev 7878)
@@ -139,7 +139,6 @@
ResourceResolver resolver = uicomponent.getTemplateResourceResolver(context,
template);
WebuiBindingContext bcontext = new WebuiBindingContext(resolver,
context.getWriter(), uicomponent, context);
bcontext.put(UIComponent.UICOMPONENT, uicomponent);
- bcontext.put(uicomponent.getUIComponentName(), uicomponent);
renderTemplate(template, bcontext);
}