This content has been marked as final.
Show 4 replies
-
1. Re: Simple Repeating Text
vata2999 Aug 18, 2011 7:48 AM (in response to swenvogel)Have u worked with JSTL ?
<c:foreach var="i" begin="0" end="10"> <h:outputText value="#{i}" /> </c:foreach>
-
2. Re: Simple Repeating Text
swenvogel Aug 18, 2011 8:04 AM (in response to swenvogel)I tried it on the following simple page, but the output is empty.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com/jsp/jstl/core" contentType="text/html"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <c:foreach var="i" begin="0" end="10"> <h:outputText value="#{i}" /> </c:foreach> </body> </html> </f:view>
-
3. Re: Simple Repeating Text
swenvogel Aug 18, 2011 8:10 AM (in response to swenvogel)And when i replace
<h:outputText value="#{i}" />
with
<h:outputText value="test" />
The output is only ONE test!
-
4. Re: Simple Repeating Text
florianhell Aug 18, 2011 9:50 AM (in response to swenvogel)Try it this way...
<c:forEach var="i" begin="1" end="20" step="1" varStatus ="status"> <c:out value="${i}" /> </c:forEach>