You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Paul Mander <pa...@gmail.com> on 2010/07/20 11:57:22 UTC

[Trinidad] partialSubmit with an action

I've just picked up some code that was appearing to execute twice or even
three times for every request. I put some logging in a phase listener and a
custom faces servlet (delegates to a real one) so I could track the
requests.

I finally tracked the problem down to command components that declare an
action and partialSubmit="true". I've never actually seen a partial submit
with an action before and I can't quite fathom what trinidad is doing with
respect to this (I would have assumed that it would ignore the partial
submit as the entire view needs updating).

All I can see is the evidence that if I take off the partial submit I am
back to my single execution per user request.

Any thoughts as to if this is a bug in trinidad or a valid design pattern?

Paul
-- 
View this message in context: http://old.nabble.com/-Trinidad--partialSubmit-with-an-action-tp29213203p29213203.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] partialSubmit with an action

Posted by Walter Mourão <wa...@gmail.com>.
 On Tue, Jul 20, 2010 at 1:18 PM, Paul Mander <pa...@gmail.com>wrote:

> Can you explain why you are doing this? If you need to re-render the whole
> page (by returning null from a command action) then why are you using a
> partial submit? Surely a partial submit is to target a part of a view based
> on an action which you would normally bind to an action listener. Having an
> action and a partial submit (irrespective of the outcome) seems pointless.
>

Returning null does not re-render the whole page.
Generally I use the action listener to get some parameter value and the
action returns null to keep the partial submit behavior or returns some
outcome (to navigate to another page).


Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br

Re: [Trinidad] partialSubmit with an action

Posted by Paul Mander <pa...@gmail.com>.

Walter Mourão-2 wrote:
> 
> Actually the action can respond a null value and the partial submit works
> fine. I'm currently using this way, so I don't think the behavior you
> described is a general issue, maybe a localized bug.
> 

Can you explain why you are doing this? If you need to re-render the whole
page (by returning null from a command action) then why are you using a
partial submit? Surely a partial submit is to target a part of a view based
on an action which you would normally bind to an action listener. Having an
action and a partial submit (irrespective of the outcome) seems pointless. 
-- 
View this message in context: http://old.nabble.com/-Trinidad--partialSubmit-with-an-action-tp29213203p29216124.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] partialSubmit with an action

Posted by Walter Mourão <wa...@gmail.com>.
Hi Paul,

(I would have assumed that it would ignore the partial
> submit as the entire view needs updating).
>

Actually the action can respond a null value and the partial submit works
fine. I'm currently using this way, so I don't think the behavior you
described is a general issue, maybe a localized bug.

Cheers,

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br



On Tue, Jul 20, 2010 at 6:57 AM, Paul Mander <pa...@gmail.com>wrote:

>
> I've just picked up some code that was appearing to execute twice or even
> three times for every request. I put some logging in a phase listener and a
> custom faces servlet (delegates to a real one) so I could track the
> requests.
>
> I finally tracked the problem down to command components that declare an
> action and partialSubmit="true". I've never actually seen a partial submit
> with an action before and I can't quite fathom what trinidad is doing with
> respect to this (I would have assumed that it would ignore the partial
> submit as the entire view needs updating).
>
> All I can see is the evidence that if I take off the partial submit I am
> back to my single execution per user request.
>
> Any thoughts as to if this is a bug in trinidad or a valid design pattern?
>
> Paul
> --
> View this message in context:
> http://old.nabble.com/-Trinidad--partialSubmit-with-an-action-tp29213203p29213203.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>