I have a form with a commandButton but when the user hits the enter button in a text box, the page it reloaded.
I would like the default action to be the same as the commandButton.
I have tried <j4j:defaultAction /> but this does not seem to generate any javascript to forward to the required action.
Could some nice person point me in the direction of a solution to the default action on enter problem or help me with why the <j4j:defaultAction /> is not working?
Thanks, Tim
faces snip....
--------------------------
----------
---------
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:c="
http://java.sun.com/jstl/core"
xmlns:ui="
http://java.sun.com/jsf/facelets"
xmlns:t="
http://myfaces.apache.org/tomahawk"
xmlns:f="
http://java.sun.com/jsf/core"
xmlns:h="
http://java.sun.com/jsf/html"
xmlns:s="
http://jboss.com/products/seam/taglib"
xmlns:j4j="
http://javascript4jsf.dev.java.net/">
<body>
<ui:composition template="/WEB-INF/templat
e.xhtml">
...........
...........
<h:commandButton action="#{jobFinder.perfor
mSearch}"
style="vertical-align: middle;width: 89px; height: 33px; border: none; margin: 0px; padding: 0px"
id="searchButton"
value="Search"
image="images/btn_search.j
pg">
<j4j:defaultAction />
</h:commandButton>
...........
...........
--------------------------
----------
---------
j4j.jar in WEB-INF/lib
JBoss Seam 1.1.0.GA
Start Free Trial