Hi,
I've been looking around for awnsers and can't figure this simple one. Either I use the action on actionListener for a commandButton, it doesn't get called and I don't have any errors. Anybody have any idea?
FORM
<f:view>
<f:loadBundle basename="com.coveo.opensearch.messages.messages" var="msg"/>
<h:messages/>
<h:form>
<center>
<table style="text-align: left; margin-top: 30px">
<tr>
<td>
<h:inputText id="searchBox" value="#{searchInterfaceBean.searchTerms}"
maxlength="1024"
style="width:350px;"/>
<h:commandButton id="search" value="#{msg['searchInterface.searchButton']}"
action="#{searchInterfaceBean.search}"/>
</td>
</tr>
</table>
</center>
</h:form>
</f:view>
Faces-Config
<faces-config
xmlns="
http://java.sun.com/xml/ns/javaee"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">
<application>
<message-bundle>com.coveo.opensearch.messages.messages</message-bundle>
</application>
<managed-bean>
<managed-bean-name>searchInterfaceBean</managed-bean-name>
<managed-bean-class>com.coveo.opensearch.SearchInterfaceBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<display-name>searchPanel</display-name>
<from-view-id>/searchPanel.jsp</from-view-id>
<navigation-case>
<from-outcome>SearchResults</from-outcome>
<to-view-id>/searchPanel.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Backing Bean
private String searchTerms;
public void setSearchTerms(String searchTerms) {
this.searchTerms = searchTerms;
}
public String getSearchTerms() {
return searchTerms;
}
public String search(){
System.out.println(searchTerms);
return "SearchResults";
}
[Message sent by forum member 'nbernierpq' (nbernierpq)]
http://forums.java.net/jive/thread.jspa?messageID=357491