myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Dahm">
Subject AW: return event in text fields
Date Fri, 21 Dec 2007 12:41:33 GMT



I know what you mean. 

Your first solution: We do not use trinidat. 

The second solution: There is a strange behavior in our pages: The method
“blah” is used but a server request is executed anyway.

We have a combination of ajax- and tomahawk-buttons and the enter-command
executes the first occurring tomahawk-commandbutton (ajax-buttons are


In my understanding the server request should not be happened. Is this



-----Ursprüngliche Nachricht-----
Von: [] Im Auftrag von
Matthias Wessendorf
Gesendet: Freitag, 21. Dezember 2007 12:50
An: MyFaces Discussion
Betreff: Re: return event in text fields

In Trinidad, the form has a defaultCommand attribute.
You can specify a id of a link/button and on ENTER the form would be
If not set, nothing happens on enter.

Not tried...,
but just an idea.

Is it possible to say
<h:form ........ onkeypress="blah(event);"">

and a little JS-script, like:

function blah(event)

if(event.keyCode == 13)
  return false;

On Dec 21, 2007 11:32 AM, Peter Dahm <> wrote:
> Hello,
> we have this code sniplet in our page. This forces an event, if the value
> the textfield changes.
> <t:inputText styleClass="textfield" style="width:100%"
>       value="#{directReportOverviewBean.filterNameAsString}"
>       <a4j:support event="onchange" reRender="tblUebersicht" />
> </t:inputText>
> Know we have the need to force the same event on submitting the textfield
> with the enter button. Unfortunately the current effect is, that one of
> buttons gets the submit event.
> Does someone of you have an idea to solve this problem ?
> Peter

Matthias Wessendorf

further stuff:
mail: matzew-at-apache-dot-org

View raw message