You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Joern Nettingsmeier <po...@uni-due.de> on 2006/08/15 23:05:20 UTC

usecase view without jxtemplate?

hi everyone!


i'm trying to integrate the tinymce editor into lenya 1.4, based on a
skeleton module from wyona.

tinymce has this cool feature that allows you to turn arbitrary elements
into editor instances. that means you can tell it to take over
"div#body", and you don't need to do any ugly pre-processing. basically
you can take the page as is and add some javascript, and it becomes
editable.

now i want to circumvent the jxtemplate mechanism, because with it you
get all kinds of cruft by default, such as the lenya logo and a complete
set of html headers. not nice.
i found that you can specify a cocoon source as usecase view in the
xconf patchfile, which i did.

now i'm creating the usecase view in the module sitemap, but the problem
is that i need access to the continuation id and the name of the
usecase. in a jxtemplate, i could do this (taken from the fckeditor module):
<input type="hidden" name="lenya.continuation"
       value="${continuation.id}"/>
<input type="hidden" name="lenya.usecase"
       value="${usecase.getName()}"/>	

is there any way to access this information via an input module in a
sitemap?

thanks in advance,

jörn



-- 
"I don't need backups. I need restore!" - Trad.

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-due.de, Telefon: 0203/379-2736


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


Re: usecase view without jxtemplate?

Posted by so...@apache.org.
On 9/4/06, Joern Nettingsmeier <po...@uni-due.de> wrote:
> still problems with my continuation...
> solprovider@apache.org wrote:
> > On 8/15/06, Joern Nettingsmeier <po...@uni-due.de> wrote:
> >> i'm trying to integrate the tinymce editor into lenya 1.4, based on a
> >> skeleton module from wyona.
> >>
> >> tinymce has this cool feature that allows you to turn arbitrary elements
> >> into editor instances. that means you can tell it to take over
> >> "div#body", and you don't need to do any ugly pre-processing. basically
> >> you can take the page as is and add some javascript, and it becomes
> >> editable.
> >>
> >> now i want to circumvent the jxtemplate mechanism, because with it you
> >> get all kinds of cruft by default, such as the lenya logo and a complete
> >> set of html headers. not nice.
> >> i found that you can specify a cocoon source as usecase view in the
> >> xconf patchfile, which i did.
> >>
> >> now i'm creating the usecase view in the module sitemap, but the problem
> >> is that i need access to the continuation id and the name of the
> >> usecase. in a jxtemplate, i could do this (taken from the fckeditor
> >> module):
> >> <input type="hidden" name="lenya.continuation"
> >>        value="${continuation.id}"/>
> >> <input type="hidden" name="lenya.usecase"
> >>        value="${usecase.getName()}"/>
> >>
> >> is there any way to access this information via an input module in a
> >> sitemap?
> >
> > (The following is based on Lenya 1.2 and Cocoon 2.1.9, but it should
> > apply to 1.4.)
> >
> > {flow-continuation:???}
> > The FlowContinuationModule will return any attribute from the
> > WebContinuation.  I could not find any code that sets attributes in a
> > WebContinuation.  There is even a JS function to set them, but I could
> > not find anthing that uses it.
>
> thanks for the hint. it's not documented anywhere, but i think
> {flow-continuation:id} should do it..
>
> > {request-param:lenya.continuation}
>
> well, this won't help when invoking the usecase, since the continuation
> id will only be sent on further requests, not with the initial one.
>
> > {request-param:lenya.usecase}
>
> this one works well.
>
> the problem is that somehow no continuation is created.
> both {flow-continuation:id} in a sitemap and ${cocoon.continuation.id}
> in a jxtemplate return an empty string.
>
> has anyone else used the usecase framework with URI views successfully?
> what can possibly go wrong? i have this feeling that no continuation (or
> rather, no flow at all) is generated.


In 1.2, the continuation is added to the FORM ACTION in template.xml with
    <ft:form-template
action="#{$continuation/id}.more?lenya.usecase=myUsecase"
method="POST">

code.js calls
   var form = new Form("form.xml");
   form.showForm("display");

The calling XMAP has:
   <map:match pattern="display">
      <map:generate src="template.xml"/>

So the HTML has:
<form action="184d766a561e247d763381856a3a754422290e8c.more?lenya.usecase=myUsecase"

About now, Andreas should be posting that 1.4 completely changed how
Usecases work, so none of this is relevant.

solprovider

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


Re: usecase view without jxtemplate?

Posted by Joern Nettingsmeier <po...@uni-due.de>.
still problems with my continuation...

solprovider@apache.org wrote:
> On 8/15/06, Joern Nettingsmeier <po...@uni-due.de> wrote:
>> i'm trying to integrate the tinymce editor into lenya 1.4, based on a
>> skeleton module from wyona.
>>
>> tinymce has this cool feature that allows you to turn arbitrary elements
>> into editor instances. that means you can tell it to take over
>> "div#body", and you don't need to do any ugly pre-processing. basically
>> you can take the page as is and add some javascript, and it becomes
>> editable.
>>
>> now i want to circumvent the jxtemplate mechanism, because with it you
>> get all kinds of cruft by default, such as the lenya logo and a complete
>> set of html headers. not nice.
>> i found that you can specify a cocoon source as usecase view in the
>> xconf patchfile, which i did.
>>
>> now i'm creating the usecase view in the module sitemap, but the problem
>> is that i need access to the continuation id and the name of the
>> usecase. in a jxtemplate, i could do this (taken from the fckeditor
>> module):
>> <input type="hidden" name="lenya.continuation"
>>        value="${continuation.id}"/>
>> <input type="hidden" name="lenya.usecase"
>>        value="${usecase.getName()}"/>
>>
>> is there any way to access this information via an input module in a
>> sitemap?
> 
> (The following is based on Lenya 1.2 and Cocoon 2.1.9, but it should
> apply to 1.4.)
> 
> {flow-continuation:???}
> The FlowContinuationModule will return any attribute from the
> WebContinuation.  I could not find any code that sets attributes in a
> WebContinuation.  There is even a JS function to set them, but I could
> not find anthing that uses it.

thanks for the hint. it's not documented anywhere, but i think
{flow-continuation:id} should do it..

> {request-param:lenya.continuation}

well, this won't help when invoking the usecase, since the continuation
id will only be sent on further requests, not with the initial one.

> {request-param:lenya.usecase}

this one works well.

the problem is that somehow no continuation is created.
both {flow-continuation:id} in a sitemap and ${cocoon.continuation.id}
in a jxtemplate return an empty string.

has anyone else used the usecase framework with URI views successfully?
what can possibly go wrong? i have this feeling that no continuation (or
rather, no flow at all) is generated.

thanks,

jörn



-- 
"I don't need backups. I need restore!" - Trad.

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: pol-admin@uni-due.de, Telefon: 0203/379-2736


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


Re: Caching Aggregation of Directories

Posted by Michael Wechner <mi...@wyona.com>.
Tim Hannigan wrote:

> We're using Lenya 1.2.4 with TinyMCE 2.0.6.1


I think Lenya 1.2.4 might have problems with Cocoon-2.1.9, but Lenya 
1.2.5-dev should be fine, whereas
I have not tested it myself. This reminds me that we should do a 1.2.5 
release and create a 1.2.6-dev for further bugfixes.

Michi

>
> -Tim
>
>
>
> On 16-Aug-06, at 4:54 PM, Michael Wechner wrote:
>
>> Tim Hannigan wrote:
>>
>>>
>>>
>>> One technique would be to somehow set a timed cache on just that  
>>> pipeline; however it looks like expires cache (as per the Cocoon  
>>> docs) is only available as of Cocoon 2.1.9 and my IT dept is set  on 
>>> using Cocoon 2.1.7 for now (also I'm not even sure that 2.1.9  is 
>>> compatible with Lenya?).
>>
>>
>>
>> are you refering to Lenya 1.2.x ? or 1.4-dev?
>>
>> Michi
>>
>>>
>>> -- 
>>> Tim Hannigan                           Manager, Electronic  
>>> Communications                Marketing & Communications       
>>> Queen's University
>>> Kingston ON     K7L 3N6
>>> Phone:  613-533-6000 ext. 74126
>>> Fax:            613-533-6652
>>>
>>>
>>>
>>
>>
>> -- 
>> Michael Wechner
>> Wyona      -   Open Source Content Management   -    Apache Lenya
>> http://www.wyona.com                      http://lenya.apache.org
>> michael.wechner@wyona.com                        michi@apache.org
>> +41 44 272 91 61
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


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


Re: Caching Aggregation of Directories

Posted by Tim Hannigan <ti...@queensu.ca>.
We're using Lenya 1.2.4 with TinyMCE 2.0.6.1

-Tim



On 16-Aug-06, at 4:54 PM, Michael Wechner wrote:

> Tim Hannigan wrote:
>
>>
>>
>> One technique would be to somehow set a timed cache on just that  
>> pipeline; however it looks like expires cache (as per the Cocoon  
>> docs) is only available as of Cocoon 2.1.9 and my IT dept is set  
>> on using Cocoon 2.1.7 for now (also I'm not even sure that 2.1.9  
>> is compatible with Lenya?).
>
>
> are you refering to Lenya 1.2.x ? or 1.4-dev?
>
> Michi
>
>>
>> -- 
>> Tim Hannigan                           Manager, Electronic  
>> Communications                Marketing & Communications       
>> Queen's University
>> Kingston ON     K7L 3N6
>> Phone:  613-533-6000 ext. 74126
>> Fax:            613-533-6652
>>
>>
>>
>
>
> -- 
> Michael Wechner
> Wyona      -   Open Source Content Management   -    Apache Lenya
> http://www.wyona.com                      http://lenya.apache.org
> michael.wechner@wyona.com                        michi@apache.org
> +41 44 272 91 61
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>


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


Re: Caching Aggregation of Directories

Posted by Michael Wechner <mi...@wyona.com>.
Tim Hannigan wrote:

>
>
> One technique would be to somehow set a timed cache on just that 
> pipeline; however it looks like expires cache (as per the Cocoon docs) 
> is only available as of Cocoon 2.1.9 and my IT dept is set on using 
> Cocoon 2.1.7 for now (also I'm not even sure that 2.1.9 is compatible 
> with Lenya?).


are you refering to Lenya 1.2.x ? or 1.4-dev?

Michi

>
> -- 
> Tim Hannigan                           
> Manager, Electronic Communications                
> Marketing & Communications      
> Queen's University
> Kingston ON     K7L 3N6
> Phone:  613-533-6000 ext. 74126
> Fax:            613-533-6652
>
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


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


Re: Caching Aggregation of Directories

Posted by Tim Hannigan <ti...@queensu.ca>.
Thanks a million, I'll get on trying this out today.

-Tim


On 16-Aug-06, at 7:52 PM, solprovider@apache.org wrote:

> On 8/16/06, Tim Hannigan <ti...@queensu.ca> wrote:
>> Solprovider - I've managed to use the aggregate files piece
>> (http://solprovider.com/lenya/aggregatefiles) that you
>> wrote months back and it's great.
> Thanks.  It is nice to have one's work appreciated.
>
> [Summary: We tag documents and dynamically produce a report of
> documents with specific tags.  Producing the report is
> processing-intensive and we would like to use caching to improve
> performance. Lenya-1.2.4.]
>
>> I'm looking for a way to cache the dump pipeline (so that we don't  
>> have to
>> aggregate the entire site each time a newsAggregator doctype is  
>> accessed).
>> I've looked into a few options and I'm looking for some advice on  
>> which to
>> go forward with.
>>
>> One technique would be to somehow set a timed cache on just that  
>> pipeline;
>> however it looks like expires cache (as per the Cocoon docs) is only
>> available as of Cocoon 2.1.9 and my IT dept is set on using Cocoon  
>> 2.1.7 for
>> now (also I'm not even sure that 2.1.9 is compatible with Lenya?).
>>
>> A second technique I've considered would be to use the File  
>> Generator (which
>> uses cache very nicely) to bring in an xml site dump as a file;  
>> this file
>> would have to be generated outside of this pipeline, and would be a
>> precondition for the newsAggregator pipeline executing.
>> This leads me to consider 2 sub-options:
>> i) run a scheduled process that would call the $pubname/ 
>> siteAggregator.xml
>> url, then take the xml output and write it to a file in the  
>> publication's
>> work directory.
>> I'm not entirely sure how Cocoon's scheduler works, but I suppose  
>> I could
>> have a shell script on a cron job that's doing a CURL. I'd love to  
>> do it
>> internally in Cocoon if I could.
>> ii) somehow leverage Lucene's site dump and use that instead.
>> I haven't used Lucene yet, so I'm not really sure how to use it in  
>> this
>> context. Am I correct to assume that Lucene has a cron job that  
>> generates a
>> dump on a prescribed timeline?
>
> This breaks into three functions:
> 1. Cache the results.
> 2. Use the cache if it exists.
> 3. Delete the cache on a schedule.
>
> The first two functions are built into publication-sitemap.xml in
> Lenya-1.2.  It was disabled in 1.2.4 by adding "disabled" to the match
> of the pipeline.
>
> Another examples is at:
> http://solprovider.com/lenya/cache
>
> This handles the issues of not caching pages if the visitor is logged
> in, or if there is a query string.  None of the expanded functionality
> matters in your case, but it shows the important lines from the
> standard publication-sitemap.xmap.  See the "Check Cache" and "Create
> Cache" commented sections.
>
> map:read is easy.  The WriteSourceTransformer is more complicated, and
> is documented at:
> http://cocoon.apache.org/2.1/userdocs/sourcewriting-transformer.html
>
> You may want to change the cache directory.  You may need custom
> addSourceTags.xsl and removeSourceTags.xsl.  Or maybe it will just
> work.
>
> ---
> #3 may require thought.  I have not used Lenya's Scheduler; my few
> attempts did not work, and I did not put much effort into it.  Maybe
> someone else can assist with it.
>
> #3 can be solved easily with a cron job that just deletes the files
> from the cache (assuming you are using a real operating system.)  That
> should take almost 30 seconds for a shell programmer.  If the files
> are deleted, then the "Check Cache" code fails, and "Create Cache" is
> called.
>
> solprovider
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>


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


Re: Caching Aggregation of Directories

Posted by Michael Wechner <mi...@wyona.com>.
solprovider@apache.org wrote:

>
> ---
> #3 may require thought.  I have not used Lenya's Scheduler; my few
> attempts did not work, and I did not put much effort into it.  Maybe
> someone else can assist with it.
>
> #3 can be solved easily with a cron job that just deletes the files
> from the cache (assuming you are using a real operating system.)  That
> should take almost 30 seconds for a shell programmer.  If the files
> are deleted, then the "Check Cache" code fails, and "Create Cache" is
> called.


as an alternative you might also want to enhance the "publish task" 
slightly which would
delete the cache when something is being published. This would make the 
cron resp. scheduler obsolete.

IIRC correctly we did this for our own Wyona publication, but would have 
to dig a bit to find how we actually
did it.

HTH

Michi

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


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


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


Re: Caching Aggregation of Directories

Posted by so...@apache.org.
On 8/16/06, Tim Hannigan <ti...@queensu.ca> wrote:
> Solprovider - I've managed to use the aggregate files piece
> (http://solprovider.com/lenya/aggregatefiles) that you
> wrote months back and it's great.
Thanks.  It is nice to have one's work appreciated.

[Summary: We tag documents and dynamically produce a report of
documents with specific tags.  Producing the report is
processing-intensive and we would like to use caching to improve
performance. Lenya-1.2.4.]

> I'm looking for a way to cache the dump pipeline (so that we don't have to
> aggregate the entire site each time a newsAggregator doctype is accessed).
> I've looked into a few options and I'm looking for some advice on which to
> go forward with.
>
> One technique would be to somehow set a timed cache on just that pipeline;
> however it looks like expires cache (as per the Cocoon docs) is only
> available as of Cocoon 2.1.9 and my IT dept is set on using Cocoon 2.1.7 for
> now (also I'm not even sure that 2.1.9 is compatible with Lenya?).
>
> A second technique I've considered would be to use the File Generator (which
> uses cache very nicely) to bring in an xml site dump as a file; this file
> would have to be generated outside of this pipeline, and would be a
> precondition for the newsAggregator pipeline executing.
> This leads me to consider 2 sub-options:
> i) run a scheduled process that would call the $pubname/siteAggregator.xml
> url, then take the xml output and write it to a file in the publication's
> work directory.
> I'm not entirely sure how Cocoon's scheduler works, but I suppose I could
> have a shell script on a cron job that's doing a CURL. I'd love to do it
> internally in Cocoon if I could.
> ii) somehow leverage Lucene's site dump and use that instead.
> I haven't used Lucene yet, so I'm not really sure how to use it in this
> context. Am I correct to assume that Lucene has a cron job that generates a
> dump on a prescribed timeline?

This breaks into three functions:
1. Cache the results.
2. Use the cache if it exists.
3. Delete the cache on a schedule.

The first two functions are built into publication-sitemap.xml in
Lenya-1.2.  It was disabled in 1.2.4 by adding "disabled" to the match
of the pipeline.

Another examples is at:
http://solprovider.com/lenya/cache

This handles the issues of not caching pages if the visitor is logged
in, or if there is a query string.  None of the expanded functionality
matters in your case, but it shows the important lines from the
standard publication-sitemap.xmap.  See the "Check Cache" and "Create
Cache" commented sections.

map:read is easy.  The WriteSourceTransformer is more complicated, and
is documented at:
http://cocoon.apache.org/2.1/userdocs/sourcewriting-transformer.html

You may want to change the cache directory.  You may need custom
addSourceTags.xsl and removeSourceTags.xsl.  Or maybe it will just
work.

---
#3 may require thought.  I have not used Lenya's Scheduler; my few
attempts did not work, and I did not put much effort into it.  Maybe
someone else can assist with it.

#3 can be solved easily with a cron job that just deletes the files
from the cache (assuming you are using a real operating system.)  That
should take almost 30 seconds for a shell programmer.  If the files
are deleted, then the "Check Cache" code fails, and "Create Cache" is
called.

solprovider

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


Caching Aggregation of Directories

Posted by Tim Hannigan <ti...@queensu.ca>.
Solprovider - I've managed to use the aggregate files piece (http:// 
solprovider.com/lenya/aggregatefiles) that you wrote months back and  
it's great.

Here at Queen's University, we're using Lenya as our Campus-wide CMS,  
and this aggregation is a critical piece of an integrated strategy.
Every new publication that comes on board is armed with a "Queen's  
Default" publication to work from. This publication comes with the  
basic Queen's template built-in, as well as many of the features  
we've developed.


One such feature is what we're calling "tagging-based  
newsAggregation" (works somewhat similar to Flickr based tagging).

With this feature, there are a few components.
Firstly, there is a pipeline in each publication matching the url  
$pubname/siteAggregator.xml that will do a dump of the content in the  
publication.
Next, we have a custom doctype called "newsAggregator" that is being  
passed the publication xml dump ($pubname/siteAggregator.xml).
Each instance of a newsAggregator will use it's own keywords meta  
data (string tokenized by a comma) to find other pages on the site  
that also contain those keywords in their meta data.
When found, we're printing out the title of each page, followed by  
the meta description and the link. This doctype also creates an  
associated RSS feed of the found items.
The end result is an intuitive way to create RSS feeds and  
aggregation (albeit a simple filter at the moment, this could be  
expanded through boolean string functions).

For a simple example of it, check out this site: http:// 
lenya.adv.queensu.ca/queens_centre/news.html
You'll notice that in this publication, we have 2 instances of a  
newsAggregator (the "news" tab and the "events" tab) each using  
different filtering conditions (and generating their own respective  
RSS feeds).

Now, on a small site, this technique works quite well. It's clean,  
easy to use, and quite powerful (well-formed RSS feeds are being  
created by people who couldn't even tell you what RSS stands for).

However, on a larger site, this technique inevitably slows down  
performance.

I'm looking for a way to cache the dump pipeline (so that we don't  
have to aggregate the entire site each time a newsAggregator doctype  
is accessed). I've looked into a few options and I'm looking for some  
advice on which to go forward with.

One technique would be to somehow set a timed cache on just that  
pipeline; however it looks like expires cache (as per the Cocoon  
docs) is only available as of Cocoon 2.1.9 and my IT dept is set on  
using Cocoon 2.1.7 for now (also I'm not even sure that 2.1.9 is  
compatible with Lenya?).

A second technique I've considered would be to use the File Generator  
(which uses cache very nicely) to bring in an xml site dump as a  
file; this file would have to be generated outside of this pipeline,  
and would be a precondition for the newsAggregator pipeline executing.
This leads me to consider 2 sub-options:
i) run a scheduled process that would call the $pubname/ 
siteAggregator.xml url, then take the xml output and write it to a  
file in the publication's work directory.
I'm not entirely sure how Cocoon's scheduler works, but I suppose I  
could have a shell script on a cron job that's doing a CURL. I'd love  
to do it internally in Cocoon if I could.
ii) somehow leverage Lucene's site dump and use that instead.
I haven't used Lucene yet, so I'm not really sure how to use it in  
this context. Am I correct to assume that Lucene has a cron job that  
generates a dump on a prescribed timeline?

Some advice would greatly be appreciated,
Thanks,

-Tim

-- 
Tim Hannigan
Manager, Electronic Communications
Marketing & Communications
Queen's University
Kingston ON     K7L 3N6
Phone:  613-533-6000 ext. 74126
Fax:            613-533-6652




Re: usecase view without jxtemplate?

Posted by so...@apache.org.
On 8/15/06, Joern Nettingsmeier <po...@uni-due.de> wrote:
> i'm trying to integrate the tinymce editor into lenya 1.4, based on a
> skeleton module from wyona.
>
> tinymce has this cool feature that allows you to turn arbitrary elements
> into editor instances. that means you can tell it to take over
> "div#body", and you don't need to do any ugly pre-processing. basically
> you can take the page as is and add some javascript, and it becomes
> editable.
>
> now i want to circumvent the jxtemplate mechanism, because with it you
> get all kinds of cruft by default, such as the lenya logo and a complete
> set of html headers. not nice.
> i found that you can specify a cocoon source as usecase view in the
> xconf patchfile, which i did.
>
> now i'm creating the usecase view in the module sitemap, but the problem
> is that i need access to the continuation id and the name of the
> usecase. in a jxtemplate, i could do this (taken from the fckeditor module):
> <input type="hidden" name="lenya.continuation"
>        value="${continuation.id}"/>
> <input type="hidden" name="lenya.usecase"
>        value="${usecase.getName()}"/>
>
> is there any way to access this information via an input module in a
> sitemap?

(The following is based on Lenya 1.2 and Cocoon 2.1.9, but it should
apply to 1.4.)

{flow-continuation:???}
The FlowContinuationModule will return any attribute from the
WebContinuation.  I could not find any code that sets attributes in a
WebContinuation.  There is even a JS function to set them, but I could
not find anthing that uses it.

{flow-attribute:???}
The FlowAttributeModule returns any attribute from the
"cocoon.flow.context" object.  I am not certain it exists.

{request-param:lenya.continuation}
{request-param:lenya.usecase}
These should return the POSTed fields.

<map:match type="usecase" pattern="*">
{1} should be the lenya.usecase.  Use nested matches if you also need the URL.

Hope that helps,
solprovider

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