You need to sign in to do that
Don't have an account?
Misunderstanding Param?
Hi All,
I am VERY new to VF...
I have a field (x), which is a picklist that has 3 options (A, B, C).
I want to right an application which can be in it's own tab.
This application is SIMPLY so the user can select A, B, or C from the picklist and the page will then display one of three values.... if A, show 50, if B, show 100, if C, show 150.
The text that shows (50 or 100 or 150) should be text.
I've been trying to have the picklist (x) as an inputField, then, within the inputfield, using a <apex:param> to assign a variable which i can then reference in an outputField, but i am obviously doing this all wrong.
Please can someone point in the direction of how to do this in simple terms??
I really appreciate your help, thanks
Thanks for the reply, but I'm quite confused as to how to actually do that.....if you have a few mins to show some example code I'd really appreciate - I'm a bit lost...
<apex:pageBlock id="pb">
<apex:inputfield value="{!obj.myPicklistVal}" onChange="doThis();"/>
<apexOutPutText value="{!myTextValue}"/>
</apexPageblock>
<apex:actionFunction name="doThis" action="{!controllerDoThis}" rerender="pb">
In Controller:
Public String MyTextValue {get;set}
Public myobject obj{get; set;}
Public void controllerDoThis()
{
If(obj.myPicklistVal = 'something'){
myTextValue = 'A';
}
Else If(obj.myPicklistVal = 'some other thing'){
myTextValue = 'B';
}
}
NOTE: INITIALIZE the values in controller constructor.