[Yanel-dev] State of View
Michael Wechner
michael.wechner at wyona.com
Tue May 6 23:21:27 CEST 2008
Michael Wechner wrote:
> Hi
>
> Has anyone an idea why we hardcoded the StateOfView within the
> YanelServlet?
I comes to my mind that the reason was that all resources which are
WorkflowableV1, but are not published will result in a 404:
if (workflowable.isLive()) {
view = workflowable.getLiveView(viewId);
} else {
String message = "This document has
not been published yet: " + res.getPath();
log.warn(message);
do404(request, response, doc, message);
return;
}
which would have led to a lot 404!
But I think a better else statement would be to check if a version
exists and then display this one as a start
Cheers
Michi
>
> String stateOfView = StateOfView.AUTHORING;
> //String area = map.getStateOfView(request.getServletPath());
> //log.debug("url: " + request.getServletPath());
> //log.debug("state of view: " + stateOfView);
> /*String area = null;
> if (isToolbarEnabled(request)) {
> area = "authoring";
> } else {
> area = "live";
> }*/
>
>
> Thanks
>
> Michi
>
--
Michael Wechner
Wyona - Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61
More information about the Yanel-development
mailing list