You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by alex01130 <al...@hotmail.com> on 2009/04/05 11:27:23 UTC
Trinidad Event handling
Hi,
I'd like to handle an "onfocus"-Event of a trinidatd input text field.
I tried this:
<tr:inputText id="RequestDate" value="#{customerBean.startDate}" partialTriggers="timer" onfocus="#{customerBean.stopUpdate}" columns="16" />
public void stopUpdate(javax.faces.event.ActionEvent ae){
updateTimer = false;
}
It doesn't work, but renders rubbish on the page.
How can I handle this event server side?
Thanks in advance
alex
Re: Trinidad Event handling
Posted by alex01130 <al...@hotmail.com>.
Hi Adrian,
thanks for your reply.
You answered my question, if it is possible to handle theese kind of events
server side.
Alex
----- Original Message -----
From: "Adrian Mitev" <ad...@googlemail.com>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Sunday, April 05, 2009 12:13 PM
Subject: Re: Trinidad Event handling
On Sun, Apr 5, 2009 at 12:27 PM, alex01130 <al...@hotmail.com> wrote:
> Hi,
>
> I'd like to handle an "onfocus"-Event of a trinidatd input text field.
>
> I tried this:
>
> <tr:inputText id="RequestDate" value="#{customerBean.startDate}"
> partialTriggers="timer" onfocus="#{customerBean.stopUpdate}" columns="16"
> />
>
> public void stopUpdate(javax.faces.event.ActionEvent ae){
> updateTimer = false;
> }
>
> It doesn't work, but renders rubbish on the page.
>
> How can I handle this event server side?
>
> Thanks in advance
>
> alex
It's because onfocus is client side event. You can add javascript that
submits the form and calls action (like clicking a command link)
--
Although nobody can come back and make a new start, anyone can start
now and make a new end
Re: Trinidad Event handling
Posted by Adrian Mitev <ad...@googlemail.com>.
On Sun, Apr 5, 2009 at 12:27 PM, alex01130 <al...@hotmail.com> wrote:
> Hi,
>
> I'd like to handle an "onfocus"-Event of a trinidatd input text field.
>
> I tried this:
>
> <tr:inputText id="RequestDate" value="#{customerBean.startDate}"
> partialTriggers="timer" onfocus="#{customerBean.stopUpdate}" columns="16"
> />
>
> public void stopUpdate(javax.faces.event.ActionEvent ae){
> updateTimer = false;
> }
>
> It doesn't work, but renders rubbish on the page.
>
> How can I handle this event server side?
>
> Thanks in advance
>
> alex
It's because onfocus is client side event. You can add javascript that
submits the form and calls action (like clicking a command link)
--
Although nobody can come back and make a new start, anyone can start
now and make a new end