Re: ERXRest response

Johann Werner <[email protected]> Mon, 13 May 2013 23:17:33 +0200
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <[email protected]>
Hi Giles,

just add the name of your method "getUnitPriceForSale" to your filter. It should then add its value to the Rest response though it will take the method name as key name. I am not sure if it is easily possible to make it use "salePrice" as label instead.

jw


Am 13.05.2013 um 13:17 schrieb Giles Palmer <[email protected]>:

> Hi All
> 
> I have a webPage entity that  has a to-many relationship to stockItems.  I am using my controller class and ERXKeyFilters to create the webPage response along with the related stockItems and this all works well.
> 
> However I also want to add a "salePrice" value to the response for each of the stock items and this sale price is calculated by a stockItem using a priceList object.  
> 
> In my StockItem.java it is just a method:  public BigDecimal getUnitPriceForSale(PriceList priceList).  How would I include/add this "salePrice" to the stockItem when it is not a simple attribute of a stockItem? 
> 
> Many thanks
> 
> 
> Giles


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d