You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kavya K <ka...@gmail.com> on 2008/04/02 10:53:16 UTC

@EventListener

Hi..

My html code is..
 <input   id="supplimentalId" class="button"  jwcid="@Submit" value="Add"/>

and java code is
@EventListener(elements = "supplimentalId", events = "onclick")
    public void watchText(IRequestCycle cycle)
  {
   //      do something

      ((Dialog)getComponent("DialogContentSupplimental")).show();
  }


    ie .. when i click on add button this dialog box must open.
But the above method is not working.

Please if anybody could help me, I ll be thankfull.



Regards,
kavya

RE: @EventListener

Posted by Craig Spry <Cr...@redflex.com.au>.
I think you have not set the update component, you need to put some code into watchText() like this:
cycle.getResponseBuilder().updateComponent("DialogContentSupplimental");

I have also had more success implementing my dialogs like this
<div jwcid=" DialogContentSupplimental@Dialog" hidden="ognl:not showDlg" class="dialogue">

Then all you do is set showDlg to true in watchText(), but you may get different results.

I hope this helps,
Craig

-----Original Message-----
From: Kavya K [mailto:kavya.k31@gmail.com]
Sent: Wednesday, 2 April 2008 7:53 PM
To: users@tapestry.apache.org
Subject: @EventListener

Hi..

My html code is..
 <input   id="supplimentalId" class="button"  jwcid="@Submit" value="Add"/>

and java code is
@EventListener(elements = "supplimentalId", events = "onclick")
    public void watchText(IRequestCycle cycle)
  {
   //      do something

      ((Dialog)getComponent("DialogContentSupplimental")).show();
  }


    ie .. when i click on add button this dialog box must open.
But the above method is not working.

Please if anybody could help me, I ll be thankfull.



Regards,
kavya

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: @EventListener

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

The id should be part of the jwcid expression:

<input class="button" jwcid="supplimentalId@Submit" value="Add"/>

the component will create the id attribute for you.

Kavya K wrote:
> Hi..
>
> My html code is..
>  <input   id="supplimentalId" class="button"  jwcid="@Submit" value="Add"/>
>
> and java code is
> @EventListener(elements = "supplimentalId", events = "onclick")
>     public void watchText(IRequestCycle cycle)
>   {
>    //      do something
>
>       ((Dialog)getComponent("DialogContentSupplimental")).show();
>   }
>
>
>     ie .. when i click on add button this dialog box must open.
> But the above method is not working.
>
> Please if anybody could help me, I ll be thankfull.
>
>
>
> Regards,
> kavya
>
>   


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