You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by "Gregor J. Rothfuss" <gr...@apache.org> on 2003/06/11 20:50:27 UTC
confused
tell me again why writing
<xsp:structure>
<xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
<xsp:include>org.apache.lenya.cms.publication.PublicationFactory</xsp:includ
e>
</xsp:structure>
<xsp:logic>
Publication publication =
PublicationFactory.getPublication(objectModel);
</xsp:logic>
<url-info>
<context-prefix><xsp-request:get-context-path/></context-prefix>
<publication-id><input:get-attribute module="page-envelope" as="string"
name="publication-id"/></publication-id>
<area><input:get-attribute module="page-envelope" as="string"
name="area"/></area>
<document-id><input:get-attribute module="page-envelope" as="string"
name="document-id"/></document-id>
<servlet-context-path><xsp:expr>publication.getServletContext().getCanonical
Path()</xsp:expr></servlet-context-path>
<publication><input:get-attribute module="page-envelope" as="object"
name="publication"/></publication>
</url-info>
<xsp:logic>
String projectid = parameters.getParameter("projectid","null");
</xsp:logic>
in every menu xsp is superior to
<xsp-lenya:util/>
thanks
--
Gregor J. Rothfuss
Wyona Ltd. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
Re: confused
Posted by Andreas Hartmann <an...@apache.org>.
Gregor J. Rothfuss wrote:
> tell me again why writing
>
[...]
> in every menu xsp is superior to
>
> <xsp-lenya:util/>
In principle, it is not.
The major problem is the design of the current logicsheet.
If we refactor it using the page envelope, we could make
it a standard. But we should not use fields to access
data, only XML tags.
Fields have some disadvantages:
- it is not obvious if they belong to the logicsheet or
to the XSP
- they can be hidden by local variables
And every bit of Java code in XSPs is a risk of failure when
the API changes. So the code I wrote is of course just a
temporary solution.
We could put everything in a page-envelope logicsheet
that uses the page-envelope input module (this keeps the
syntax a little cleaner than accessing the input module
directly).
And we should try to factor out the menu structure definition
of the menu XSP.
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org