私の複合コンポーネントは次の形式が含まれています。私は私のバッキングコンポーネントで<input jsf:id="sc#{cc.attrs.ItemSource.answerId}" />
の値にアクセスするにはどうすればよい複合コンポーネントからバッキングコンポーネントでフォームデータを取得
<cc:interface componentType="answerCompositeComponent">
<cc:attribute name="AnswerType" type="code.elephant.domainmodel.AnswerType" required="true" />
<cc:attribute name="ItemSource" type="code.elephant.domainmodel.Answer" required="true" />
<cc:attribute name="QuestionId" type="java.lang.Long" required="true" />
</cc:interface>
<cc:implementation>
<input jsf:id="sc#{cc.attrs.ItemSource.answerId}" />
</cc:implementation>
?私はオーバーライドprocessUpdates
メソッドで私のバッキングビーンで次のことを試しました。
Answer ItemSource = (Answer) getValueExpression("ItemSource").getValue(context.getELContext());
String formid = String.format("sc%d", ItemSource.getAnswerId());
String get = context.getExternalContext().getRequestParameterMap().get(formid);
String get
は常にnullです。入力値を取得する方法はありますか?
PS:私は、jsfでプレーンhtmlを使用するのがその目的ではないことを知っています。私は、私の計画がどのように達成可能であるかを丁寧に考えています。
多くの感謝!それは私のために働く。立ってはいけない。その問題に関連する場合、いいえ - jsfにname属性の代わりにid属性を使用するように指示する方法はありますか?私はここで属性名とグループ化する必要があるラジオ入力のリストを得ました。 – Briefkasten
JSFは** ** id *と* name *の両方を、UIInputコンポーネントの生成HTMLと同じ値に設定します。 html input * name *属性はhtmlコンテナ*
Ahokay。また、processUpdatesメソッドで生成されたコンポジションコンポーネントのHTMLコードを取得し、 ' Briefkasten