Hi Jörn,

Jörn Nettingsmeier schrieb:

[...]

>> <jx:set var="doc" value="${usecase.getParameter('document')}"/>
>>
>> (provided the handler belongs to a DocumentUsecase subclass)
> 
> ok, this was obstacle no. 1: i figured since i was not accessing
> documents at all, i should be subclassing AbstractUsecase, which does
> not provide all those neat functions. point taken.

OK, the docs aren't clear enough there. The DocumentUsecase is
meant to simplify accessing the currently managed document, it's
not about the concept of accessing documents.

[...]

>> AREA_BASE_PATH = '<proxy:url href="/${publicationId}/${area}"/>';
>>
>> (see modules/sitemanagement/usecases/tab/sitetree.jx, I'll add the
>> corresponding documentation to the usecase framework docs asap)
> 
> deep and utter magic. where did you pull this one from?
> i looked into sitetree.jx, but i still haven't figured what's going on.
> are those tags being replaced by a transformation before the
> jxtransformer kicks in?

Yes - this was the easiest way to implement this functionality, since
the ProxyTransformer already existed and can transform arbitrary
elements from arbitrary namespaces (see modules/usecase/usecase.xmap):

  <map:transformer name="usecase-proxy"
    logger="lenya.sitemap.transformer.proxy"
    src="org.apache.lenya.cms.cocoon.transformation.ProxyTransformer">

  <transform namespace="http://apache.org/lenya/proxy/1.0";
             element="url"
             attribute="href"/>

  </map:transformer>

IMO the approach is not that bad from an implementation point of view,
the major drawback is indeed that the existence of this functionality
not obvious. It should be easier to call the code within a JX template
without using specific XML elements.


>>> do you still think we had better use jxtemplate?
>>
>> IMO yes :)
> 
> point taken. i'll try and re-implement the stuff as a (shudder!)
> jxtemplate....

Great - good luck :)
Thanks for giving it a try!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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

Reply via email to