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

Dynamic Data Collection

I am creating a VF page to collect parameter values for report generation. Each report has 1 to n parameters that the user needs to input in order for the report to run correctly. I am using a DataTable to display these parameter inputs as text boxes. The page renders one row for each parameter. So far so good. The problem comes in retrieving the values in my Apex code. I have no way of differentitating one row from another. As best I can tell, the ID value for the outputText box (ie textBox:0, textBox:1, textBox:2 etc) is not accesible to me within my Apex page controller.

Do I have to switch to using client-side (ie JavaScript) code for this?

Code: VF Page Snippet
<apex:dataTable value="{!Parameters}" var="parms">
    <apex:column width="40%"><apex:outputText id="textBox" value="{!parms.Parameter_Label__c}:"/></apex:column>
    <apex:column width="20%">&nbsp;</apex:column>
    <apex:column width="40%">
        <apex:inputText id="inputText" value="{!textValue}"/>


Richie DRichie D
can you replace {!textValue} with {!parms.Value__c} then the value of the param will be set directly. All you need to do is update the collection returned in getParameters...