I have an apex helper class named "PricingConversion" called from my apex controller "DeaRowEdit".


I would like to move the properties related to this calculation in the Helper class, keeping them available for the page.

public Decimal RefProductRefPriceShortTon {get; set;} 

moved in the class "PricingConversionHelper"

Is there a way to call or make them available in "DealRowEditcontroller" and the VF page from the helper class?


1 Answer 1


Try this

In the controller

PricingConversionHelper pch = new PricingConversionHelper();
pch.calculationSecondPricing(dealrow);  // assumes this is an instance method

In the VF page

apex:outputText value="{!pch.RefProductRefPriceShortTon}"/>  // assumes an instance variable

The VF page references the instance of the class, and, once the method has calculated the values, they are available through the getter (or could be set as well)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .