On Wed, 2003-11-26 at 20:13, Panov, Wasili wrote: > > On Wed, 2003-11-26 at 18:32, Panov, Wasili wrote: > > > Hi there, > > > > > > I'm trying to generate the woody form definition from the > > database into the > > > xml stream. > > > How can I use it as Source without writing it down to the file ? > > > > By using the cocoon: protocol when specifying the form > > definition, i.e. > > "cocoon:/myformpipeline". > > > > Note that by doing things in this way, Woody's caching of form > > definitions will not work. This will cause the form definition object > > model to be rebuild each time a new form instance is > > requested, and thus > > also the execution of your form-generating pipeline. Your form > > definition will then also not be shared across form instances, causing > > increased memory usage. > > > > I'd recommend to generate your form definitions to files, at least for > > production environments. Or force pipeline caching in one way > > or another > > (if I remember well ther's now a pipeline implementation that allows > > this -- would need to check). > > > > Of course you're free to do things in whatever way you like, but then > > don't complain if Cocoon is slow :-) > > The reason because I need to regenarate the form on every request is > the project requirement to hide the fields/groups on-the-fly depens on > business data and back-end system. The back-end is also the reason, > cause we can't do it on the client side.
Depending on your exact needs, you might also be able to do this by using the JXTemplateGenerator to dynamically include widgets in the template. In the form definition they will of course always be present, but then they'll simply have null values. > At the moment I generate the "full" form/template/binding from the database, > > cache the streams, and strip it down with the "hide fields transformer" an > every request. > Sure, that increase the memory usage, but every form is session-specific in > this case. > > Every suggestion to do it better way and increase perfomance is welcome. See above. I wanted to warn you about this, but if it works fast enough and you're happy with it, that's the most important. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
