您可以结合使用<af:clientAttribute/> and <af:clientListener/>
和一些 javascript 来实现此行为。
您还需要在<af:inputText/>
.
这适用于我的测试程序。
<af:document id="d1">
<af:resource type="javascript">
function copyFromTo(evt) {
fromValue = evt.getSource().getProperty('fromValue');
fromIndex = evt.getSource().getProperty('fromIndex');
// iterator ID, then fromIndex, then inputText ID
id = 'i1:'+fromIndex+':it1';
inputComponent = AdfPage.PAGE.findComponentByAbsoluteId(id);
inputComponent.setValue(fromValue);
}
</af:resource>
<af:form id="f1">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:iterator id="i1" value="#{PageBean.outputTextValues}" var="row" varStatus="rowStatus">
<af:panelGroupLayout id="pgl1" layout="horizontal">
<af:selectBooleanCheckbox label="Copy" id="sbc1">
<af:clientAttribute name="fromValue" value="#{row}"/>
<af:clientAttribute name="fromIndex" value="#{rowStatus.index}"/>
<af:clientListener method="copyFromTo" type="click"/>
</af:selectBooleanCheckbox>
<af:spacer width="10" height="10" id="s1"/>
<af:outputText value="#{row}" id="ot1"/>
<af:spacer width="10" height="10" id="s2"/>
<af:inputText label="Label 1" id="it1" value="none" clientComponent="true"/>
</af:panelGroupLayout>
</af:iterator>
<!-- id="af_one_column_stretched" -->
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>