Author: michiel
Date: 2010-04-09 18:09:17 +0200 (Fri, 09 Apr 2010)
New Revision: 41827
Modified:
didactor/trunk/components/core/src/main/webapp/shared/render.jspx
Log:
working around a small issue with newly logged in users
Modified: didactor/trunk/components/core/src/main/webapp/shared/render.jspx
===================================================================
--- didactor/trunk/components/core/src/main/webapp/shared/render.jspx
2010-04-09 15:52:28 UTC (rev 41826)
+++ didactor/trunk/components/core/src/main/webapp/shared/render.jspx
2010-04-09 16:09:17 UTC (rev 41827)
@@ -12,30 +12,58 @@
<mm:import externid="block" required="true" />
<mm:import externid="node" from="request" required="true" />
- <di:html
- expires="0"
- type="application/xhtml+xml"
- rank="didactor user">
+ <c:choose>
+ <c:when test="${node eq 0}">
+ <!-- This may happen if the user was not logged in yet
+ We simply redirect, the second time around it will work.
+ -->
+ <mm:import externid="reload" />
+ <di:html
+ expires="0"
+ type="application/xhtml+xml"
+ rank="didactor user">
+ <mm:notpresent referid="reload">
+ <script type="text/javascript">
+ var loc = document.location.href;
+ if (loc.indexOf("?") > 0) {
+ loc = loc + "&amp;reload=true";
+ } else {
+ loc = loc + "?reload=true";
+ }
+ document.location = loc;
+ </script>
+ </mm:notpresent>
+ </di:html>
+ </c:when>
+ <c:otherwise>
+ <di:html
+ expires="0"
+ type="application/xhtml+xml"
+ rank="didactor user">
- <jsp:attribute name="head">
- <mm:node number="${node}">
- <mm:component name="${name}" block="${block}" render="head" />
- </mm:node>
- </jsp:attribute>
- <div class="rows">
- <di:include debug="html" page="/shared/navigation.jspx" />
- <di:include page="/shared/subnavigation.jspx" />
+ <jsp:attribute name="head">
+ <mm:node number="${node}">
+ <mm:component name="${name}" block="${block}" render="head" />
+ </mm:node>
+ </jsp:attribute>
+ <div class="rows">
- <div class="mainContent">
+ <di:include debug="html" page="/shared/navigation.jspx" />
+ <di:include page="/shared/subnavigation.jspx" />
- <div class="contentBodywit">
- <mm:node number="${node}">
- <mm:component name="${name}" block="${block}" />
- </mm:node>
+ <div class="mainContent">
+
+ <div class="contentBodywit">
+ <mm:node number="${node}">
+ <mm:component name="${name}" block="${block}" />
+ </mm:node>
+ </div>
+ </div>
</div>
- </div>
- </div>
- </di:html>
+ </di:html>
+ </c:otherwise>
+ </c:choose>
+
</jsp:root>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs