myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksei Valikov <vali...@disy.net>
Subject Re: dataTable question
Date Thu, 08 Dec 2005 17:31:23 GMT
Hi.

> I have a dataTable where the data is a list of objects...
> now if in my table, i have something like this:
> 
>     <h:dataTable ....  var="currentRow">
>     <h:column ...>
>         <h:outputText ... value="#{currentRow.unitPrice}"/>
> 
> the objects in the list associated with the table have a method
> 
>     public Double getUnitPrice(){
>         ...
>     }
> 
> but there is no unitPrice property, and no setUnitPrice(...) method.
> The getUnitPrice method calculates the unit price from some other 
> properties.
> 
> It is working fine with no problem so far... but I like to know if this 
> is ok or if this could cause any unforseen problems in some other 
> situation or in an app server different than what i am currently using.

You don't need setter for read-only operations.

Bye.
/lexi

Mime
View raw message