function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
learnSFlearnSF 

how to save textarea value in some variable in visual force page

Hi,
 
I have textarea field and when I hit save button I need to send this value to save method inside controller.
Code:
<apex:inputTextarea id="personaltag_edit_area" rows="1"  cols="50100"/>

 when user hit save button I need to send this value (whatever user type in this textarea) to save method inside controller class and want to save this value in account tag table.
 
Can someone point me how to redirect value in controller?
 
-Thanks in advance
Best Answer chosen by Admin (Salesforce Developers) 
Sam.arjSam.arj
I am not sure if I understood your problem currently but if your problem is to read the content of the inputTextArea in your controller you need to define a property (get, set) in your controller and then using value attribute of your inputTextArea you can achieve what you need.


Code:
<apex:inputTextarea id="personaltag_edit_area" rows="1"  
cols="50100" value="{!myControllerProperty}"/>

 

All Answers

Sam.arjSam.arj
I am not sure if I understood your problem currently but if your problem is to read the content of the inputTextArea in your controller you need to define a property (get, set) in your controller and then using value attribute of your inputTextArea you can achieve what you need.


Code:
<apex:inputTextarea id="personaltag_edit_area" rows="1"  
cols="50100" value="{!myControllerProperty}"/>

 

This was selected as the best answer
learnSFlearnSF
yes,
 
you are right.
 
I found solution and writer get,set and it solved my problem.
rakhi78rakhi78
can you please send me the sample code how to do it. I need something similar