Author: julien(a)jboss.com
Date: 2007-04-23 16:21:56 -0400 (Mon, 23 Apr 2007)
New Revision: 7032
Modified:
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java
trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java
trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml
trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd
Log:
renamed "asynchronous" to "partial-refresh" in jboss-portlet.xml as it
describes better the feature, asynchronous is not precise enough
Modified: trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2007-04-23
19:29:11 UTC (rev 7031)
+++
trunk/core/src/main/org/jboss/portal/core/aspects/portlet/AjaxInterceptor.java 2007-04-23
20:21:56 UTC (rev 7032)
@@ -44,6 +44,8 @@
public class AjaxInterceptor extends PortletInterceptor
{
+ public static final String PARTIAL_REFRESH = "partialRefresh";
+
protected Object invoke(PortletInvocation invocation) throws Exception,
InvocationException
{
PortletInvocationResponse response =
(PortletInvocationResponse)invocation.invokeNext();
@@ -58,7 +60,7 @@
AjaxMetaData ajax = portletMD.getAjax();
if (ajax != null)
{
- invocation.setAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE,
"asynchronous", ajax.getAsynchronous());
+ invocation.setAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE,
PARTIAL_REFRESH, ajax.getPartialRefresh());
}
}
}
Modified:
trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java 2007-04-23
19:29:11 UTC (rev 7031)
+++
trunk/core/src/main/org/jboss/portal/core/deployment/JBossApplicationMetaDataFactory.java 2007-04-23
20:21:56 UTC (rev 7032)
@@ -171,10 +171,10 @@
}
else if (object instanceof AjaxMetaData)
{
- if ("asynchronous".equals(localName))
+ if ("partial-refresh".equals(localName))
{
AjaxMetaData ajax = (AjaxMetaData)object;
- ajax.setAsynchronous(Boolean.valueOf(value));
+ ajax.setPartialRefresh(Boolean.valueOf(value));
}
}
else
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2007-04-23
19:29:11 UTC (rev 7031)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2007-04-23
20:21:56 UTC (rev 7032)
@@ -42,6 +42,7 @@
import org.jboss.portal.core.controller.portlet.PortletInvocationFactory;
import org.jboss.portal.core.ns.NavigationalStateKey;
import org.jboss.portal.core.theme.WindowRendition;
+import org.jboss.portal.core.aspects.portlet.AjaxInterceptor;
import org.jboss.portal.server.config.ServerConfig;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portal.server.request.URLContext;
@@ -283,10 +284,10 @@
}
// Update window props after render if needed
- Boolean asynchronous =
(Boolean)invocation.getAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE,
"asynchronous");
- if (asynchronous != null && Boolean.FALSE.equals(asynchronous))
+ Boolean partialRefresh =
(Boolean)invocation.getAttribute(PortletInvocation.RESPONSE_PROPERTIES_SCOPE,
AjaxInterceptor.PARTIAL_REFRESH);
+ if (partialRefresh != null && Boolean.FALSE.equals(partialRefresh))
{
- DynaRenderOptions options = DynaRenderOptions.getOptions(null,
asynchronous);
+ DynaRenderOptions options = DynaRenderOptions.getOptions(null,
partialRefresh);
options.setOptions(windowProps);
}
Modified: trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java 2007-04-23
19:29:11 UTC (rev 7031)
+++
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/AjaxMetaData.java 2007-04-23
20:21:56 UTC (rev 7032)
@@ -30,15 +30,15 @@
{
/** . */
- private Boolean asynchronous;
+ private Boolean partialRefresh;
- public Boolean getAsynchronous()
+ public Boolean getPartialRefresh()
{
- return asynchronous;
+ return partialRefresh;
}
- public void setAsynchronous(Boolean asynchronous)
+ public void setPartialRefresh(Boolean partialRefresh)
{
- this.asynchronous = asynchronous;
+ this.partialRefresh = partialRefresh;
}
}
Modified:
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java 2007-04-23
19:29:11 UTC (rev 7031)
+++
trunk/core/src/main/org/jboss/portal/core/metadata/portlet/JBossPortletMetaData.java 2007-04-23
20:21:56 UTC (rev 7032)
@@ -70,10 +70,10 @@
}
else
{
- // If no asynchronous value provided use the one provided by the default
- if (ajax.getAsynchronous() == null)
+ // If no partialRefresh value provided use the one provided by the default
+ if (ajax.getPartialRefresh() == null)
{
- ajax.setAsynchronous(portletExt.getAjax().getAsynchronous());
+ ajax.setPartialRefresh(portletExt.getAjax().getPartialRefresh());
}
}
}
Modified: trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml 2007-04-23
19:29:11 UTC (rev 7031)
+++ trunk/core/src/resources/portal-core-sar/conf/standardjboss-portlet.xml 2007-04-23
20:21:56 UTC (rev 7032)
@@ -21,21 +21,19 @@
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
<portlet-app>
<portlet>
<portlet-name>DefaultPortlet</portlet-name>
<remotable>false</remotable>
<ajax>
- <asynchronous>true</asynchronous>
+ <partial-refresh>true</partial-refresh>
</ajax>
<transaction>
<trans-attribute>NotSupported</trans-attribute>
</transaction>
- <security-constraint>
- <policy-permission>
- <unchecked/>
- <action-name>view</action-name>
- </policy-permission>
- </security-constraint>
</portlet>
</portlet-app>
Modified: trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd
===================================================================
--- trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd 2007-04-23 19:29:11
UTC (rev 7031)
+++ trunk/core/src/resources/portal-core-sar/dtd/jboss-portlet_2_6.dtd 2007-04-23 20:21:56
UTC (rev 7032)
@@ -78,16 +78,16 @@
<!ELEMENT remotable (#PCDATA)>
<!--
-The ajax tag allows to configure the ajax capabilities of the portlet. If the portlet is
tagged as asynchronous
-then the portal may use partial page refreshing and render only that portlet. If the
portlet asynchronous value
+The ajax tag allows to configure the ajax capabilities of the portlet. If the portlet is
tagged as partial-refresh
+then the portal may use partial page refreshing and render only that portlet. If the
portlet partial-refresh value
is false, then the portal will perform a full page refresh when the portlet is
refreshed.
-->
-<!ELEMENT ajax (asynchronous)>
+<!ELEMENT ajax (partial-refresh)>
<!--
-The authorized values for the asynchronous element are true or false.
+The authorized values for the partial-refresh element are true or false.
-->
-<!ELEMENT asynchronous (#PCDATA)>
+<!ELEMENT partial-refresh (#PCDATA)>
<!--
This element configure the portlet session of the portlet.
Modified: trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml
===================================================================
---
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml 2007-04-23
19:29:11 UTC (rev 7031)
+++
trunk/core-samples/src/resources/portal-samples-war/WEB-INF/jboss-portlet.xml 2007-04-23
20:21:56 UTC (rev 7032)
@@ -80,13 +80,13 @@
<portlet>
<portlet-name>URLPortlet</portlet-name>
<ajax>
- <asynchronous>false</asynchronous>
+ <partial-refresh>false</partial-refresh>
</ajax>
</portlet>
<portlet>
<portlet-name>AsyncURLPortlet</portlet-name>
<ajax>
- <asynchronous>true</asynchronous>
+ <partial-refresh>false</partial-refresh>
</ajax>
</portlet>
<portlet>