Jörn Nettingsmeier schrieb:
> hi *!
> 
> obviously, the following code from
> /modules-core/usecase/java/src/org/apache/lenya/cms/usecase/DocumentUsecase.java
> does not do what the comment claims it does:
> 
> /**
>  * Returns the document to be redirected to after the usecase has been
>  * completed. If the parameter <code>success</code> is false, the source
>  * document is returned (override this method to change this behaviour).
>  * @param success If the usecase was successfully completed.
>  * @return A document.
>  */
> protected Document getTargetDocument(boolean success) {
>     Document document = (Document) getParameter(TARGET_DOCUMENT);
>     if (document == null) {
>         document = getSourceDocument();
>     }
>     return document;
> }
> 
> the "success" parameter is not used.
> since the usecase flow handler takes care of unsuccessful usecase
> submissions, i'd say let's rip this out. wdyt?

The flowscript passes the success parameter to the usecase,
so it can be taken into account:

    targetUrl = usecase.getTargetURL(state == "success");

I wouldn't like to remove it, because I can imagine that some
usecases want to use custom target URLs for non-successful
invocation (i.e., the URL of an alternative usecase or a certain
error page).

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to