Problemas ou popular tabela no JSF usando HIBERNATE

1 resposta
S

Pessoal estou tentado popular um tabelas mas está dando o seguinte erro:

The “.” operator was supplied with an index value of type “java.lang.String” to be applied to a List or array, but that value cannot be converted to an integer.

Página

<body>

<f:view>

<h:form id=“frmListaUsuarios”>

<h:dataTable id=“listaUsuarios” value="#{ManterUsuario.listar}" var=“usuarios”>

<h:column>

<f:facet name=“header”>

<h:outputLabel value=“Login”/>

</f:facet>

<h:outputText value="#{usuarios.loginUsuario}"/>

</h:column>

</h:dataTable>

</h:form>

</f:view>

</body>

1 Resposta

M

Olá,

A expressão #{ManterUsuario.listar} retorna um objeto tipo List, Set, Collection? Se não retornar o seu problema é este. Verifique se você tem um public List getListar() aí no seu ManterUsuario.

:wink:

Criado 11 de julho de 2008
Ultima resposta 13 de jul. de 2008
Respostas 1
Participantes 2