Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 17462 invoked from network); 9 Aug 2005 08:02:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Aug 2005 08:02:16 -0000 Received: (qmail 36844 invoked by uid 500); 9 Aug 2005 08:02:09 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 36805 invoked by uid 500); 9 Aug 2005 08:02:07 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 36792 invoked by uid 99); 9 Aug 2005 08:02:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2005 01:02:07 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mattom@gmx.at designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 09 Aug 2005 01:02:29 -0700 Received: (qmail invoked by alias); 09 Aug 2005 08:02:04 -0000 Received: from mail.aim-ag.com (EHLO [10.0.1.16]) [193.154.31.84] by mail.gmx.net (mp031) with SMTP; 09 Aug 2005 10:02:04 +0200 X-Authenticated: #7708740 Message-ID: <42F862FE.6000004@gmx.at> Date: Tue, 09 Aug 2005 10:02:06 +0200 From: Thomas Lutz User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050727) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: CForms: need some design help References: <20050808192256.41670.qmail@web60621.mail.yahoo.com> In-Reply-To: <20050808192256.41670.qmail@web60621.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N yep, thats quite the same approach. there's only one difference, my html renderer takes care of both form and no form content. Here are some fragments from my sitemap... This intercepts all requests that result in a edit form. I have similar matchers for views, details, deletes,... classical new edit delete stuff. Then the genericForm function goes crazy (do binding, attach formhandler, get data from by j2ee layer...) and quits with: form.show(tFormName + ".formobj.html"); This is handled by my generic renderer: The aggregator generates a document with menu and content information, the simple2page.xsl creates a content layout with some metatags, which are rendered to html (or someday to pdf...) with the second stylesheet. My header and footer is rather static, so I add it in the aim-page2html.xsl... but there's not much difference to your aggregation. The important line is: This calls some internal pipelines for content generation, and one of them generates the form: Don't ask me why I have the label="content1" stuff here, can't remember now .-). The line just calls a pipeline, that tests for a file with a form definition, and if there's no file generates a form definition from metadata, nothing special here... Could you post the exception, too ? Maybe it looks familiar to me, I had rather strange problems setting up my environment, too... (and right now I am stuck in some weird binding exceptions :-) ). :-), tom footh wrote: >I think I tried something very similar but I was >getting a null pointer exception. Perhaps if I showed >you some of my sitemap you could steer me in the right >direction. > >All pages go through this pipeline: > > > > > > > > >Now, the allPages function will set up the variable >map that I need for all my pages. Typically after >that, I would just use sendPage to send the process to >my "aggregation" pipeline that looks like this: > > > > > > > > > > > > > >Each "part" is a separate pipeline that generates the >XML I need for each piece. They are all just JX >generators. > >Anyway, in the allPages function from the flow, I >added logic to determine whether the main content was >a form. So instead of using sendPage to send it to >the above pipeline, I used form.show to send it to >this: > > > > > > > > > > > > > >Which is the same as the previous pipeline, except the >main content is generated with a different pipeline. >That pipeline looks like this: > > > > > src="forms/stylesheets/forms-main-styling.xsl"/> > > > >But, this gives me a null pointer exception which is >very difficult to track. I assumed it was because the >form definition file that was used when the new >FormInstance variable was constructed gets lost >because I'm going several pipelines deep rather than >just directly using the form transformer. Is this >similar to what you are doing? Can you give me some >pointer as to how I might be able to fix this? > > > > >--- Thomas Lutz wrote: > > > >>I had quite similar problems as you have, here's >>what I did: >> >>-each request is handled by a javaflow function >>-the request has some magic chars separating object >>from view type, so i >>have something like person.form.edit.do >>-so when i am in the right flow function, i prepare >>all data, do some >>CForm stuff with javaflow (I am sure you'll need >>help here, too :-) ), >>and the call form.show, which acts like a >>SendPageAndWait, as you said. >>-the trick is, i call >>form.show("person.form.edit.html"); which is >>handled by another pipeline, which does the >>aggregation of menu, header, >>footer, and -> content, by some other internal >>pipelines... >> >>I had to change some flow and generators, but now >>I've quite a clean >>pipeline setup... separating controller matchers >>from renderer matchers... >> >>I hope you know what I mean, I am starting to >>document that all soon, >>but for now there's no diagram of my pipeline flows >>yet, sorry... >> >>:-), >>tom >> >>footh wrote: >> >> >> >>>Over the past several weeks, I've converted 90% of >>> >>> >>my >> >> >>>site from JSP to Cocoon with excellent results. >>> >>> >>Now, >> >> >>>I'm attempting to convert my forms. I'd like to >>> >>> >>use >> >> >>>CForms, however, I am having trouble fitting the >>> >>> >>CForm >> >> >>>structure into my current site structure. >>> >>>Right now, when a user requests any .html page, >>> >>> >>they >> >> >>>are sent to a primary javaflow that sets a couple >>>important variables and then sends that data to >>>another pipeline which aggregrates five sources: >>> >>> >>the >> >> >>>header, footer, two sidebars and main content. >>> >>> >>Each >> >> >>>part of the aggregation is another pipeline that >>>generates the necessary XML for each piece. >>> >>>Now, I would like my forms to go through the same >>>flow. Of the five parts that are aggregated, the >>> >>> >>form >> >> >>>would be in the main content. The problem is, >>> >>> >>CForms >> >> >>>appears to have it's own process that you're stuck >>>with. I can't seem to figure out a way to >>> >>> >>integrate >> >> >>>it into my main flow. >>> >>>Once you call form.show in a javaflow, the pipeline >>>processing ends. And I can't figure out a way to >>>build my page via my standard flow, and then insert >>> >>> >>my >> >> >>>form as the main content. >>> >>>I've tried several different ideas that have all >>> >>> >>met >> >> >>>with failure. I was hoping someone with some >>> >>> >>CForms >> >> >>>experience could point me in the right direction. >>> >>> >>If >> >> >>>necessary, I can supply excerpts of my pipelines to >>>show what I am trying to do. >>> >>>Thanks, >>> >>>JF >>> >>>__________________________________________________ >>>Do You Yahoo!? >>>Tired of spam? Yahoo! Mail has the best spam >>> >>> >>protection around >> >> >>>http://mail.yahoo.com >>> >>> >>> >>--------------------------------------------------------------------- >> >> >>>To unsubscribe, e-mail: >>> >>> >>users-unsubscribe@cocoon.apache.org >> >> >>>For additional commands, e-mail: >>> >>> >>users-help@cocoon.apache.org >> >> >>> >>> >>> >>> >> >> >> >--------------------------------------------------------------------- > > >>To unsubscribe, e-mail: >>users-unsubscribe@cocoon.apache.org >>For additional commands, e-mail: >>users-help@cocoon.apache.org >> >> >> >> > > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >For additional commands, e-mail: users-help@cocoon.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org