You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by java questions <as...@gmail.com> on 2007/08/07 00:35:47 UTC
Using c:forEach in MyFaces 1.2
Hi, I'm trying to use the c:forEach tag in a JSF page:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Hello World(2)</title>
</head>
<body>
<f:view>
<h:form id="form">
<c:forEach var="col" items="#{Bean1.categories}" >
<h:outputText value="#{col}"/>
</c:forEach>
</h:form>
</f:view>
</body>
</html>
Bean1 getCategories method returns String[] with 3 elements. This above jsf
returns nothing. Can someone help me out?
Re: Using c:forEach in MyFaces 1.2
Posted by Anton Gavazuk <an...@gmail.com>.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=110983
2008/11/21 Anton Gavazuk <an...@gmail.com>:
> http://today.java.net/pub/a/today/2006/03/07/unified-jsp-jsf-expression-language.html
> http://www.artima.com/lejava/articles/jsf_jspP.html
> http://java.sun.com/products/jsp/reference/techart/unifiedEL.html
>
> и отдельный линк
> http://www.seamframework.org/Community/DynamicMenuFromDatabase
>
> 2008/11/21 Anton Gavazuk <an...@gmail.com>:
>> Hi
>>
>> the link in post below tells about JSF 1.1.
>>
>> Have anything changed with integration between JSF 1.2 and JSTL tags?
>>
>> 2007/8/8 sandeep gururaj <sa...@chordiant.com>:
>>> You can get more info from the postings on http://forum.java.sun.com/thread.jspa?threadID=497405&messageID=2351519
>>>
>>> ~Sandeep
>>> ________________________________________
>>> From: java questions [mailto:askjavaquestions@gmail.com]
>>> Sent: Wednesday, August 08, 2007 1:07 AM
>>> To: MyFaces Discussion
>>> Subject: Re: Using c:forEach in MyFaces 1.2
>>>
>>> Hmm... That doesn't work for me either.
>>>
>>> I need to ask a couple basic questions here:
>>>
>>> 1. I'm using Tomcat 6 - It appears that the JSTL does not come with this distribution, is that correct?
>>> 2. My Faces 1.2 distribution does not come with a JSTL lib
>>> 3. What version of the JSTL is required to use #{...} notation as opposed to ${..} notation? I'm assuming that it's 1.2?
>>> 4. If so, where's the correct place to get the 1.2 JSTL?
>>>
>>> I pulled the library from here:
>>>
>>> http://people.apache.org/~werpu/
>>> Based on an 23 July email from Werner Punz to this alias.
>>>
>>> Is there any chance that you could send a sample war that demonstrates this?
>>>
>>> Thanks!
>>>
>>>
>>>
>>> On 8/7/07, sandeep gururaj <sa...@chordiant.com> wrote:
>>>
>>> Instead of String[],use List or Vector. It worked for me using List and Vector.
>>>
>>> ~Sandeep
>>> ________________________________________
>>> From: java questions [mailto:askjavaquestions@gmail.com]
>>> Sent: Tuesday, August 07, 2007 4:06 AM
>>> To: users@myfaces.apache.org
>>> Subject: Using c:forEach in MyFaces 1.2
>>>
>>> Hi, I'm trying to use the c:forEach tag in a JSF page:
>>>
>>> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
>>> <%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
>>> <%@ taglib uri="http://java.sun.com/jstl/core " prefix="c" %>
>>>
>>> <html>
>>> <head>
>>> <title>Hello World(2)</title>
>>> </head>
>>> <body>
>>> <f:view>
>>> <h:form id="form">
>>>
>>> <c:forEach var="col" items="#{ Bean1.categories}" >
>>> <h:outputText value="#{col}"/>
>>> </c:forEach>
>>> </h:form>
>>> </f:view>
>>> </body>
>>> </html>
>>>
>>>
>>> Bean1 getCategories method returns String[] with 3 elements. This above jsf returns nothing. Can someone help me out?
>>>
>>>
>>>
>>>
>>
>
Re: Using c:forEach in MyFaces 1.2
Posted by Anton Gavazuk <an...@gmail.com>.
http://today.java.net/pub/a/today/2006/03/07/unified-jsp-jsf-expression-language.html
http://www.artima.com/lejava/articles/jsf_jspP.html
http://java.sun.com/products/jsp/reference/techart/unifiedEL.html
и отдельный линк
http://www.seamframework.org/Community/DynamicMenuFromDatabase
2008/11/21 Anton Gavazuk <an...@gmail.com>:
> Hi
>
> the link in post below tells about JSF 1.1.
>
> Have anything changed with integration between JSF 1.2 and JSTL tags?
>
> 2007/8/8 sandeep gururaj <sa...@chordiant.com>:
>> You can get more info from the postings on http://forum.java.sun.com/thread.jspa?threadID=497405&messageID=2351519
>>
>> ~Sandeep
>> ________________________________________
>> From: java questions [mailto:askjavaquestions@gmail.com]
>> Sent: Wednesday, August 08, 2007 1:07 AM
>> To: MyFaces Discussion
>> Subject: Re: Using c:forEach in MyFaces 1.2
>>
>> Hmm... That doesn't work for me either.
>>
>> I need to ask a couple basic questions here:
>>
>> 1. I'm using Tomcat 6 - It appears that the JSTL does not come with this distribution, is that correct?
>> 2. My Faces 1.2 distribution does not come with a JSTL lib
>> 3. What version of the JSTL is required to use #{...} notation as opposed to ${..} notation? I'm assuming that it's 1.2?
>> 4. If so, where's the correct place to get the 1.2 JSTL?
>>
>> I pulled the library from here:
>>
>> http://people.apache.org/~werpu/
>> Based on an 23 July email from Werner Punz to this alias.
>>
>> Is there any chance that you could send a sample war that demonstrates this?
>>
>> Thanks!
>>
>>
>>
>> On 8/7/07, sandeep gururaj <sa...@chordiant.com> wrote:
>>
>> Instead of String[],use List or Vector. It worked for me using List and Vector.
>>
>> ~Sandeep
>> ________________________________________
>> From: java questions [mailto:askjavaquestions@gmail.com]
>> Sent: Tuesday, August 07, 2007 4:06 AM
>> To: users@myfaces.apache.org
>> Subject: Using c:forEach in MyFaces 1.2
>>
>> Hi, I'm trying to use the c:forEach tag in a JSF page:
>>
>> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
>> <%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
>> <%@ taglib uri="http://java.sun.com/jstl/core " prefix="c" %>
>>
>> <html>
>> <head>
>> <title>Hello World(2)</title>
>> </head>
>> <body>
>> <f:view>
>> <h:form id="form">
>>
>> <c:forEach var="col" items="#{ Bean1.categories}" >
>> <h:outputText value="#{col}"/>
>> </c:forEach>
>> </h:form>
>> </f:view>
>> </body>
>> </html>
>>
>>
>> Bean1 getCategories method returns String[] with 3 elements. This above jsf returns nothing. Can someone help me out?
>>
>>
>>
>>
>
Re: Using c:forEach in MyFaces 1.2
Posted by Anton Gavazuk <an...@gmail.com>.
Hi
the link in post below tells about JSF 1.1.
Have anything changed with integration between JSF 1.2 and JSTL tags?
2007/8/8 sandeep gururaj <sa...@chordiant.com>:
> You can get more info from the postings on http://forum.java.sun.com/thread.jspa?threadID=497405&messageID=2351519
>
> ~Sandeep
> ________________________________________
> From: java questions [mailto:askjavaquestions@gmail.com]
> Sent: Wednesday, August 08, 2007 1:07 AM
> To: MyFaces Discussion
> Subject: Re: Using c:forEach in MyFaces 1.2
>
> Hmm... That doesn't work for me either.
>
> I need to ask a couple basic questions here:
>
> 1. I'm using Tomcat 6 - It appears that the JSTL does not come with this distribution, is that correct?
> 2. My Faces 1.2 distribution does not come with a JSTL lib
> 3. What version of the JSTL is required to use #{...} notation as opposed to ${..} notation? I'm assuming that it's 1.2?
> 4. If so, where's the correct place to get the 1.2 JSTL?
>
> I pulled the library from here:
>
> http://people.apache.org/~werpu/
> Based on an 23 July email from Werner Punz to this alias.
>
> Is there any chance that you could send a sample war that demonstrates this?
>
> Thanks!
>
>
>
> On 8/7/07, sandeep gururaj <sa...@chordiant.com> wrote:
>
> Instead of String[],use List or Vector. It worked for me using List and Vector.
>
> ~Sandeep
> ________________________________________
> From: java questions [mailto:askjavaquestions@gmail.com]
> Sent: Tuesday, August 07, 2007 4:06 AM
> To: users@myfaces.apache.org
> Subject: Using c:forEach in MyFaces 1.2
>
> Hi, I'm trying to use the c:forEach tag in a JSF page:
>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri="http://java.sun.com/jstl/core " prefix="c" %>
>
> <html>
> <head>
> <title>Hello World(2)</title>
> </head>
> <body>
> <f:view>
> <h:form id="form">
>
> <c:forEach var="col" items="#{ Bean1.categories}" >
> <h:outputText value="#{col}"/>
> </c:forEach>
> </h:form>
> </f:view>
> </body>
> </html>
>
>
> Bean1 getCategories method returns String[] with 3 elements. This above jsf returns nothing. Can someone help me out?
>
>
>
>
RE: Using c:forEach in MyFaces 1.2
Posted by sandeep gururaj <sa...@Chordiant.com>.
You can get more info from the postings on http://forum.java.sun.com/thread.jspa?threadID=497405&messageID=2351519
~Sandeep
________________________________________
From: java questions [mailto:askjavaquestions@gmail.com]
Sent: Wednesday, August 08, 2007 1:07 AM
To: MyFaces Discussion
Subject: Re: Using c:forEach in MyFaces 1.2
Hmm... That doesn't work for me either.
I need to ask a couple basic questions here:
1. I'm using Tomcat 6 - It appears that the JSTL does not come with this distribution, is that correct?
2. My Faces 1.2 distribution does not come with a JSTL lib
3. What version of the JSTL is required to use #{...} notation as opposed to ${..} notation? I'm assuming that it's 1.2?
4. If so, where's the correct place to get the 1.2 JSTL?
I pulled the library from here:
http://people.apache.org/~werpu/
Based on an 23 July email from Werner Punz to this alias.
Is there any chance that you could send a sample war that demonstrates this?
Thanks!
On 8/7/07, sandeep gururaj <sa...@chordiant.com> wrote:
Instead of String[],use List or Vector. It worked for me using List and Vector.
~Sandeep
________________________________________
From: java questions [mailto:askjavaquestions@gmail.com]
Sent: Tuesday, August 07, 2007 4:06 AM
To: users@myfaces.apache.org
Subject: Using c:forEach in MyFaces 1.2
Hi, I'm trying to use the c:forEach tag in a JSF page:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jstl/core " prefix="c" %>
<html>
<head>
<title>Hello World(2)</title>
</head>
<body>
<f:view>
<h:form id="form">
<c:forEach var="col" items="#{ Bean1.categories}" >
<h:outputText value="#{col}"/>
</c:forEach>
</h:form>
</f:view>
</body>
</html>
Bean1 getCategories method returns String[] with 3 elements. This above jsf returns nothing. Can someone help me out?
Re: Using c:forEach in MyFaces 1.2
Posted by java questions <as...@gmail.com>.
Hmm... That doesn't work for me either.
I need to ask a couple basic questions here:
1. I'm using Tomcat 6 - It appears that the JSTL does not come with this
distribution, is that correct?
2. My Faces 1.2 distribution does not come with a JSTL lib
3. What version of the JSTL is required to use #{...} notation as opposed to
${..} notation? I'm assuming that it's 1.2?
4. If so, where's the correct place to get the 1.2 JSTL?
I pulled the library from here:
http://people.apache.org/~werpu/
Based on an 23 July email from Werner Punz to this alias.
Is there any chance that you could send a sample war that demonstrates this?
Thanks!
On 8/7/07, sandeep gururaj <sa...@chordiant.com> wrote:
>
>
> Instead of String[],use List or Vector. It worked for me using List and
> Vector.
>
> ~Sandeep
> ________________________________________
> From: java questions [mailto:askjavaquestions@gmail.com]
> Sent: Tuesday, August 07, 2007 4:06 AM
> To: users@myfaces.apache.org
> Subject: Using c:forEach in MyFaces 1.2
>
> Hi, I'm trying to use the c:forEach tag in a JSF page:
>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
>
> <html>
> <head>
> <title>Hello World(2)</title>
> </head>
> <body>
> <f:view>
> <h:form id="form">
>
> <c:forEach var="col" items="#{Bean1.categories}" >
> <h:outputText value="#{col}"/>
> </c:forEach>
> </h:form>
> </f:view>
> </body>
> </html>
>
>
> Bean1 getCategories method returns String[] with 3 elements. This above
> jsf returns nothing. Can someone help me out?
>
>
>
>
RE: Using c:forEach in MyFaces 1.2
Posted by sandeep gururaj <sa...@Chordiant.com>.
Instead of String[],use List or Vector. It worked for me using List and Vector.
~Sandeep
________________________________________
From: java questions [mailto:askjavaquestions@gmail.com]
Sent: Tuesday, August 07, 2007 4:06 AM
To: users@myfaces.apache.org
Subject: Using c:forEach in MyFaces 1.2
Hi, I'm trying to use the c:forEach tag in a JSF page:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Hello World(2)</title>
</head>
<body>
<f:view>
<h:form id="form">
<c:forEach var="col" items="#{Bean1.categories}" >
<h:outputText value="#{col}"/>
</c:forEach>
</h:form>
</f:view>
</body>
</html>
Bean1 getCategories method returns String[] with 3 elements. This above jsf returns nothing. Can someone help me out?
Re: Using c:forEach in MyFaces 1.2
Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
In JSF1.1 you had to resolve variable Bean1 before actually using it
in c:forEach. Don't know how does it work in 1.2 Maybe that's the
problem
On 07/08/07, java questions <as...@gmail.com> wrote:
>
>
>
> Hi, I'm trying to use the c:forEach tag in a JSF page:
>
> <%@ taglib uri=" http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri=" http://java.sun.com/jstl/core" prefix="c" %>
>
> <html>
> <head>
> <title>Hello World(2)</title>
> </head>
> <body>
> <f:view>
> <h:form id="form">
>
> <c:forEach var="col" items="#{Bean1.categories}" >
> <h:outputText value="#{col}"/>
> </c:forEach>
> </h:form>
> </f:view>
> </body>
> </html>
>
>
> Bean1 getCategories method returns String[] with 3 elements. This above jsf
> returns nothing. Can someone help me out?
>
>
>
>
>
--
Michał Stawicki
stawicki@gmail.com
http://stawicki.jasliska.pl
Fwd: Using c:forEach in MyFaces 1.2
Posted by java questions <as...@gmail.com>.
Hi, I'm trying to use the c:forEach tag in a JSF page:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Hello World(2)</title>
</head>
<body>
<f:view>
<h:form id="form">
<c:forEach var="col" items="#{Bean1.categories}" >
<h:outputText value="#{col}"/>
</c:forEach>
</h:form>
</f:view>
</body>
</html>
Bean1 getCategories method returns String[] with 3 elements. This above jsf
returns nothing. Can someone help me out?