From portal-commits at lists.jboss.org Tue Nov 13 03:57:25 2007 Content-Type: multipart/mixed; boundary="===============6714082526324002253==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8895 - in branches/JBoss_Portal_Branch_2_6/core/src: resources/portal-core-sar/META-INF and 1 other directory. Date: Tue, 13 Nov 2007 03:57:25 -0500 Message-ID: --===============6714082526324002253== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2007-11-13 03:57:24 -0500 (Tue, 13 Nov 2007) New Revision: 8895 Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/con= troller/ajax/AjaxInterceptor.java branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/META= -INF/jboss-service.xml Log: JBPORTAL-1729: AjaxInterceptor with a different context root Contribution from Luca Stancapiano Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/c= ore/controller/ajax/AjaxInterceptor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/co= ntroller/ajax/AjaxInterceptor.java 2007-11-13 08:55:07 UTC (rev 8894) +++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/co= ntroller/ajax/AjaxInterceptor.java 2007-11-13 08:57:24 UTC (rev 8895) @@ -39,11 +39,18 @@ = /** * @author Julien Viet + * @author Luca Stancapiano * @version $Revision$ */ public class AjaxInterceptor extends ControllerInterceptor { - + /** = + * Luca Stancapiano - 29 - 09 -2007 + * targetContextPath is used to assign a context path when = + * default portal-ajax path cannot to be used or if it is changed throu= gh context-root property into jboss-web.xml + * */ + private String targetContextPath =3D "/portal-ajax"; + = public ControllerResponse invoke(ControllerCommand cmd) throws Exceptio= n, InvocationException { ControllerResponse response =3D (ControllerResponse)cmd.invokeNext(); @@ -70,7 +77,7 @@ String url =3D serverContext.renderURL(baseServerURL, serverConte= xt.getURLContext(), URLFormat.newInstance(true, true)); = // - pageProps.put(DynaConstants.RESOURCE_BASE_URL, "/portal-ajax/dyna= "); + pageProps.put(DynaConstants.RESOURCE_BASE_URL, targetContextPath = + "/dyna"); pageProps.put(DynaConstants.SERVER_BASE_URL, url); pageProps.put(DynaConstants.VIEW_STATE, viewId); = @@ -88,4 +95,14 @@ // return response; } + = + public String getTargetContextPath() + { + return targetContextPath; + } + + public void setTargetContextPath(String context) + { + targetContextPath =3D context; + } } Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-s= ar/META-INF/jboss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/MET= A-INF/jboss-service.xml 2007-11-13 08:55:07 UTC (rev 8894) +++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/MET= A-INF/jboss-service.xml 2007-11-13 08:57:24 UTC (rev 8895) @@ -188,6 +188,11 @@ xmbean-dd=3D"" xmbean-code=3D"org.jboss.portal.jems.as.system.JBossServiceModelMBea= n"> +