You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Henri Dupre <he...@gmail.com> on 2007/11/30 16:00:47 UTC

@radiogroup and @EventListener

I have seen some suggestions on how to handle @RadioGroup and @EventListener
here but none of them works for me.
One suggestion is to add a function to any div element
document.getElementById('someDiv').clickRadio=function(radio) {};

add a onclick to the @Radio that calls that function
<span jwcid="@Radio" value="ognl:lv.value" onclick="document.getElementById
('someDiv').clickRadio(this);"/>

plus something like

@EventListener(targets = "someDiv", events = "clickRadio", submitForm =
"form")

This doesn't seem to do anything unfortunately.
Does it matter where the
"document.getElementById('someDiv').clickRadio=function(radio)
{};" is declared in the page?
I've been lazy and made a <script> block after the 'someDiv' element for
that line.
And how could I even trace this in firebug?

Thanks

-- 
Henri Dupre
Actualis Center

Re: @radiogroup and @EventListener

Posted by caarney <cr...@centrum.cz>.
Have you solved this problem? I'm getting a different dojo JavaScript error
("o[i] has no properties") while using Tapestry 4.1.3.


Henri Dupre wrote:
> 
> Thanks!  I figured that one.  Now I'm getting a "too much recursion"
> JavaScript  error when DOJO tries  to serialize my form.  Any ideas?
> 
> On Dec 10, 2007 5:17 AM, caarney <cr...@centrum.cz> wrote:
> 
>>
>> Try using elements instead of targets:
>>
>> @EventListener(elements = "someDiv", events = "clickRadio", submitForm =
>> "form")
>>
>>
>> Henri Dupre wrote:
>> >
>> > I have seen some suggestions on how to handle @RadioGroup and
>> > @EventListener
>> > here but none of them works for me.
>> > One suggestion is to add a function to any div element
>> > document.getElementById('someDiv').clickRadio=function(radio) {};
>> >
>> > add a onclick to the @Radio that calls that function
>> >
>> >
>> > plus something like
>> >
>> > @EventListener(targets = "someDiv", events = "clickRadio", submitForm =
>> > "form")
>> >
>> > This doesn't seem to do anything unfortunately.
>> > Does it matter where the
>> > "document.getElementById('someDiv').clickRadio=function(radio)
>> > {};" is declared in the page?
>> > I've been lazy and made a <script> block after the 'someDiv' element
>> for
>> > that line.
>> > And how could I even trace this in firebug?
>> >
>> > Thanks
>> >
>> > --
>> > Henri Dupre
>> > Actualis Center
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/%40radiogroup-and-%40EventListener-tp14091403p14250261.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> -- 
> Henri Dupre
> Actualis Center
> 
> 

-- 
View this message in context: http://www.nabble.com/%40radiogroup-and-%40EventListener-tp14091403p14580652.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: @radiogroup and @EventListener

Posted by Henri Dupre <he...@gmail.com>.
Thanks!  I figured that one.  Now I'm getting a "too much recursion"
JavaScript  error when DOJO tries  to serialize my form.  Any ideas?

On Dec 10, 2007 5:17 AM, caarney <cr...@centrum.cz> wrote:

>
> Try using elements instead of targets:
>
> @EventListener(elements = "someDiv", events = "clickRadio", submitForm =
> "form")
>
>
> Henri Dupre wrote:
> >
> > I have seen some suggestions on how to handle @RadioGroup and
> > @EventListener
> > here but none of them works for me.
> > One suggestion is to add a function to any div element
> > document.getElementById('someDiv').clickRadio=function(radio) {};
> >
> > add a onclick to the @Radio that calls that function
> >
> >
> > plus something like
> >
> > @EventListener(targets = "someDiv", events = "clickRadio", submitForm =
> > "form")
> >
> > This doesn't seem to do anything unfortunately.
> > Does it matter where the
> > "document.getElementById('someDiv').clickRadio=function(radio)
> > {};" is declared in the page?
> > I've been lazy and made a <script> block after the 'someDiv' element for
> > that line.
> > And how could I even trace this in firebug?
> >
> > Thanks
> >
> > --
> > Henri Dupre
> > Actualis Center
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/%40radiogroup-and-%40EventListener-tp14091403p14250261.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Henri Dupre
Actualis Center

Re: @radiogroup and @EventListener

Posted by caarney <cr...@centrum.cz>.
Try using elements instead of targets:

@EventListener(elements = "someDiv", events = "clickRadio", submitForm =
"form")


Henri Dupre wrote:
> 
> I have seen some suggestions on how to handle @RadioGroup and
> @EventListener
> here but none of them works for me.
> One suggestion is to add a function to any div element
> document.getElementById('someDiv').clickRadio=function(radio) {};
> 
> add a onclick to the @Radio that calls that function
> 
> 
> plus something like
> 
> @EventListener(targets = "someDiv", events = "clickRadio", submitForm =
> "form")
> 
> This doesn't seem to do anything unfortunately.
> Does it matter where the
> "document.getElementById('someDiv').clickRadio=function(radio)
> {};" is declared in the page?
> I've been lazy and made a <script> block after the 'someDiv' element for
> that line.
> And how could I even trace this in firebug?
> 
> Thanks
> 
> -- 
> Henri Dupre
> Actualis Center
> 
> 

-- 
View this message in context: http://www.nabble.com/%40radiogroup-and-%40EventListener-tp14091403p14250261.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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