« Return to Thread: Re: dynamic cForm generation

Re: RE: dynamic cForm generation

by Patrick Heiden :: Rate this Message:

Reply to Author | View in Thread

Hi Robby,

of course I'll take a look ;)

But meanwhile I found 'the reason' why I get this error:

It is because I use a jxTemplateGenerator and include jx-macros!
There some will find the following macro:

<!--
ft:form-template:
preferred syntax is now "ft:form"
(we know we're in a template)
-->
    <jx:macro name="form-template" targetNamespace="http://apache.org/cocoon/forms/1.0#template">
      <jx:set var="localeSitemapParameter" value="${cocoon.parameters.getParameter('locale', '')}"/>
      <jx:set var="cformsHelper" value="#{org.apache.cocoon.forms.generation.JXMacrosHelper.createHelper($cocoon/consumer,$cocoon/request,$localeSitemapParameter)}"/>
      <jx:set var="form" value="${cformsHelper.getForm(CocoonFormsInstance, cocoon.parameters['attribute-name'])}"/>
      <jx:if test="${cformsHelper.isVisible(form)}">
        <jx:set var="cformsDummy" value="${cformsHelper.startForm(form, macro.arguments)}"/>
        <!-- the form is also the current widget -->
        <jx:set var="widget" value="${form}"/>
        <jx:evalBody/>
        <jx:set var="cformsDummy" value="${cformsHelper.endForm()}"/>
      </jx:if>
    </jx:macro>

And this one 'kicks' me out, because within my template generation each <ft:form-template>-Tag gets replaced at form-template...

So could anybody give advice while I'm checking Robbys hints?

Cheers,
Patrick

-------- Original-Nachricht --------
> Datum: Fri, 5 Jun 2009 14:25:34 +0200
> Von: "Robby Pelssers" <robby.pelssers@...>
> An: users@...
> Betreff: RE: dynamic cForm generation

> We've done the same thing in the past but back then they were already
> working on a form library.
>
> http://cocoon.apache.org/2.1/userdocs/formlibraries.html
>
> Why don't you see if this will fill your needs.
>
> Robby
>
> -----Original Message-----
> From: Patrick Heiden [mailto:patrickheiden@...]
> Sent: Friday, June 05, 2009 2:08 PM
> To: users@...
> Cc: rashel.s@...
> Subject: Re: dynamic cForm generation
>
> Hello together!
>
> Has anybody (maybe Rashel Shehata him/herself) solved the issue mentioned
> in
>
> http://markmail.org/message/delryq7vo2t34keb
>
> There Rashel tries to generate fd and ft dynamically and gets the
> following error:
>
> org.apache.cocoon.forms.FormsRuntimeException: The template cannot find a
> form object
>
> I am stuck at the same point and very interested in solutions!
>
> Best regards,
> Patrick
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...

--
GMX FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss nur 17,95 Euro/mtl.!
http://dslspecial.gmx.de/freedsl-aktionspreis/?ac=OM.AD.PD003K11308T4569a

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Re: dynamic cForm generation