<html>
<head>
<title>Ajax JSF sample (InputSuggestAjax)</title>
</head>
<body>
<f:view>
?<h:form>
? <h:outputText value="Enter your name : "/>
?? <s:inputSuggestAjax suggestedItemsMethod="#{bean.getSuggestedWords}"
??? value="#{bean.currentValue}" />
?? <br />
?? <h:commandButton action="" value="Submit"/>
?? <br />
?? <h:outputText value="Your name is #{bean.currentValue}"/>
?</h:form>
</f:view>
</body>????
</html>?
?3.? web.xml配置
<context-param>
? <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
? <param-value>client</param-value>
</context-param>
//Instead of server make the state saving method on the client to make it works
?4. 輸出頁面:
版本為? ?1.1.4 示例代碼提供Hazem?http://bbs.hexiao.cn/?