lenya-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: Using Flowscript and JXTemplates in Lenya
Date Thu, 29 Nov 2007 10:56:11 GMT
Jörn Nettingsmeier schrieb:
> stevecam wrote:
>> I want to make use of Flowscript and JXTemplates from Lenya.
>>
>> My requirement is to create pages that incorporate data from a 
>> database into
>> tables and allow users to select rows in the tables, their selection 
>> in turn
>> affecting what they see on the next page. Flowscript seems to be a simple
>> means to acheive this.
>>
>> Also, I want to make use of the JDBi javascript database interface 
>> library
>> in the Cocoon "Easy SQL database access" demo in the forms block.
>>
>> My task now is to find the best way to make use of these means in Lenya.
>> There is some information available on how to use CForms from Lenya 
>> but no
>> good example of Javaflow and JXTemplates.
>> Specifically I want to generate the page body (that would normally 
>> come from
>> an index_en.xml file (or other language version of it)) via a 
>> JXTemplate and
>> to have a Flowscript use (call) a modified Lenya pipeline to aggregate 
>> the
>> body with my sites standard header, footer, breadcrumb.
>> I presume that for the Lenya menu highlighting and breadcrumb 
>> functionality
>> to work then the page must be one in the Lenya sitetree.

That's true, but in your case the page would only be a placeholder for 
the content which is generated dynamically by the usecase or resource 
type module sitemap (whatever approach you choose).

>> I'll have a go at this now and add to this thread with my results, but if
>> anyone has already implemented such a thing I'd be happy for some help.
> 
> if you need flow, you should implement it as a usecase.
> in lenya 2.0, there is a document type called "usecasedocument", which 
> allows you to disguise a usecase (which normally has a view that's 
> orthogonal to documents) as a plain document, which you can include in 
> your navigation menu and handle it as if it were just another xhtml doc.
> perhaps andreas can chime in with more details here?

http://lenya.apache.org/docs/modules/usecasedocument/index.html

> alternatively, you could create a custom doctype that will just contain 
> a database query and a link to a special xslt that renders it to the 
> desired xhtml output. i've done that for accessing an xml database, and 
> it worked ok. i'd be glad to help out, but i only know lenya 2.0...

I'd also use a resource type rather than a usecase because

- it is a read-only operation
- custom flow is required

I guess I'd start with a resource type module (there's a tutorial in the 
documentation) and add the stuff from the "Easy SQL database access" 
tutorial in the module sitemap.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Mime
View raw message