You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Craig Spry <Cr...@redflex.com.au> on 2008/09/24 06:32:09 UTC

T4.1:Event connect strangness

Hello List,

I have a form with a @PropertySelection component in it, when this changes some elements on the page change.  The HTML looks like this:

<form jwcid="taskSelection@Form" style="display: inline;" updateComponents="ognl:{'allDetails'}">
                                                <select jwcid="taskSelect@PropertySelection" value="ognl:taskList.selection" model="ognl:taskList" style="width:250px;"></select>
                                        </form>

This is being listed to by a method like this:
@EventListener(events = "onchange", targets = "taskSelect", submitForm = "taskSelection", async=true)
public void taskSelectListener(IRequestCycle cycle)
{
}

Now I also want the user to be notified that the application is doing something so I have a script file with this code in it to show a loading dialog:
if(dojo.byId('taskSelect')!= null)
{
        dojo.event.connect(dojo.byId('taskSelect'),"onchange",function(){
        document.body.style.cursor='wait';
        dojo.widget.byId("loadingD").show();
           });
}

Now this all works fine the first time the select is changed, but after that the loading dialog isn't shown.  Is there something that I', doing wrong?

By the way I'm using Tapestry 4.1.6

Thanks,

Craig

If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.


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


RE: T4.1:Event connect strangness

Posted by Craig Spry <Cr...@redflex.com.au>.
Thanks for that.  It wasn't included, it is now and all is working.

Craig

-----Original Message-----
From: Andreas Andreou [mailto:andreoua@gmail.com]
Sent: Wednesday, 24 September 2008 3:18 PM
To: Tapestry users
Subject: Re: T4.1:Event connect strangness

is the above script included in the ajax response?

Since the form is submitted and the new form markup replaces the old one,
the (new) taskSelect will not be monitored for changes

On Wed, Sep 24, 2008 at 7:32 AM, Craig Spry <Cr...@redflex.com.au> wrote:
> Hello List,
>
> I have a form with a @PropertySelection component in it, when this changes some elements on the page change.  The HTML looks like this:
>
> <form jwcid="taskSelection@Form" style="display: inline;" updateComponents="ognl:{'allDetails'}">
>                                                <select jwcid="taskSelect@PropertySelection" value="ognl:taskList.selection" model="ognl:taskList" style="width:250px;"></select>
>                                        </form>
>
> This is being listed to by a method like this:
> @EventListener(events = "onchange", targets = "taskSelect", submitForm = "taskSelection", async=true)
> public void taskSelectListener(IRequestCycle cycle)
> {
> }
>
> Now I also want the user to be notified that the application is doing something so I have a script file with this code in it to show a loading dialog:
> if(dojo.byId('taskSelect')!= null)
> {
>        dojo.event.connect(dojo.byId('taskSelect'),"onchange",function(){
>        document.body.style.cursor='wait';
>        dojo.widget.byId("loadingD").show();
>           });
> }
>
> Now this all works fine the first time the select is changed, but after that the loading dialog isn't shown.  Is there something that I', doing wrong?
>
> By the way I'm using Tapestry 4.1.6
>
> Thanks,
>
> Craig
>
> If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



--
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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


If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.


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


Re: T4.1:Event connect strangness

Posted by Andreas Andreou <an...@gmail.com>.
is the above script included in the ajax response?

Since the form is submitted and the new form markup replaces the old one,
the (new) taskSelect will not be monitored for changes

On Wed, Sep 24, 2008 at 7:32 AM, Craig Spry <Cr...@redflex.com.au> wrote:
> Hello List,
>
> I have a form with a @PropertySelection component in it, when this changes some elements on the page change.  The HTML looks like this:
>
> <form jwcid="taskSelection@Form" style="display: inline;" updateComponents="ognl:{'allDetails'}">
>                                                <select jwcid="taskSelect@PropertySelection" value="ognl:taskList.selection" model="ognl:taskList" style="width:250px;"></select>
>                                        </form>
>
> This is being listed to by a method like this:
> @EventListener(events = "onchange", targets = "taskSelect", submitForm = "taskSelection", async=true)
> public void taskSelectListener(IRequestCycle cycle)
> {
> }
>
> Now I also want the user to be notified that the application is doing something so I have a script file with this code in it to show a loading dialog:
> if(dojo.byId('taskSelect')!= null)
> {
>        dojo.event.connect(dojo.byId('taskSelect'),"onchange",function(){
>        document.body.style.cursor='wait';
>        dojo.widget.byId("loadingD").show();
>           });
> }
>
> Now this all works fine the first time the select is changed, but after that the loading dialog isn't shown.  Is there something that I', doing wrong?
>
> By the way I'm using Tapestry 4.1.6
>
> Thanks,
>
> Craig
>
> If you are not an authorised recipient of this e-mail, please contact me at Redflex immediately by return phone call or by email. In this case, you should not read, print, retransmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments are confidential and may contain privileged information and/or copyright material of Redflex or third parties. You should only retransmit, distribute or commercialise the material if you are authorised to do so. This notice should not be removed.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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