myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Müllan" <bierbra...@gmail.com>
Subject Re: jsValueChangeListener - field does not get updated in realtime, only after focus
Date Wed, 02 Aug 2006 12:11:54 GMT
Hi,

don`t know if this will work, but what about setting the expression to:

$destElem.innerHTML = $srcElem.value.length

and the destination element is your outputText component. But maybe
there are issues with innerHTML an IE.

cheers,

Gerald

On 8/2/06, Torsten Krah <tkrah@fachschaft.imn.htwk-leipzig.de> wrote:
> Looking at the examples i tried this:
>
>                 <h:inputText id="text1">
>                     <t:jsValueChangeListener for="text2" property="value"
>                                                 expressionValue="$srcElem.value.length"
/>
>                 </h:inputText>
>                 <h:inputText id="text2"/>
>
> Does work - but the value if text2 is only updated if it gets the focus, i can write
in the first field what i want - field2
> stays the same and shows nothing until it gets the focus.
> Changing the second inputTex in an outputText shows nothing ( but it should? )
> Any hints?
>
> I want to have something like:
> User is writing in first field, an outputText after that field shows the length of what
the user have inserted, updating with ervery
> change event - i thought this tag should do the work, should it?
>
> kind regards
>
>
> ps: using myfaces + tomahawk v1.1.4 + facelets 1.1.11
>
>


-- 
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
gerald.muellan@gmail.com

Mime
View raw message