Hello,

I use MyFaces together with Tomcat and I am trying to use a datalist element
as follows:
***************************************************
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="x"%>
<%@ page import="com.pedrolo.adriana.*"%>

<f:view>

<x:dataList id="myid" value="#{AlbumsAction.adminAlbums}" var="item"
layout="unorderedList" >
 <h:outputText value="#{item.album_year}" /></br>
</x:dataList>

</f:view>
***************************************************

Here is the code for the bean I am working with.
***************************************************
package com.pedrolo.adriana;

import java.util.Date;
import java.util.Map;

public class AdminAlbum {

 private int album_id;
 private Date album_year;
 private Map<String, String> album_title;

 public int getAlbum_id() {
  return album_id;
 }
 public void setAlbum_id(int album_id) {
  this.album_id = album_id;
 }
 public Map<String, String> getAlbum_title() {
  return album_title;
 }
 public void setAlbum_title(Map<String, String> album_title) {
  this.album_title = album_title;
 }
 public Date getAlbum_year() {
  return album_year;
 }
 public void setAlbum_year(Date album_year) {
  this.album_year = album_year;
 }
}
***************************************************
 Note that AlbumsAction.adminAlbums is a HashMap.

Can anyone tell me why I get this only whereas the hasmap contains 4
elements:

<ul>
<li></li>
</ul>

Hope to get some help. Thanks in advance,

Julien.


Reply via email to