[jsp] property not found??
j'ai fait un bout de code tout simple pour afficher une table en jsp
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <h:form>
<h:dataTable value="#{table.names}" var="names">
<h:column>
<h:outputText value="#{names.last}"></h:outputText>
<f:verbatim>,</f:verbatim>
</h:column>
<h:column>
<h:outputText value="#{names.first}"></h:outputText>
</h:column>
</h:dataTable>
</h:form> |
lorsque je test j'ai une erreur il me dit qu'il ne trouve pas la property names
Citation:
Error getting property 'names' from bean of type demo.TableData
. pourtant la property est bien là et bien nommées dans le bean enfin je crois.
c'est quoi mon erreur?
voici le code du bean
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| public class TableData {
private static final Name[] names = new Name[] {
new Name("william", "Dupont"), new Name("henri", "Machard"),
new Name("serge", "Dup"), new Name("Karl", "Sagan"),
new Name("Audrey", "Smith"), new Name("Arthur", "La table rond") };
/**
* @return Returns the names.
*/
public static Name[] getNames() {
return names;
} |