<p:selectManyCheckbox>
画像付きのアイテムを表示する必要があります。in で画像を表示してみました<p:selectOneRadio>
。それは正常に動作します。プログラムで UI にコンポーネントを追加しています。これは私のコードです。
answerRadio.setLayout("custom"); //answerRadio is SelectOneRadio
customPnl = (PanelGrid) app.createComponent(PanelGrid.COMPONENT_TYPE);
customPnl.setId("pnl"+qstnCnt);
customPnl.setColumns(3);
radioBtn = (RadioButton) app.createComponent(RadioButton.COMPONENT_TYPE);
radioBtn.setId("opt"+qstnAnsIndx);
radioBtn.setFor("ID of answerRadio");
radioBtn.setItemIndex(ansIndx);
customPnl.getChildren().add(radioBtn);
outPnl.getChildren().add(answerRadio); //outPnl is OutputPanel that include answerRadio
outPnl.getChildren().add(customPnl);
それ<p:selectOneRadio>
は画像付きです。
同じように使いたい<p:selectManyCheckbox>
です。しかし、PrimeFaces には<p:radioButton>
カスタム layoueのみがあり、その<p:checkbox>
ようなものはありません。とにかくどうすればそれを達成できますか?<p:selectManyCheckbox>
画像付きのアイテムを表示するにはどうすればよいですか?