dcsimg
can't make ui:repeat work
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   khalid_alghamdi
Posted On:   Sunday, September 26, 2010 12:35 PM

Hello I have a web app with ui:repeat and h:dataTable tags. the repeat tag does not work while dataTable works. what did I do wrong in here. see code below My index.xhtml has the following contens: = Start ============================ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> Repeat Tag    More>>

Hello



I have a web app with ui:repeat and h:dataTable tags. the repeat tag does not work while dataTable works. what did I do wrong in here. see code below



My index.xhtml has the following contens:



= Start ============================







"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





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

xmlns:c="http://java.sun.com/jsp/jstl/core"

xmlns:h="http://java.sun.com/jsf/html"

xmlns:f="http://java.sun.com/jsf/core">





Repeat Tag







  • #{color1}













DataTable Tag



























-->

= End ============================







ColorsBean is as follows:



== Start ===========================

public class ColorsBean {

String []colors = new String[] {"White","Black","Freen","Blue","Red","Yellow","Cyan"};



public String[] getColors() {

return colors;

}



public void setColors(String[] colors) {

this.colors = colors;

}

}



= End ============================



the libraries I have under WEB-INF/lib are:

- jsf-api.jar

- jsf-facelets-1.1.11.jar

- jsf-impl.jar



==============================



here is the page output:



Repeat Tag

--------------------------------------------------------------------------------

DataTable Tag



Color

White

Black

Freen

Blue

Red

Yellow

Cyan
   <<Less
About | Sitemap | Contact