Howdy,

I'm using a subform within my application. It contains an input text
field as well as a submit button. Submitting per submit button works
fine. But when the input text field is empty and I hit enter while
focused on it a wrong action is performed.
How can I solve this?

<s:subForm id="searchForm">
 <t:inputText value="#{SearchBean.searchString}" size="30"
style="vertical-align: top; margin-top:0px; border:1px solid black;
height:13px;" />
 <t:commandLink action="#{SearchBean.doSearch}" type="submit" >
   <f:verbatim>
     <img class="menuImage" style="margin-left: 10px; float:none;"
src="img/search.png" />
   </f:verbatim>
   <h:outputText value="#{messages['search.product']}" />
 </t:commandLink>
</s:subForm>

Reply via email to