Hi everybody! Trouble with my set's and get's
I'm trying to save a value to a class (of the session) from a page in my application.
I use,
currentSelectedProduct.setPrice(price);
log("Just set the price in the page variable to "+price);
log("The price is set and got back and it's "+currentSelectedProduct.getPrice());
The log shows "Just set the price in the page variable to 38" then "The price is set and got back and it's null"....?!
Any suggestions?
Here are the gets and sets etc...
private Double price;
/**
* Getter for property price.
* @return Value of property price.
*/
public Double getPrice() {
log("Returning price and price is "+price);
// this returns null
return price;
}
/**
* Setter for property price.
* @param price New value of property price.
*/
public void setPrice(Double price) {
price = price;
log("Price is set to "+price);
}
Any help much appreciated,
Thanks,
Emma

