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.
Hi ADF Experts,
My question is I am able to get the selected items from a List<String> on click of a button. How can I display each item as a outputtext inside a panelbox.
Thanks,
Rahul
Rahul,
Always mention your JDev version.
Your usecase is not clear to me. If you want to split the array and display the strings in the output text, check out if you could use af:forEach / af:iterator (with an output text inside it).
-Arun
Hi Arun,
Yes you are correct I am using af:foreach.
Can you tell me what would the value of the outputtext point to(since it is a String). As the iterator is pointing to a list of items. and it also has a var property as items.
Jdeveloper 11.1.1.7.0
Regards,
Here is a simple ex:
JSPX :
<af:panelBox id="pb1"> <af:forEach var="items" items="#{viewScope.MyBean.stringList}"> <af:outputText id="ot1" value="#{items}"/> </af:forEach></af:panelBox>
Bean :
public class MyBean { private List<String> stringList; public void setStringList(List<String> stringList) { this.stringList = stringList; } public List<String> getStringList() { return stringList; } public MyBean() { super(); stringList = new ArrayList<String>(); stringList.add("One"); stringList.add("Two"); stringList.add("Three"); stringList.add("Four"); stringList.add("Five"); } }
public class MyBean {
private List<String> stringList;
public void setStringList(List<String> stringList) { this.stringList = stringList; }
public List<String> getStringList() { return stringList; }
public MyBean() { super(); stringList = new ArrayList<String>(); stringList.add("One"); stringList.add("Two"); stringList.add("Three"); stringList.add("Four"); stringList.add("Five");
}
B
Thanks Arun. It Worked