[Yanel-dev] State of View
Josias Thöny
josias.thoeny at wyona.com
Wed May 7 09:25:28 CEST 2008
Michael Wechner wrote:
> 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
But this means that content which has not been published yet will be
visible in the live view. It's somehow against my understanding of a
review/publish workflow.
Or do I misunderstand something?
josias
>
> 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
>>
>
>
--
Josias Thöny
Wyona - Open Source Content Management
http://www.wyona.com
More information about the Yanel-development
mailing list