myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: Editable DataTable
Date Tue, 19 Feb 2008 16:26:00 GMT
your code is correct.

#{person.name} invokes <Person instance>.getName()
#{person.age} invokes <Person instance>.getAge()

On Feb 18, 2008 9:30 PM, Hemanth Abburi <java4hemanth@gmail.com> wrote:
> Hi !!
>            I am a newbie to JSF and am working on datatable. I wanted to
> create a simple editable datatable.The datatable component in the jsp is as
> shown below..
>
>
>
> <h:dataTable value="#{table.persons}" var="person" border="1"
> id="customTable" >
>
> <h:column>
>
> <f:facet name="header" ><h:outputText
> value="#{msg.serialNumber}"/></f:facet>
>
> <h:outputText value="#{person.name}"/>
>
> </h:column>
>
> <h:column>
>
> <f:facet name="header"><h:outputText value="#{msg.exp}"/></f:facet>
>
> <h:inputText value="#{person.age}"/>
>
> </h:column>
>
> </h:dataTable>
>
> I just want to know how i can get the values of "name" and "age" which are
> members of a class person.
>
> The managed bean contains of a list by the name "persons" which consists of
> objects of type "person".
>
> Thanks,
>
> Hemanth.

Mime
View raw message