+ Start a Discussion

Math operators in visualforce page

can anyone help me? I want use math operators in value of outputfield, for example


<apex:outputfield value="expresion1 + expression2" />

but problem is, that I don't know how to write these expressions(their are numbers from custom conroller). I found which are supported, but I didn't find how to use it.

I tried


<apex:outputfield value="{!expresion1 + expression2}" />

But it is not work.


Thanks for help


Use outputText, not outputField. The latter works only with field bindings, not other types of expressions.