Leszek Gawron wrote:
> oceatoon wrote:
>> Hi every one
>> Sorry this went into another post.
>>
>> I have been using this since a while in many different situations:
>> <jx:set var="langlist" value="en,fr,de,es"/>
>> <jx:forEach var="langitem" items="${java.util.StringTokenizer( langlist ,
>> ',' )}">
>> ${langitem}
>> </jx:forEach>
>>
>> Not very complicated, hey ;-)
>>
>> Today I wanted to make my CForms model a bit dynamic:
>> so in Flow I call
>> var form = new Form("cocoon:/forms/masterform_model");
>>
>> my pipeline is as simple as this
>> <map:match pattern="forms/masterform_model">
>> <map:generate type="jx" src="forms/masterform_model.xml"/>
>> <map:serialize type="xml"/>
>> </map:match>
>>
>> and in my model I use the above JX code , for the first time the
>> ${java.util.StringTokenizer( langlist , ',' )} returns nothing???
>> therefore
>> the forEach either, I manage to get the forEach to work with a
>> begin-end-step structure but I have no idea in this use case why it
>> doesn't feel like working??
>>
>> Am I missing something or should this go down the JxTemplate BugBox?
>> Regards
>> Tibor
> I have a solution for you:
> var form = new Form("cocoon:/forms/masterform_model.flow");
>
> <map:match pattern="forms/masterform_model.flow">
> <map:call function="masterFormModel"/>
> </map:match>
>
> <map:match pattern="forms/masterform_model">
> <map:generate type="jx" src="forms/masterform_model.xml"/>
> <map:serialize type="xml"/>
> </map:match>
>
> in your flowscript:
>
> function masterFormModel() {
> cocoon.sendPage( "forms/masterform_model", {} );
> }
>
>
> and please do not ask me why :) got no idea really. We have observed
> some weird JEXL behaviour when jxtg is not invoked from flow.
>
In other words the problem comes from calling my JXTemplate from the sitemap
and not FLow. I'm happy that it has allready been noticed. Thanks for the
hack but I rather generate it through xsl in this case, Thx.
I'm following the post in dev, I wont ask you why but Hope someone knows.
Djeiki
Tibor
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]