0

私が持っているのはデータテーブルで、リストを返すメソッドがあります。

私が持っている構文は

 <h:dataTable id="imageList3" 
  value="#{PersonalInformationDataBean.loadReviewReportDataByIdNewFormat()}"
  var="reviewMyList" width="80%" border="1">

私がやりたいのは#{patentMyList.patentId}、メソッドに変数名 name を渡すことですloadReviewReportDataByIdNewFormat()。しかし、私はそうすることができません....

これを行う方法はありますか?

もし私がcommandButtonを持っていたら、私は<f:setPropertyActionListener>.

ノート :

私が使用する場合、その作業

 <h:dataTable id="imageList3" 
  value="#{PersonalInformationDataBean.loadReviewReportDataByIdNewFormat(1)}"
  var="reviewMyList" width="80%" border="1">

でも

 <h:dataTable id="imageList3" 
  value="#{PersonalInformationDataBean.loadReviewReportDataByIdNewFormat(#{patentMyList.patentId})}"
  var="reviewMyList" width="80%" border="1">

のデータ型patentIdは Long です。

4

1 に答える 1

0

構文#{}はExpressionLanguage評価をアクティブにするので、次のことができます。

#{yourBean.loadReviewReportDataByIdNewFormat(patentMyList.patentId)}

PHPや他のテンプレートベースの言語のようになることを期待しているかもしれませんが、そうではあり$some_variableません。一度アクティブ化すると、プレーン変数の名前とオペランドを使用できます。

詳細については、EL情報ページをご覧ください。

于 2012-08-06T19:49:07.417 に答える