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/09/04 17:44:24 UTC

Re: usecase view without jxtemplate?

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: 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