You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Guy Bashan <gu...@gmail.com> on 2008/08/21 15:01:52 UTC

[MyFaces][Tomahwak][Sandbox]

Hi,

 

I think I have already asked this question, but got no replay:

Is there a way autorefreshing 2 differen regions using PPR in a single
request (rather than 2.)

 

Thanks,

Guy.


RE: [MyFaces][Tomahwak][Sandbox] PPR refresh 2 regions

Posted by Guy Bashan <gu...@gmail.com>.
Hi,

Sorry, I didn't explain things correct.
I want to refresh several regions using PPR and periodical updates (periodicalUpdate property).

Thanks,
Guy.

-----Original Message-----
From: Gertjan van Oosten [mailto:gertjan@West.NL] 
Sent: Thursday, August 21, 2008 5:47 PM
To: MyFaces Discussion
Subject: Re: [MyFaces][Tomahwak][Sandbox] PPR refresh 2 regions

As quoted from Guy Bashan <gu...@gmail.com>:
> Is there a way autorefreshing 2 differen regions using PPR in a single request
> (rather than 2?)

That should work; I have forms like this:

  <h:form id="someForm">
    <h:selectOneMenu id="someSelect" ...>
      ...
    </h:selectOneMenu>

    <ts:pprPanelGroup id="pprOne"
	partialTriggers="someForm:someSelect(onchange)">
      ...
    </ts:pprPanelGroup>

    <ts:pprPanelGroup id="pprTwo"
	partialTriggers="someForm:someSelect(onchange)">
      ...
    </ts:pprPanelGroup>
  </h:form>

Kind regards,
-- 
-- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
-- gertjan@West.NL     +31 15 2191 600       www.west.nl


Re: [MyFaces][Tomahwak][Sandbox] PPR refresh 2 regions

Posted by Gertjan van Oosten <ge...@West.NL>.
As quoted from Guy Bashan <gu...@gmail.com>:
> Is there a way autorefreshing 2 differen regions using PPR in a single request
> (rather than 2?)

That should work; I have forms like this:

  <h:form id="someForm">
    <h:selectOneMenu id="someSelect" ...>
      ...
    </h:selectOneMenu>

    <ts:pprPanelGroup id="pprOne"
	partialTriggers="someForm:someSelect(onchange)">
      ...
    </ts:pprPanelGroup>

    <ts:pprPanelGroup id="pprTwo"
	partialTriggers="someForm:someSelect(onchange)">
      ...
    </ts:pprPanelGroup>
  </h:form>

Kind regards,
-- 
-- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
-- gertjan@West.NL     +31 15 2191 600       www.west.nl

RE: [MyFaces][Tomahwak][Sandbox]

Posted by Guy Bashan <gu...@gmail.com>.
Hi,
Nice workaround. that will work for me.

Thanks,
Guy.

-----Original Message-----
From: Ernst Fastl [mailto:ernst.fastl@gmail.com] 
Sent: Friday, August 22, 2008 1:12 AM
To: MyFaces Discussion
Subject: Re: [MyFaces][Tomahwak][Sandbox]

Sorry for the misunderstanding I thought you ment to use partialTrigger.

For periodicalUpdate what you want is unfortunatly not supported yet.
We would have to detect on the server side if two pprPanelGroups
have the same periodical update time and act accordingly ...

As a workaround you could specify partialTriggers to a commandButton
with no action and style="display:none" and write a small
javascript-function
which clicks this button every 5 seconds. This way you have only one
AJAX request every 5 seconds.

hope that helps

cheers

Ernst

On 8/21/08, Guy Bashan <gu...@gmail.com> wrote:
> Hi,
>
> Sorry to bug on this issue, but I am trying to understand it correctly.
What
> do you mean by: "trigger on the same input-element"? There are no input
> elements here. Just 2 PPR regions triggered in "periodicalUpdate" mode.
>
> For example:
> <s:pprPanelGroup id="region1"
> periodicalUpdate="5000">.....</s:pprPanelGroup>
> <s:pprPanelGroup id="region2"
> periodicalUpdate="5000">.....</s:pprPanelGroup>
>
> Thanks,
> Guy.
>
> -----Original Message-----
> From: Ernst Fastl [mailto:ernst.fastl@gmail.com]
> Sent: Thursday, August 21, 2008 10:14 PM
> To: MyFaces Discussion
> Subject: Re: [MyFaces][Tomahwak][Sandbox]
>
> Yes, if two different pprPanelGroups trigger on the same input-element
> both of them are refreshed with one AJAX request.
>
> On 8/21/08, Guy Bashan <gu...@gmail.com> wrote:
>> Hi,
>>
>>
>>
>> I think I have already asked this question, but got no replay:
>>
>> Is there a way autorefreshing 2 differen regions using PPR in a single
>> request (rather than 2.)
>>
>>
>>
>> Thanks,
>>
>> Guy.
>>
>>
>
>


Re: [MyFaces][Tomahwak][Sandbox]

Posted by Ernst Fastl <er...@gmail.com>.
Sorry for the misunderstanding I thought you ment to use partialTrigger.

For periodicalUpdate what you want is unfortunatly not supported yet.
We would have to detect on the server side if two pprPanelGroups
have the same periodical update time and act accordingly ...

As a workaround you could specify partialTriggers to a commandButton
with no action and style="display:none" and write a small javascript-function
which clicks this button every 5 seconds. This way you have only one
AJAX request every 5 seconds.

hope that helps

cheers

Ernst

On 8/21/08, Guy Bashan <gu...@gmail.com> wrote:
> Hi,
>
> Sorry to bug on this issue, but I am trying to understand it correctly. What
> do you mean by: "trigger on the same input-element"? There are no input
> elements here. Just 2 PPR regions triggered in "periodicalUpdate" mode.
>
> For example:
> <s:pprPanelGroup id="region1"
> periodicalUpdate="5000">.....</s:pprPanelGroup>
> <s:pprPanelGroup id="region2"
> periodicalUpdate="5000">.....</s:pprPanelGroup>
>
> Thanks,
> Guy.
>
> -----Original Message-----
> From: Ernst Fastl [mailto:ernst.fastl@gmail.com]
> Sent: Thursday, August 21, 2008 10:14 PM
> To: MyFaces Discussion
> Subject: Re: [MyFaces][Tomahwak][Sandbox]
>
> Yes, if two different pprPanelGroups trigger on the same input-element
> both of them are refreshed with one AJAX request.
>
> On 8/21/08, Guy Bashan <gu...@gmail.com> wrote:
>> Hi,
>>
>>
>>
>> I think I have already asked this question, but got no replay:
>>
>> Is there a way autorefreshing 2 differen regions using PPR in a single
>> request (rather than 2.)
>>
>>
>>
>> Thanks,
>>
>> Guy.
>>
>>
>
>

RE: [MyFaces][Tomahwak][Sandbox]

Posted by Guy Bashan <gu...@gmail.com>.
Hi,

Sorry to bug on this issue, but I am trying to understand it correctly. What
do you mean by: "trigger on the same input-element"? There are no input
elements here. Just 2 PPR regions triggered in "periodicalUpdate" mode.

For example:
<s:pprPanelGroup id="region1"
periodicalUpdate="5000">.....</s:pprPanelGroup>
<s:pprPanelGroup id="region2"
periodicalUpdate="5000">.....</s:pprPanelGroup>

Thanks,
Guy.

-----Original Message-----
From: Ernst Fastl [mailto:ernst.fastl@gmail.com] 
Sent: Thursday, August 21, 2008 10:14 PM
To: MyFaces Discussion
Subject: Re: [MyFaces][Tomahwak][Sandbox]

Yes, if two different pprPanelGroups trigger on the same input-element
both of them are refreshed with one AJAX request.

On 8/21/08, Guy Bashan <gu...@gmail.com> wrote:
> Hi,
>
>
>
> I think I have already asked this question, but got no replay:
>
> Is there a way autorefreshing 2 differen regions using PPR in a single
> request (rather than 2.)
>
>
>
> Thanks,
>
> Guy.
>
>


Re: [MyFaces][Tomahwak][Sandbox]

Posted by Ernst Fastl <er...@gmail.com>.
Yes, if two different pprPanelGroups trigger on the same input-element
both of them are refreshed with one AJAX request.

On 8/21/08, Guy Bashan <gu...@gmail.com> wrote:
> Hi,
>
>
>
> I think I have already asked this question, but got no replay:
>
> Is there a way autorefreshing 2 differen regions using PPR in a single
> request (rather than 2.)
>
>
>
> Thanks,
>
> Guy.
>
>