Author: ate
Date: Fri Sep 14 10:55:59 2012
New Revision: 1384717
URL: http://svn.apache.org/viewvc?rev=1384717&view=rev
Log:
RAVE-694:
- derive rave (mapping) context dynamically, not hardcoded, for now only on
/dyn servletPath
- fixing page tab navigation by using original url pattern for now
(/page/view/{pageId} instead of /page/{pageId})
Added:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/tags/
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/tags/custom_js.tag
- copied, changed from r1382728,
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/custom_js.tag
Modified:
rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/nested-dispatcher-servlet.xml
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/routes.xml
Modified:
rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json?rev=1384717&r1=1384716&r2=1384717&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json
Fri Sep 14 10:55:59 2012
@@ -1,33 +1,37 @@
{
"routes" : {
"jcr:primaryType" : "raveconfig:routes",
- "name" : "routes",
- "route1" : {
+ "r1" : {
"jcr:primaryType" : "raveconfig:route",
- "action" : "defaultPage",
"path" : "/home",
- "target" : "/userPage"
+ "target" : "/userPage",
+ "action" : "defaultPage"
},
- "route2" : {
+ "r2" : {
"jcr:primaryType" : "raveconfig:route",
- "action" : "defaultPage",
"path" : "/page",
- "target" : "/userPage"
+ "target" : "/userPage",
+ "action" : "defaultPage"
},
- "route3" : {
+ "r3" : {
"jcr:primaryType" : "raveconfig:route",
- "path" : "/dynapi/rest/widgets",
- "target" : "org.apache.rave.portal.web.mvc.api.rest.DynWidgetApi"
+ "path" : "/page/view",
+ "target" : "/userPage",
+ "action" : "defaultPage"
},
- "route4" : {
+ "r4" : {
"jcr:primaryType" : "raveconfig:route",
- "path" : "/page/{pageId}",
+ "path" : "/page/view/{pageId}",
"target" : "/userPage"
+ },
+ "r5" : {
+ "jcr:primaryType" : "raveconfig:route",
+ "path" : "/dynapi/rest/widgets",
+ "target" : "org.apache.rave.portal.web.mvc.api.rest.DynWidgetApi"
}
},
"pages" : {
"jcr:primaryType" : "raveconfig:pagedefinitions",
- "name" : "pages",
"userPage" : {
"jcr:primaryType" : "raveconfig:pagefragment",
"name" : "userPage",
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/nested-dispatcher-servlet.xml
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/nested-dispatcher-servlet.xml?rev=1384717&r1=1384716&r2=1384717&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/nested-dispatcher-servlet.xml
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/nested-dispatcher-servlet.xml
Fri Sep 14 10:55:59 2012
@@ -277,6 +277,7 @@
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/views/"/>
<property name="suffix" value=".jsp"/>
+ <property name="requestContextAttribute" value="requestContext"/>
</bean>
<oxm:jaxb2-marshaller id="xmlMarshaller">
Modified:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/routes.xml
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/routes.xml?rev=1384717&r1=1384716&r2=1384717&view=diff
==============================================================================
---
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/routes.xml
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/routes.xml
Fri Sep 14 10:55:59 2012
@@ -18,7 +18,9 @@
under the License.
-->
<routes name="default">
- <route path="/home" target="/userPage" action="defaultPage"/>
- <route path="/page" target="/userPage" action="defaultPage"/>
- <route path="/page/{pageId}" target="/userPage"/>
+ <route path="/" target="/userPage" action="defaultPage"/>
+ <route path="/page" target="/userPage" action="defaultPage"/>
+ <route path="/page/view" target="/userPage" action="defaultPage"/>
+ <route path="/page/view/{pageId}" target="/userPage"/>
+ <route path="/dynapi/rest/widgets"
target="org.apache.rave.portal.web.mvc.api.rest.DynWidgetApi"/>
</routes>
Copied:
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/tags/custom_js.tag
(from r1382728,
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/custom_js.tag)
URL:
http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/tags/custom_js.tag?p2=rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/tags/custom_js.tag&p1=rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/custom_js.tag&r1=1382728&r2=1384717&rev=1384717&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/custom_js.tag
(original)
+++
rave/sandbox/content-services/demo-portal/src/main/webapp/WEB-INF/tags/custom_js.tag
Fri Sep 14 10:55:59 2012
@@ -17,4 +17,10 @@
under the License.
--%>
-<%-- intentionally left empty for override in war overlays --%>
\ No newline at end of file
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<c:if test="${not empty requestContext}">
+ <script>
+ <%-- derive rave (mapping) context dynamically, not hardcoded --%>
+ rave.setContext("${requestContext.pathToServlet}/");
+ </script>
+</c:if>