Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

j4j:defaultAction not working

843844Oct 21 2009 — edited Oct 21 2009
Hello Everyone,

j4j:defaultAction is not working when is press enter after typing some text in the inputtext box

my jsp page has form and subview in it and that subview has search text and command button which appears in all pages.

when i type text on header inputtext and press enter it navigates to results page but when i enter text in form input text id="search" and press enter it is not navigating

I want to set form command button id="SearchButton" as default submit


Search page
<a4j:form>
     <f:subview> 
           <jsp:include page="header.jsp" />
     </f:subview>
 
        <h:inputText id="search" value="#{SearchBean.searchKeyword}" size="60" />
        <h:commandButton action="#SearchBean.search}" id="SearchButton">
	<j4j:defaultAction />
	</h:commandButton>	
</a4j:form>
In Header.jsp i have used search once again
       <h:inputText id="Header" value="#{SearchBean.searchKeyword}" size="60" />
        <h:commandButton action="#{SearchBean.search}"  id="headerButton" >	
	</h:commandButton>	
could anyone suggest me

Thanks in Advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2009
Added on Oct 21 2009
1 comment
177 views