Hi everyone,
In the example below, when I press Enter key in the inputText a submit action is invoked. How to disable this?
- <h:form>
- <h:inputText value="" />
- <h:commandButton action="#{myaction.beginConv}" value="new Conversation" />
- </h:form>
the associated action:
- import java.io.Serializable;
-
- import org.jboss.seam.ScopeType;
- import org.jboss.seam.annotations.AutoCreate;
- import org.jboss.seam.annotations.Begin;
- import org.jboss.seam.annotations.Name;
- import org.jboss.seam.annotations.Scope;
-
- @Scope(value=ScopeType.CONVERSATION)
- @Name(value="myaction")
- @AutoCreate
- public class myAction implements Serializable {
-
- private static final long serialVersionUID = -7841475921399951330L;
-
- @Begin(nested=true)
- public String inicia() {}
-
- }
When the button "new Conversation" is clicked starts a new conversation, the same happens if the Enter key is pressed when the cursor is in inputText field.
(setting a project with seam 2.2.0GA, using jboss-5.1.0GA and deploying the project as an ear)
Sorry for my bad english.