You need to sign in to do that
Don't have an account?
MohanaGopal
Use of Setter method
Hi...
I want to pass inputtext field value to controller.
In controller based on this value I have to do some calculation..
I know settermethod is used for it.. I couldnt understand the example which u gave in user guide..
Any one send some sample code for
------how to pass input text value to controller
------In controller how to recieve this value.. Based on this value I have to do some calculation
------the result is displayed in another inputtext in UI.....
How to achive it.
For <apex:inputText id="two" value="{!stat}"/> this u need to write following get and set methods.
public void setstat(String s4){st=s4;}
public String getstat(){return st;}
Now the value of the text box will be avaliable in st.
Hi..
Sri
My question is how to pass inputtext value as another inputtext -- input
Ex: A is inputtext this value is get from database onchange of another inputfield.
I have to use set method for A
A value is get and calculated and assigned to another input text B.. How is it possible....
I could nt understand ur code..
Sorry.. I am new to VF, Can u explain ur code and give solution for my questions
Message Edited by MohanaGopal on 08-22-2008 04:54 AM
String stA,stB;
public void setA(String s4){stA=s4;}
public String getA(){return stA;}
public void setB(stA){stB=stA;}
public String getB(){return stB;}
I don't know whether it will work or not, but it is my blind guess.
Please post your code, so that I can get back to you.
If I understand you right you want to take input from one field and calculate in your controller and display the calculated value to set it ot another input box please correct me if I am wrong, this is fairly simple you need an action support on your inputbox where your value changes this calls an action on your controller and re-renders the input box that you want to display the value in once the calculation is complete.
if you dont re-render your change to the variable will not be shown.
Regards
Vivek Viswanathan |Technical Analyst | vviswanathan@Tier1CRM.com |Tier1CRM Inc.|T: 416.932-4625|C: 416.455-8019 |www.Tier1CRM.com
Message Edited by Vivek Viswanath on 08-22-2008 12:09 PM
You can also find documentation at
http://www.salesforce.com/us/developer/docs/pages/index.htm
regards
Vivek
Message Edited by Vivek Viswanath on 08-25-2008 09:51 AM