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
ordrmgmtordrmgmt 

not able to get input text in the form of array in apex controller

i am tring to pass values from my VF page to controller through

 

<apex:inputText id="answ" value="{!item.TextAnswer}"  />

 and in apex have coded like

 

public list<String> TextAnswer {get; set;}

then how to all the values from all iput text boxes to a list....

somebody please help me... :smileysad:

Shashikant SharmaShashikant Sharma

You can not bing a inputText directly to List of String propert in your case public list<String> TextAnswer {get; set;}

it can be bind to a string. In string poperty setter you can create a list if you want.

ordrmgmtordrmgmt

thanks for the reply but i have tried to get it just as the string but still not able to get that how to get the whole list of values entered in the input text to a list

<apex:inputText id="answ" value="{!item.TextAnswer}"  />

and then how to get the values bec when i try to put a for lop inside getter setter is gives error.

 

so public String TextAnswer {get; set;}

 

after this how am i supposed to get the values in my list... :(

Shashikant SharmaShashikant Sharma

Could you please send me what input ar you giving in text box that you want in list.

ordrmgmtordrmgmt

 in this case

 

 

<apex:inputText id="answ" value="{!item.TextAnswer}" />

this statement from VF page is supposed to get the values that will be answers depending on diffirent questions that are added to a question object reffered here as item..

 

now i have tried to get the inputtext field values TextAnswer through get methord inm apex as

 

public String TextAnswer {get; set;}

 

here i have tried to create dynamic textboxes based on the number of records in the object this is giving be only one value but i want all the values that are stored in the dynamic textbox's that are been create...