Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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

PricingConversionHelper.CalculationSecondPricingTon(dealrow);

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?

Thanks in advantage for any advice.

share|improve this question

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.