<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="t"
%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
<layout:main>
<jsp:body>
<t:panel>
<f:facet name="layout">
<t:gridLayout rows="fixed"/>
</f:facet>
<t:box height="300px" width="800px">
<t:sheet value="#{quarantine.messagesList}" id="sheet"
columns="3*;3*;3*;3*;3*"
var="quarantineRec" state="#{quarantine.selectedMessages}"
showPageRange="right" pagingLength="7">
<t:column label="From" id="From" sortable="true">
<t:out value="#{quarantineRec.sender}"/>
</t:column>
<t:column label="To" id="To" sortable="false" align="center">
<t:out value="#{quarantineRec.recipient}"/>
</t:column>
<t:column label="Subject" id="Subject" sortable="true">
<t:out value="#{quarantineRec.subject}"/>
</t:column>
<t:column label="Matched" id="Matched" sortable="true">
<t:out value="#{quarantineRec.matchtext}"/>
</t:column>
<t:column label="Filtered" id="Filtered" sortable="true">
<t:out value="#{quarantineRec.filteredby}"/>
</t:column>
</t:sheet>
</t:box>
</t:panel>
</jsp:body>
</layout:main>
--------------------
QuarantineRec
--------------------
public class QuarantineRec {
private int id = 0;
private String filename = null;
private String sender = null;
private String recipient = null;
private String subject = null;
private String filteredby = null;
private String matchtext = null;
public QuarantineRec() {}
String quarantine = System.getProperty("EMP.home") +
File.separatorChar +
"Data"
+ File.separatorChar + "RouterProcessorEngines" +
File.separatorChar
+ "0" + File.separatorChar + "Quarantine";
public int getId() { return this.id; }
public void setId(int id) { this.id = id; }
public String getFilename() { return this.filename; }
public void setFilename(String filename) { this.filename = filename; }
public String getSender() { return this.sender; }
public void setSender(String sender) { this.sender = sender; }
public String getRecipient() { return this.recipient; }
public void setRecipient(String recipient) { this.recipient =
recipient; }
public String getSubject() { return this.subject; }
public void setSubject(String subject) { this.subject = subject; }
public String getFilteredBy() { return this.filteredby; }
public void setFilteredBy(String filteredby) { this.filteredby =
filteredby; }
public String getMatchText() { return this.matchtext; }
public void setMatchText(String matchtext) { this.matchtext =
matchtext; }
public String getFullFilename() {
return quarantine + File.separatorChar + filename;
}
}
-----Original Message-----
From: Volker Weber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2006 12:36 PM
To: MyFaces Discussion
Subject: Re: Question on passing List to Sheet in Tobago
They are accessed via getters.
Please post your code of the sheet, maybe i can find the problem.
Have you looked at the sheet in the tobago examples?
Regards,
Volker
John wrote:
> Are the properties accessed directly (they must be public)? Or, are
> they accessed via getters (they can be private)?
> Right now they are private with getters. I'm using the syntax you
> stated in the sheet - not working.
>
> Thanks,
>
> John
>
> -----Original Message-----
> From: Volker Weber [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 03, 2006 12:17 PM
> To: MyFaces Discussion
> Subject: Re: Question on passing List to Sheet in Tobago
>
> John,
>
> each of the lists objects could accessed while rendering a row by the
> name set to the var attribute of the sheet.
>
> e.g.: you have a managedBean "bean" with a property "persons", which
> is a list of person objects. The person object has a property "name".
>
> <tc:sheet value="#{bean.persons}" var="data">
> <tc:column label="Header">
> <tc:out value="#{data.name}"/>
> <tc:column>
> </tc:sheet>
>
> here var="data" means you can access the person object inside the
> sheet by #{data}.
>
> Regards,
> Volker
>
> John wrote:
>
>>When using a List as a datasource for a sheet, where the List contains
>
>
>>objects that represent row field data, how does the sheet know how to
>>break the object's data apart for display in the various fields.
>>
>>I originally thought that I could just do getters in the object
>>matching the field names in the sheet, but it doesn't get the data. It
>
>
>>shows the right number of rows, so I know it's retrieving the List
>>members ok, it just doesn't display the field data.
>>
>>John
>>
>
>
> --
> Don't answer to From: address!
> Mail to this account are droped if not recieved via mailinglist.
> To contact me direct create the mail address by concatenating my
> forename to my senders domain.
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by concatenating my
forename to my senders domain.