On Thu, 2004-05-20 at 10:35, Leonid Chumanov wrote:
> Hi
> 
>  
> 
> I want to use in my application (based on CForms (Woody))  dynamic
> attributes in forms. That is the information on what fields should
> contain in the form is formed dynamically. Use of a file with form
> definition therefore does not approach. 
> 
> I all over again hoped that in WOODY API there will be the methods
> allowing me to create Widget, to set its properties and to add it to
> the form in the program Java  code. Then I could do without reading a
> file of definition of the form. However I have not found such methods.
> Really I should do such unproductive thing: dynamic formation of a
> file of definition of the form during work of the program, and then
> use of it? It would be too unproductive.

With unproductive, you mean slow at runtime or a lot of work to create?

>  Can I create the woody form using on input SAX events, instead of a
> file?

sort of.

You can create a form based on any source. This source could be a Cocoon
pipeline which you can refer to using the "cocoon:" protocol. It doesn't
have to be a file that physically exists on disk. In the Cocoon pipeline
you could use XSLT to construct the form definition.

Furthermore, you can create a form definition from a DOM-tree. See the
interface FormManager.

Creating a form definition directly in Java code by constructing the
necessary objects yourself isn't supported at the moment. The original
implementation wasn't designed for that. However, there are ideas for
redesigning the form definition building process and this kind of use
should then become possible. This approach would be faster, and possibly
more convenient, then having to call a Cocoon pipeline.

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

Reply via email to