You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Simone Gianni (JIRA)" <ji...@apache.org> on 2005/11/15 17:00:27 UTC

[jira] Created: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
-------------------------------------------------------------

         Key: COCOON-1685
         URL: http://issues.apache.org/jira/browse/COCOON-1685
     Project: Cocoon
        Type: Bug
  Components: Blocks: Forms  
    Versions: 2.1.8-dev (Current SVN)    
    Reporter: Simone Gianni


In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.

IMMO there are the following possible solutions :
- remove this event broadcast.
- send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
- add a "PROCESS_INITIALIZED" phase event and send this one at this point.

I can produce the patch if needed, but don't know which solution is the best one.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1685?page=comments#action_12362931 ] 

Jean-Baptiste Quenot commented on COCOON-1685:
----------------------------------------------

Thanks for reporting, however could you provide an example or testcase to understand better what you want to achieve? 

> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
> -------------------------------------------------------------
>
>          Key: COCOON-1685
>          URL: http://issues.apache.org/jira/browse/COCOON-1685
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Forms
>     Versions: 2.1.8
>     Reporter: Simone Gianni

>
> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
> IMMO there are the following possible solutions :
> - remove this event broadcast.
> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
> I can produce the patch if needed, but don't know which solution is the best one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by "Sylvain Wallez (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1685?page=comments#action_12366913 ] 

Sylvain Wallez commented on COCOON-1685:
----------------------------------------

I think the 3rd solution makes most sense, as it allows listeners to be triggered both before and after the request has been added.

And if some actions have to be taken at form creation time, there's the <on-create> listener, which is called before binding

> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
> -------------------------------------------------------------
>
>          Key: COCOON-1685
>          URL: http://issues.apache.org/jira/browse/COCOON-1685
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Forms
>     Versions: 2.1.8
>     Reporter: Simone Gianni

>
> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
> IMMO there are the following possible solutions :
> - remove this event broadcast.
> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
> I can produce the patch if needed, but don't know which solution is the best one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by "Simone Gianni (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1685?page=all ]
     
Simone Gianni closed COCOON-1685:
---------------------------------

    Resolution: Fixed

Committed fix

> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
> -------------------------------------------------------------
>
>          Key: COCOON-1685
>          URL: http://issues.apache.org/jira/browse/COCOON-1685
>      Project: Cocoon
>         Type: Bug

>   Components: Blocks: Forms
>     Versions: 2.1.8
>     Reporter: Simone Gianni
>  Attachments: process_initialize.diff
>
> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
> IMMO there are the following possible solutions :
> - remove this event broadcast.
> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
> I can produce the patch if needed, but don't know which solution is the best one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by Antonio Gallardo <ag...@agssa.net>.
Thanks David.

Best Regards,

Antonio Gallardo.

David Crossley escribió:
> Antonio Gallardo wrote:
>   
>> Pier ping! :-)
>>     
>
> There are other people here who can do that.
>
> Simone, i found that you have two Jira usernames
> s.gianni and s.gianni@...
> The latter only had one issue, so i moved it to
> the other user. However, i could not delete the
> s.gianni@... user because it has a stack of filters.
> Anyway, i added them both to the cocoon-developers
> group.
>
> -David
>   


Re: [jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by David Crossley <cr...@apache.org>.
Antonio Gallardo wrote:
> Pier ping! :-)

There are other people here who can do that.

Simone, i found that you have two Jira usernames
s.gianni and s.gianni@...
The latter only had one issue, so i moved it to
the other user. However, i could not delete the
s.gianni@... user because it has a stack of filters.
Anyway, i added them both to the cocoon-developers
group.

-David

> Simone Gianni escribi??:
> >Hi Antonio,
> >you are defitively right, sorry, but since I've not yet been granted
> >jira rights i didn't noticed i could close that one :)
> >
> >Could someone grant me jira rights?
> >
> >Simone
> >
> >Antonio Gallardo (JIRA) wrote:
> >
> >>Antonio Gallardo commented on COCOON-1685:
> >>------------------------------------------
> >>
> >>You should close this issue if you already committed the fix.

Re: [jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by Antonio Gallardo <ag...@agssa.net>.
Pier ping! :-)

Best Regards,

Antonio Gallardo.

Simone Gianni escribió:
> Hi Antonio,
> you are defitively right, sorry, but since I've not yet been granted
> jira rights i didn't noticed i could close that one :)
>
> Could someone grant me jira rights?
>
> Simone
>
> Antonio Gallardo (JIRA) wrote:
>
>   
>>    [ http://issues.apache.org/jira/browse/COCOON-1685?page=comments#action_12377578 ] 
>>
>> Antonio Gallardo commented on COCOON-1685:
>> ------------------------------------------
>>
>> You should close this issue if you already committed the fix.
>>
>>  
>>
>>     
>>> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
>>> -------------------------------------------------------------
>>>
>>>         Key: COCOON-1685
>>>         URL: http://issues.apache.org/jira/browse/COCOON-1685
>>>     Project: Cocoon
>>>        Type: Bug
>>>    
>>>
>>>       
>>  
>>
>>     
>>>  Components: Blocks: Forms
>>>    Versions: 2.1.8
>>>    Reporter: Simone Gianni
>>> Attachments: process_initialize.diff
>>>
>>> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
>>> IMMO there are the following possible solutions :
>>> - remove this event broadcast.
>>> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
>>> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
>>> I can produce the patch if needed, but don't know which solution is the best one.
>>>    
>>>
>>>       
>>  
>>
>>     
>
>   


Re: [jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by Simone Gianni <s....@thebug.it>.
Hi Antonio,
you are defitively right, sorry, but since I've not yet been granted
jira rights i didn't noticed i could close that one :)

Could someone grant me jira rights?

Simone

Antonio Gallardo (JIRA) wrote:

>    [ http://issues.apache.org/jira/browse/COCOON-1685?page=comments#action_12377578 ] 
>
>Antonio Gallardo commented on COCOON-1685:
>------------------------------------------
>
>You should close this issue if you already committed the fix.
>
>  
>
>>Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
>>-------------------------------------------------------------
>>
>>         Key: COCOON-1685
>>         URL: http://issues.apache.org/jira/browse/COCOON-1685
>>     Project: Cocoon
>>        Type: Bug
>>    
>>
>
>  
>
>>  Components: Blocks: Forms
>>    Versions: 2.1.8
>>    Reporter: Simone Gianni
>> Attachments: process_initialize.diff
>>
>>In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
>>IMMO there are the following possible solutions :
>>- remove this event broadcast.
>>- send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
>>- add a "PROCESS_INITIALIZED" phase event and send this one at this point.
>>I can produce the patch if needed, but don't know which solution is the best one.
>>    
>>
>
>  
>

-- 
Simone Gianni

[jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by "Antonio Gallardo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1685?page=comments#action_12377578 ] 

Antonio Gallardo commented on COCOON-1685:
------------------------------------------

You should close this issue if you already committed the fix.

> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
> -------------------------------------------------------------
>
>          Key: COCOON-1685
>          URL: http://issues.apache.org/jira/browse/COCOON-1685
>      Project: Cocoon
>         Type: Bug

>   Components: Blocks: Forms
>     Versions: 2.1.8
>     Reporter: Simone Gianni
>  Attachments: process_initialize.diff
>
> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
> IMMO there are the following possible solutions :
> - remove this event broadcast.
> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
> I can produce the patch if needed, but don't know which solution is the best one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by "Simone Gianni (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1685?page=all ]

Simone Gianni updated COCOON-1685:
----------------------------------

    Attachment: process_initialize.diff

PATCH for the issue

> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
> -------------------------------------------------------------
>
>          Key: COCOON-1685
>          URL: http://issues.apache.org/jira/browse/COCOON-1685
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Forms
>     Versions: 2.1.8
>     Reporter: Simone Gianni
>  Attachments: process_initialize.diff
>
> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
> IMMO there are the following possible solutions :
> - remove this event broadcast.
> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
> I can produce the patch if needed, but don't know which solution is the best one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by "Simone Gianni (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/COCOON-1685?page=comments#action_12367041 ] 

Simone Gianni commented on COCOON-1685:
---------------------------------------

Added a PROCESS_INITIALIZE event type, now this event is broadcasted as the first event. 

Note that LOAD_MODEL and SAVE_MODEL are not used. LOAD_MODEL was incorrectly broadcasted instead of the new event i added, while SAVE_MODEL seems to have no references. I suppose this events should be broadcasted when a binding is applied.

> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
> -------------------------------------------------------------
>
>          Key: COCOON-1685
>          URL: http://issues.apache.org/jira/browse/COCOON-1685
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Forms
>     Versions: 2.1.8
>     Reporter: Simone Gianni
>  Attachments: process_initialize.diff
>
> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
> IMMO there are the following possible solutions :
> - remove this event broadcast.
> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
> I can produce the patch if needed, but don't know which solution is the best one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (COCOON-1685) Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/COCOON-1685?page=all ]

Jean-Baptiste Quenot updated COCOON-1685:
-----------------------------------------


Waiting for an example

> Additional ProcessingPhase.READ_FROM_REQUEST_VALUE event sent
> -------------------------------------------------------------
>
>          Key: COCOON-1685
>          URL: http://issues.apache.org/jira/browse/COCOON-1685
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Forms
>     Versions: 2.1.8
>     Reporter: Simone Gianni

>
> In the Form.process() method, there is a listener.phaseEnded on line 296 which sends a LOAD_MODEL_VALUE the first time the form is executed, and a READ_FROM_REQUEST_VALUE all the other times. If a ProcessingPhaseListener is registered it will receive a READ_FROM_REQUEST_VALUE before the request has been processed, and another one after.
> IMMO there are the following possible solutions :
> - remove this event broadcast.
> - send this event only if phase is LOAD_MODEL_VALUE, so that this event takes his chance to get broadcasted, while the spurious one doesn't.
> - add a "PROCESS_INITIALIZED" phase event and send this one at this point.
> I can produce the patch if needed, but don't know which solution is the best one.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira