Author: sviluppatorefico
Date: 2009-07-22 19:10:05 -0400 (Wed, 22 Jul 2009)
New Revision: 13592
Modified:
branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java
Log:
JBPORTAL-2430 it lets drag and drop and partial refresh in a region
Modified:
branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java 2009-07-22
23:09:27 UTC (rev 13591)
+++
branches/JBoss_Portal_Branch_2_7_AS5/theme/src/main/org/jboss/portal/theme/tag/RegionTagHandler.java 2009-07-22
23:10:05 UTC (rev 13592)
@@ -22,25 +22,27 @@
******************************************************************************/
package org.jboss.portal.theme.tag;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
import org.jboss.logging.Logger;
import org.jboss.portal.theme.LayoutConstants;
import org.jboss.portal.theme.Orientation;
import org.jboss.portal.theme.impl.JSPRendererContext;
+import org.jboss.portal.theme.impl.render.dynamic.DynaRenderOptions;
import org.jboss.portal.theme.render.RenderException;
import org.jboss.portal.theme.render.renderer.PageRendererContext;
import org.jboss.portal.theme.render.renderer.RegionRendererContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.JspWriter;
-import javax.servlet.jsp.PageContext;
-import javax.servlet.jsp.tagext.SimpleTagSupport;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
/**
* Tag handler for the region tag. <p>A region represents a subsection of a portal
page. A region can host several
* portlets. The portlets can be arranged horizontally or vertically. The region tag
utilizes a render set to create the
@@ -60,6 +62,8 @@
private Orientation regionOrientation;
private String regionName = null;
private String regionCssId = null;
+ private String dndEnabled = null;
+ private String partialRefreshEnabled = null;
/**
* create the markup of this tag
@@ -190,6 +194,15 @@
return region.getProperties();
}
};
+
+ if (dndEnabled != null)
+ rrc.getProperties().put(DynaRenderOptions.DND_ENABLED,
+ dndEnabled);
+
+ if (partialRefreshEnabled != null)
+ rrc.getProperties().put(DynaRenderOptions.PARTIAL_REFRESH_ENABLED,
+ partialRefreshEnabled);
+
try
{
PrintWriter pw = new PrintWriter(out);
@@ -252,4 +265,30 @@
{
this.regionCssId = regionID;
}
+
+ /**
+ * Attribute handler for the drag and drop of this tag
+ * <p>
+ * This field enables drag and drop on a chosen region
+ * </p>
+ *
+ * @param dndEnabled
+ * it can be true or false
+ */
+ public void setDndEnabled(String dndEnabled) {
+ this.dndEnabled = dndEnabled;
+ }
+
+ /**
+ * Attribute handler for the partial refresh of this tag
+ * <p>
+ * This field enables partial refresh on a chosen region
+ * </p>
+ *
+ * @param partialRefreshEnabled
+ * it can be true or false
+ */
+ public void setPartialRefreshEnabled(String partialRefreshEnabled) {
+ this.partialRefreshEnabled = partialRefreshEnabled;
+ }
}
Show replies by date