You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Paul Stanton <pa...@gunnsoft.com.au> on 2007/07/04 08:01:33 UTC

4.1.1 (or 4.1.2) Dojo Dialog escaping pageBeginRender

Hi all,

Currently I've got a couple of dialogs within a page. Each time a dialog 
is shown or hidden (via @EventLister annotation) the page's 
pageBeginRender method is called and this is more work than is necessary 
just do display a simple dialog.

Is there a way to detect that the call is being made by the dialog 
request and in that case, not execute exhaustive code?

Thanks, Paul.



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


Re: 4.1.1 (or 4.1.2) Dojo Dialog escaping pageBeginRender

Posted by Paul Stanton <pa...@gunnsoft.com.au>.
Jesse,

It is my own application code that I want to avoid. The ResponseBuilder 
solution works great.

Thanks.

Jesse Kuhnert wrote:
> You can inject the ResponseBuilder service and call
> ResponseBuilder.isDynamic() to avoid doing things you don't want to have
> happen in one vs. another instance.
>
> To be clear, ~everything~ that happens in a dynamic request should be the
> same as what happens in a normal request. (except maybe for json stuff)
>
> The overhead on Tapestrys end has been reduced to pretty much nothing now
> though,  so if there is any extra work going on it's in your own 
> application
> code.   It might be more ideal to try and do a direct rendering scheme at
> some point but I don't honestly think I'm going to try and do it for T4 -
> maybe T5 if Howard hasn't done it already.
>
> On 7/4/07, Paul Stanton <pa...@gunnsoft.com.au> wrote:
>>
>> Thanks Renat, unfortunately the dialog needs to be initialised
>> programmatically .. I need to dynamically stuff an object into it. I
>> might be able to use JS for the close operation though.
>>
>> Renat Zubairov wrote:
>> > Hi
>> >
>> > You can show or hide dialog not from the Tapestry (read server-side)
>> > but directly with Javascript.
>> > It's pretty simple, you just need to call method "show" or "hide" on
>> > the DoJo dialog:
>> >
>> > <script type="text/javascript">
>> >    function closeDialog() {
>> >        dojo.widget.byId('DialogContent').hide();
>> >    }
>> > </script>
>> >
>> > Renat
>> >
>> > On 04/07/07, Paul Stanton <pa...@gunnsoft.com.au> wrote:
>> >> Hi all,
>> >>
>> >> Currently I've got a couple of dialogs within a page. Each time a
>> dialog
>> >> is shown or hidden (via @EventLister annotation) the page's
>> >> pageBeginRender method is called and this is more work than is
>> necessary
>> >> just do display a simple dialog.
>> >>
>> >> Is there a way to detect that the call is being made by the dialog
>> >> request and in that case, not execute exhaustive code?
>> >>
>> >> Thanks, Paul.
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>



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


Re: 4.1.1 (or 4.1.2) Dojo Dialog escaping pageBeginRender

Posted by Jesse Kuhnert <jk...@gmail.com>.
You can inject the ResponseBuilder service and call
ResponseBuilder.isDynamic() to avoid doing things you don't want to have
happen in one vs. another instance.

To be clear, ~everything~ that happens in a dynamic request should be the
same as what happens in a normal request. (except maybe for json stuff)

The overhead on Tapestrys end has been reduced to pretty much nothing now
though,  so if there is any extra work going on it's in your own application
code.   It might be more ideal to try and do a direct rendering scheme at
some point but I don't honestly think I'm going to try and do it for T4 -
maybe T5 if Howard hasn't done it already.

On 7/4/07, Paul Stanton <pa...@gunnsoft.com.au> wrote:
>
> Thanks Renat, unfortunately the dialog needs to be initialised
> programmatically .. I need to dynamically stuff an object into it. I
> might be able to use JS for the close operation though.
>
> Renat Zubairov wrote:
> > Hi
> >
> > You can show or hide dialog not from the Tapestry (read server-side)
> > but directly with Javascript.
> > It's pretty simple, you just need to call method "show" or "hide" on
> > the DoJo dialog:
> >
> > <script type="text/javascript">
> >    function closeDialog() {
> >        dojo.widget.byId('DialogContent').hide();
> >    }
> > </script>
> >
> > Renat
> >
> > On 04/07/07, Paul Stanton <pa...@gunnsoft.com.au> wrote:
> >> Hi all,
> >>
> >> Currently I've got a couple of dialogs within a page. Each time a
> dialog
> >> is shown or hidden (via @EventLister annotation) the page's
> >> pageBeginRender method is called and this is more work than is
> necessary
> >> just do display a simple dialog.
> >>
> >> Is there a way to detect that the call is being made by the dialog
> >> request and in that case, not execute exhaustive code?
> >>
> >> Thanks, Paul.
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: 4.1.1 (or 4.1.2) Dojo Dialog escaping pageBeginRender

Posted by Paul Stanton <pa...@gunnsoft.com.au>.
Thanks Renat, unfortunately the dialog needs to be initialised 
programmatically .. I need to dynamically stuff an object into it. I 
might be able to use JS for the close operation though.

Renat Zubairov wrote:
> Hi
>
> You can show or hide dialog not from the Tapestry (read server-side)
> but directly with Javascript.
> It's pretty simple, you just need to call method "show" or "hide" on
> the DoJo dialog:
>
> <script type="text/javascript">
>    function closeDialog() {
>        dojo.widget.byId('DialogContent').hide();
>    }
> </script>
>
> Renat
>
> On 04/07/07, Paul Stanton <pa...@gunnsoft.com.au> wrote:
>> Hi all,
>>
>> Currently I've got a couple of dialogs within a page. Each time a dialog
>> is shown or hidden (via @EventLister annotation) the page's
>> pageBeginRender method is called and this is more work than is necessary
>> just do display a simple dialog.
>>
>> Is there a way to detect that the call is being made by the dialog
>> request and in that case, not execute exhaustive code?
>>
>> Thanks, Paul.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>



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


Re: 4.1.1 (or 4.1.2) Dojo Dialog escaping pageBeginRender

Posted by Renat Zubairov <re...@gmail.com>.
Hi

You can show or hide dialog not from the Tapestry (read server-side)
but directly with Javascript.
It's pretty simple, you just need to call method "show" or "hide" on
the DoJo dialog:

<script type="text/javascript">
    function closeDialog() {
        dojo.widget.byId('DialogContent').hide();
    }
</script>

Renat

On 04/07/07, Paul Stanton <pa...@gunnsoft.com.au> wrote:
> Hi all,
>
> Currently I've got a couple of dialogs within a page. Each time a dialog
> is shown or hidden (via @EventLister annotation) the page's
> pageBeginRender method is called and this is more work than is necessary
> just do display a simple dialog.
>
> Is there a way to detect that the call is being made by the dialog
> request and in that case, not execute exhaustive code?
>
> Thanks, Paul.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,
Renat Zubairov

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