• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mixing JSF and JSTL  RSS feed

 
Lakshmi Anantharaman
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to mix the following in a scenario like this .

I want a link like where the hyperlink value is like this

<h:commandLink action="#{GradebookTool.processActionNotImplemented}">
<h utputText value="Assignment"/>
</h:commandLink>

In my page I am using JSTL is iterate display some values in a table . How do I effectively add JSFlike link so that I may use my managed bean.
//----------------------------------------------------------
<c:forEach var="i" begin="0" end="${studentno}">
<tr>
<c:forEach var="j" begin="0" end="${assessmentno-1}">
<td>
<c:if test="${j == 0}">
<a href="">
</c:if>
<c ut value="${graderow[i][j]}"/>
<c:if test="${j == 0}">
</a>
</c:if>
</td>
</c:forEach>
</tr>
</c:forEach>
How can I do this ?
[ January 17, 2005: Message edited by: Laksh Anan ]
 
Josh Juneau
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not currently use JSTL in my applications, however, I have heard that it works well. I currently place all of my Java code in javabeans. Here is a link to an article that may help you with JSF/JSTL integration:

http://www.devx.com/Java/Article/21020/0/page/1


Take care-

Josh
 
Lakshmi Anantharaman
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thanks for the link. I read it.

Right now my action/process methods are in a managed bean and I want to be able to call them in a JSTL forEach . I wish JSF had a elegant way of doing what I want , but I guess not.

-Lakshmi
 
Lakshmi Anantharaman
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Can someone show an example usage of the commandLink JSF tag as explained inthe following link .
http://java.sun.com/j2ee/javaserverfaces/1.1/docs/tlddocs/h/commandLink.html

Any example of constructing an onClick or Href for a commandLink/outputLink would be great

Thanks in Advance
Lakshmi

[ January 18, 2005: Message edited by: Laksh Anan ]
[ January 19, 2005: Message edited by: Laksh Anan ]
 
Josh Juneau
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since I have read this posting, I've begun to utilize JSTL in one of my JSF applications. I have to say that it works quite well. I am able to use all of the conditional JSTL tags (haven't really tried the others as yet) with all of my "session" scoped managed bean properties. I really see a powerful combination potential here!

Just my two cents after a bit of testing...

Josh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!