Author: julien_viet
Date: 2010-09-06 06:06:34 -0400 (Mon, 06 Sep 2010)
New Revision: 4052
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java
Log:
add ajax on ResourceURL
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java 2010-09-06
07:17:48 UTC (rev 4051)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java 2010-09-06
10:06:34 UTC (rev 4052)
@@ -31,13 +31,17 @@
/** . */
protected final L locator;
+ /** . */
+ protected Boolean ajax;
+
/**
- * Create a new instance.
+ * Create a resource URL instance.
*
* @param locator the resource locator that can't be null
+ * @param ajax the ajax mode
* @throws NullPointerException if the resource locator is null
*/
- public ResourceURL(L locator) throws NullPointerException
+ public ResourceURL(L locator, Boolean ajax) throws NullPointerException
{
if (locator == null)
{
@@ -46,6 +50,7 @@
//
this.locator = locator;
+ this.ajax = ajax;
}
/**
@@ -59,6 +64,28 @@
}
/**
+ * Returns the ajax mode.
+ *
+ * @return the ajax mode
+ */
+ public final Boolean getAjax()
+ {
+ return ajax;
+ }
+
+ /**
+ * Update the ajax mode.
+ *
+ * @param ajax the new ajax mode
+ * @return this object
+ */
+ public final ResourceURL setAjax(Boolean ajax)
+ {
+ this.ajax = ajax;
+ return this;
+ }
+
+ /**
* Returns the current resource associated with this URL.
*
* @return the resource
Modified:
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
---
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-09-06
07:17:48 UTC (rev 4051)
+++
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-09-06
10:06:34 UTC (rev 4052)
@@ -231,7 +231,7 @@
@Override
public <R, L extends ResourceLocator<R>> ResourceURL<R, L>
newURL(ResourceType<R, L> resourceType, L locator)
{
- return new PortalURL<R,L>(this, locator);
+ return new PortalURL<R,L>(this, locator, false);
}
public void refreshResourceBundle() throws Exception
Modified:
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java
===================================================================
---
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java 2010-09-06
07:17:48 UTC (rev 4051)
+++
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java 2010-09-06
10:06:34 UTC (rev 4052)
@@ -35,9 +35,9 @@
/** . */
private final PortalRequestContext requestContext;
- public PortalURL(PortalRequestContext requestContext, L locator)
+ public PortalURL(PortalRequestContext requestContext, L locator, Boolean ajax)
{
- super(locator);
+ super(locator, ajax);
//
if (requestContext == null)