You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/10/18 00:49:27 UTC

DO NOT REPLY [Bug 23901] New: - [PATCH] [woody], adding and moving load() and save() to Form.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23901>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23901

[PATCH] [woody], adding <wd:on-phase> and moving load() and save() to Form.

           Summary: [PATCH] [woody], adding <wd:on-phase> and moving load()
                    and save() to Form.
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: ramy@imkenberg.de


Hi,

This is a patch file for the woody block, which contains :

- adding <wd:on-phase> for the form definition, which define a phase listener on
the form.

- making load() and save() part of the Form class, with minimum changes to the
woody interfaces.

--------------------

the patch was created using a command :

 $COCOON_HOME/src/blocks/woody> cvs diff -u > woody-changes.diff

-------------------

The changed files :

- java/org/apache/cocoon/woody/flow/javascript/woody2.js

- java/org/apache/cocoon/woody/formmodel/AbstractWidgetDefinitionBuilder.java

- java/org/apache/cocoon/woody/formmodel/Form.java

- java/org/apache/cocoon/woody/formmodel/FormDefinition.java

- java/org/apache/cocoon/woody/formmodel/FormDefinitionBuilder.java

------------------

TODO :
------

- The patch didn't change any interface methods to maintain a comptability for
other blocks (like Apples),
I think if this patch is accepted, some interfaces might need changes for making
the code better, like FormManager.createForm(Source source),
to add the binding source as well, and remove the binding construction from
woody2.js

- cleaning up the TODO and FIXME added to show what changes were made.

- Listeners are limited to only one listener per difinition ( single listener
variable),
that should be be fixed to allow multiple listsners from the same type?
like many action listsner on the same action widget?

- To add <wd:on-phase>, I had to change buildAnotherWidgetDefinition() method,
This method was throwing exception if there's no builder for the the "wd" element,
what do you think?

- Make the avalon cycled widget listeners.

- Write some documentations about the new stuff [partialy done].

Re: DO NOT REPLY [Bug 23901] New: - [PATCH] [woody], adding and moving load() and save() to Form.

Posted by Torsten Curdt <tc...@vafer.org>.
Ramy Mamdouh wrote:

> Torsten Curdt wrote:
> 
>>> [PATCH] [woody], adding <wd:on-phase> and moving load() and save() to 
>>> Form.
>>
>>
>>
>> ...I hate the XMLForm phases concept. Can you elaborate on this patch? 
> 
> 
> The ProcessingPhaseListener was already there, I just make it possible
> to define it as a listener on the form xml definition using <wd:phase> .
> 
> This listener's single method phaseEnded( ProcessingPhaseEvent e)
> recieves several events when each processing phase ends, like
> ProcessingPhase.LOAD_MODEL , ProcessingPhase.VALIDATE , etc.

Ah...
so it's not about validation phases but phases of the processing :)
--
Torsten


Re: DO NOT REPLY [Bug 23901] New: - [PATCH] [woody], adding and moving load() and save() to Form.

Posted by Ramy Mamdouh <ra...@imkenberg.de>.
Torsten Curdt wrote:

>> [PATCH] [woody], adding <wd:on-phase> and moving load() and save() to 
>> Form.
>
>
> ...I hate the XMLForm phases concept. Can you elaborate on this patch? 

The ProcessingPhaseListener was already there, I just make it possible
to define it as a listener on the form xml definition using <wd:phase> .

This listener's single method phaseEnded( ProcessingPhaseEvent e)
recieves several events when each processing phase ends, like
ProcessingPhase.LOAD_MODEL , ProcessingPhase.VALIDATE , etc.

>
> -- 
> Torsten
>
>




Re: DO NOT REPLY [Bug 23901] New: - [PATCH] [woody], adding and moving load() and save() to Form.

Posted by Torsten Curdt <tc...@vafer.org>.
> [PATCH] [woody], adding <wd:on-phase> and moving load() and save() to Form.

...I hate the XMLForm phases concept. Can you elaborate on this patch?
--
Torsten