Hello
I hope you can help me. I'm new to java and jsf and richfaces and I've created a java map in a class (called "TaskListData") accessed by my backing bean as follows:
public class TaskListData {
private Map<String, String[]> srcMasks = new HashMap<String, String[]>();
private Map<Integer, Map<String, String[]>> ftqSet = new HashMap<Integer, Map<String, String[]>>();
public void setFTQSet(Integer ftqid, String[] src, String[] masks) {
srcMasks.put("srcDir", src);
srcMasks.put("masks", masks);
ftqSet.put(ftqid, srcMasks);
}
this ftqSet fits in below roughly translating to this (perlism) overall datastructure:
feedId = "5",
feedName = "myFeedName",
ftqSet => {
1 => {
srcDirs = ["/path/string"],
masks = ["p.txt", "q.csv"]
}
2 => { ...
}
}, ...
of which there will be multiple records of the above. I had been returning an ArrayList String when the structure only stored feedId and feedName, but now I've tacked on this hash of hashes of arrays I don't think I can do that any more and an object of type TaskListData seems more appropriate (although probably not right).
My questions a) what should the return type of my backing bean method be? b) in my test jsf index.jsp file i've been trying to access some of the data using
<c:forEach items="#{MyBacking.feedDataList}" var="f">
<h:outputText value="this text does not print" />
<h:outputText value="${f.feedId}" />
</c:forEach>
but it's only outputting the first outputText not the second. Why would this be? Once I've passed the correct return type, (c) how would I access this structure's individual elements so I can create a nice table?
btw, Don't mention rich:dataList, I've been yarning about why that didn't work for me in the jboss forum. i'm up for using the core tags for this one.
Any help massively, massively appreciated. Mark