2012-05-08 7 views
0

私のWebアプリケーション用の簡単な検索エンジンを実行していますが、私は問題に直面しています。フォームの内容に応じたCommandButtonのアクションURL

私のsearch.xhtmlは、パラメータを取得することで機能し、search.xhtml?key=lolは "lol"の結果を返します。

私の検索コマンドボタンは、search.xhtml?key=INPUT TEXT CONTENTをリダイレクトする必要があります。

はここに私の単純なコードです:dispensaRicercaBean@RequestScopedと私の結果ページで

<div id="searchBox"> 
     <pou:panel id="searchPanel">     
      <h:form> 
       <h:inputText id="searchInput" value="#{dispensaRicercaBean.query}" size="99" maxlength="99"/> <pou:commandButton icon="ui-icon-search" action="ricerca?faces-redirect=true"/> 
       <pou:watermark value="Search" for="searchInput"/> 
      </h:form>     
     </pou:panel>    
    </div> 

executeQuery(#{request.getParameter('key'))呼び出してデータロード

私はそれをどのように行うことができます(ラフの例を、実際にいくつかの違いがありますか)?

答えて

0

<form>

<form action="ricera.xhtml"> 
    <h:inputText id="key" size="99" maxlength="99" /> 
    <pou:watermark value="Search" for="key" /> 
    <pou:button icon="ui-icon-search" onclick="submit(); return;" /> 
</form>     
プレーンHTMLを使用します
関連する問題