hilz wrote:
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.

thanks




In other words... does the property that i bind to the outputText have to be a real bean property with a getter and a setter? or could it be just a getter (like what i showed in the example above) without the actual property and the setter.

and to put the question in another form, is what i did a normal thing to do? or did it work just by coincidence?

thanks

Reply via email to