开发者

List Iterate in paragraph form in JSF page

开发者 https://www.devze.com 2023-04-03 09:28 出处:网络
I want to iterate list in paragraph form in JSF p开发者_运维技巧age... for E.g. I have list and i want to iterate it\'s value as

I want to iterate list in paragraph form in JSF p开发者_运维技巧age...

for E.g.

I have list and i want to iterate it's value as

like

list<String>={'test1','test2','test3'}

I want JSF output as

test1:..test2:...test3...

how to achieve this ?


Hope this is helpful.

<html xmlns:ui="http://java.sun.com/jsf/facelets"> 

<ui:repeat var="test" value="#{someClass.methodThatReturnList}">
   #{test}:
</ui:repeat>


JSF way is h:dataTable but since you want it just to be displayed in one line you can go with JSTL

<c:forEach items="${yourBean.youeLIst}" var="para">
        <c:out value="${para}"/>
</c:forEach>
0

精彩评论

暂无评论...
验证码 换一张
取 消