• Post Reply Bookmark Topic Watch Topic
  • New Topic

t:datalist - data in 3 columns then break on so on  RSS feed

 
ruchi thakur
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I Want to populate a grid stucture with defined no. of rows and columns.

I am trying to use the t:datalist control in <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

My data is fetched from the backing bean. My JSF is as follows:

<%@ 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" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<f:view>

<tutputText value="Testing"/>
<tutputText value="Testing//"/>
<f:verbatim>

<%int c =1;
<t:dataList value="#{registerBean.books}" var="book"
id="horzNav" layout="grid" >
<f:verbatim>


<t:commandLink action="#{registerBean.institutions}">
<tutputText value="#{book.ISBN}" />
</t:commandLink>
<tutputText value="Testing"/>
<t:commandLink action="#{registerBean.institutions}">
<tutputText value="#{book.title}"/>
</t:commandLink>
<f:verbatim>

</f:verbatim>

</f:verbatim>

<%

if(c == 3)
{
System.err.println("****************");%>
<f:verbatim>
<br>
</f:verbatim>
<%}else{
System.err.println("(((((((((((: "+c);
}
c = c+1;
System.err.println("(((((((((((: "+c);
%>
</t:dataList>


</f:verbatim>



</f:view>

I am not able to run sciptelts in between the t:datalist tag, though it is read only once but i am not able to increment the value of the count variable "c".
My aim is to populate my data in the form of 3 columns and n rows.

Please let me know if my approach of using the t:datalist is correct or not. I failed to use <h:panelgrid> and <h:datatable>

Please reply.
Thanks in advance.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!