You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Leonid Chumanov <lc...@framedoc.ru> on 2004/05/20 10:35:56 UTC

[CForms] How can I use dynamic attributes in woody forms?

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. Can I create the woody form using on input
SAX events, instead of a file?
 
I think, as a last solution I should use the repeater for creation of
dynamic fields, but it will essentially limit functionalities. 
 
Whether somebody can prompt me an optimum solution? Can anyone help
please?
 
Thanks
 
Leonid

Re: [CForms] How can I use dynamic attributes in woody forms?

Posted by u15603 <u1...@hs-harz.de>.
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. Can I create the woody form using on input
> SAX events, instead of a file?
>  
> I think, as a last solution I should use the repeater for creation of
> dynamic fields, but it will essentially limit functionalities. 
>  
> Whether somebody can prompt me an optimum solution? Can anyone help
> please?
>  
> Thanks
>  
> Leonid
> 
Hello,


I also create a dynamic workflow in cocoon with the help of cforms. I 
use a generator, who is generating an xml-stream, including the current 
input-fields or form-fields,  with the help of castor (bean2xml). After 
that i transform the sax-stream to the model-definition. I do the same 
procedure to create the template! In the flow script I load dynamicly 
the cform-model and call the coresponding template!

It works fine!

Dirk Gronert


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


Re: [CForms] How can I use dynamic attributes in woody forms?

Posted by Stephan Coboos <cr...@gmx.net>.
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. Can I create the woody form using on input
>SAX events, instead of a file?
> 
>I think, as a last solution I should use the repeater for creation of
>dynamic fields, but it will essentially limit functionalities. 
> 
>Whether somebody can prompt me an optimum solution? Can anyone help
>please?
>  
>

Oh yes, this feature I'am missing, too! It would be very nice! Like 
Wizard-Objects in .net ;-) Should we ask this in the dev list?

Regards
Stephan

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


Re: [CForms] How can I use dynamic attributes in woody forms?

Posted by Bruno Dumon <br...@outerthought.org>.
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
bruno@outerthought.org                          bruno@apache.org


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