no, no, it's surely not the expression syntax you need to use. This
would be evaluated in the Faces-Subsystem, not by JavaScript.
I wonder from your expression what you want to achieve - you'll need
to set something to a destElem for the listener to make sense.
In any case, your original string was correct, obviously it doesn't
make any sense with the rest of your component tree, though.
Fire up your JavaScript debugger and step into
JSListener.js
function orgApacheMyfacesJsListenerSetExpressionProperty(
srcId, destId, property, expression)
{
to find out what happens.
regards,
Martin
On 12/1/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> Hi Rafael,
>
>
> you're right, the JSF EL syntax must be used. The information on the
> jsValueChangeListener Web page of the Apache MyFaces Web site seems
> out-dated or obsolete:
>
> http://myfaces.apache.org/tomahawk/javascriptListener.html
>
> But despite of using the JSF EL syntax, the approach used to react to value
> change events of radio button selections seems not to work. The first click
> shows a reaction, setting false in the inputText. All following selections
> doesn't change the inputText - true can never be set in the inputText,
> although the selectOneRadio, which is the parent of the
> jsValueChangeListener, has 4 radio buttons.
>
>
> <t:jsValueChangeListener for="inputTextId"
> property="value"
> expressionValue="#{srcElem[2].checked ? 'true' :
> 'false'}" />
>
>
> Regards,
> Matthias
>
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von Rafael Nami
> Gesendet: Donnerstag, 1. Dezember 2005 12:36
> An: MyFaces Discussion
> Betreff: Re: jsValueChangeListener - how to detect radio button selections
>
> Did you tried using #{srcElem[2].checked ? 'true' : 'false'} instead of
> $srcElem[2].checked ? 'true' : 'false' ??
>
> Best Regards
>
> Rafael Mauricio Nami
>
> 2005/11/30, Matthias Kahlau <[EMAIL PROTECTED]>:
> > Hi!
> >
> >
> > I tried to use the t:jsValueChangeListener to react, when a specific radio
> > button is selected or deselected, but got the following errors in the
> > Firefox 1.0 JavaScript console (but didn't also work in Internet Explorer
> > 6):
> >
> >
> > uncaught exception: Error encountered : srcElem has no properties
> > undefinedSource-Element id: _id1:ergPubBeginnRadios
> > Source-element: null
> > Type of source-element: object
> >
> >
> > I used the following approach inside a selectOneRadio (with
> > id="ergPubBeginnRadios") just to test:
> >
> > <t:jsValueChangeListener for="inputTextId"
> > property="value"
> > expressionValue="$srcElem[2].checked ?
> 'true' : 'false'" />
> >
> >
> > Does anybody know what's wrong?
> >
> >
> > Regards,
> > Matthias
> >
> >
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces