Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to retrieve the label of select many choice within af:iterator

ANIMESH ROY3 days ago — edited 3 days ago

Hi,

I am using Jdeveloper 12.2.1.0

I want to get the label of the selected select many choice which is present inside af:iterator.

I am trying to get via javascript approach but still no luck. Could any one suggest?

Below is my code : jsff

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<af:resource type="javascript">
function manyChoiceValuesAddition(event) {
var component = event.getSource();
var label = component.getProperty("label");
console.log("Label of the selected component is: " + label);
}
</af:resource>
<af:outputText value="" binding="#{pageFlowScope.People.placeHolderOutputText}" id="ot1"/>
<af:iterator var="person" value="#{pageFlowScope.People.employees}">
<af:panelFormLayout>
<af:inputText label="First Name" value="#{person.firstName}"/>
<af:inputText label="Last Name" value="#{person.lastName}"/>
<af:selectManyChoice value="#{bindings.TempCityLOV1.inputValue}" label="#{bindings.TempCityLOV1.label}"******
******clientComponent="true" id="smc1">
<f:selectItems value="#{bindings.TempCityLOV1.items}" id="si1"/>
<f:validator binding="#{bindings.TempCityLOV1.validator}"/>
</af:selectManyChoice>
<af:clientListener type="click" method="manyChoiceValuesAddition"/>
</af:panelFormLayout>
</af:iterator>
<af:button text="Submit" id="b1" actionListener="#{pageFlowScope.People.submitAction}"/>
</jsp:root>

Thanks,

Animesh

Comments
Post Details
Added 3 days ago
4 comments
45 views