Tony Collen wrote:
> Vadim Gritsenko wrote:
>
>> XSP if not perfect, but we still need some kind of "official"
>> templating. What's the alternatives here?
>>
>> ... and it's not that convinient to assemble DOM (or something) in
>> flow and then pass it to the templates... ;-)
>
>
>
> Even the JXTemplateGenerator? I think it's nice and useful.
Sure, it might be nice, and it is useful. Is it cacheable? To give you
simple example:
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-session="http://apache.org/xsp/session/2.0">
<xsp:logic>
public java.io.Serializable getKey()
{
if (request.getSession(false) == null) {
return "0";
} else if(request.getSession().getAttribute("user") != null) {
return "1";
} else {
return "0";
}
}
public SourceValidity getValidity() {
return NOPValidity.SHARED_INSTANCE;
}
</xsp:logic>
<menu>
<page name="Home" link="welcome"/>
...
<xsp:logic>
if(<xsp-session:get-attribute name="user"/> != null) {
<page name="Logout" link="logout"/>
} else {
<page name="Login" link="login"/>
}
</xsp:logic>
</menu>
</xsp:page>
> Perhaps the problem is that the flow layer isn't as "up-front" as
> other things...
What JXTemplateGenerator has to do with flow? AFAIK, it is good without
flow too! :)
Vadim
|