問題タブ [uirepeat]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
jsf - 空の値を返す ui:repeat の処理
エンティティのリストを返す ui:repeat があります。返されたリストが空であることを知る方法はありますか?
ui:repeat が空の場合、「リストが空です」という div を表示するようなもの
varStatus について聞いたことがあります -> Facelets はタグ インデックスを繰り返します
しかし、空のリストには何かがあるとは思いません。それともありますか?
更新しました
「リストが空です!」をレンダリングしようとしました。リストが空なのに表示されない場合。
jsf - 内で動作しないようです、最後のエントリのみが送信されます
私は持って<ui:repeat>い<ui:inputText>ます:
これは#{genproducts}バッキング Bean です。
これはProductエンティティです:
私の場合、dbList()方法からの製品は 4 つあります。最初の 3 つの製品について、別の値を入力すると、デフォルト値がアクション メソッドに表示されます。最後の製品のみ、期待どおりに動作します。
これはどのように発生し、どうすれば解決できますか?
java - c:foreach を ui:repeat に置き換えます
私は JSF2 とプライムフェイスを使用しています。私はこのコードを持っています
1から5までのリストアイテムを作成せずにui:repeatに置き換えることは可能ですか?
jsf - すべての列に対してデータテーブル内で ui:repeat を使用します
h:datatable と ui:repeat に問題があります。
私は次のオブジェクト構造を持っています:
- 製品
- SubproductType1
- SubproductType2
- SubproductType3
データテーブルでは、次のような製品の情報とサブ製品の 1 つの情報を表示する必要があります。
価格と日付は、SubproductType2 価格属性から取得されます。
だから私はこれを持っている場合
これは完全に機能しますが、xhtml ファイルで #currentSubProd が呼び出されるたびに (この場合は 3 回)、Bean メソッドを呼び出します。したがって、メソッド内にクエリがある場合、DB はクエリを 3 回実行しています。
列内で ui:repeat を使用すると正常に動作しますが、データテーブルのすべての列に対して ui:repeat を使用して ui:repeat を列の外に置くことはできません。
このように(動作していません):
それを解決する方法はありますか?
前もって感謝します。
よろしく。
jsf - 送信された値の設定方法中身マップ、セット、またはリストに
<ui:repeat>内部からマップ、セット、またはリストに値をプッシュできるかどうかを知りたいですか?
<h:inputtext>の値をセットに渡したいと思います。
コード:
jsf-2 - JSF2 ui:repeat inputText wont re-render on first try
I have a ui repeat that contains a inputtext and command button pairs. The button simply changes the value that the inputtext displays and re-renders it. On the first button click it changes the value but does not re-render on the screen. The second click does the same but successfully re-renders the control. Onevent triggers all 3 status events just fine. Nothing shows in the logs either. The problem seems server side but i'm using the default faces setup from netbeans 7.3.1.
The below code will display 4 lines of inputValue and buttons. The first works fine (its outside of the ui:repeat. The 3 below all require 2 clicks.
TestBean.java
MyObject.java
index.xhtml