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
Arek S.Arek S. 

Pass value of InputText field to Apex

How do I go about passing the value from an InputText field to my apex controller?  I know I'm supposed to use apex:param, but I can't figure out what to specify for the value of the apex:param in order to reference my InputText field.  Any help is highly appreciated.

 

Thanks.

 

P.S.  Here's some sample code to illustrate what I'm trying to figure out ... what do I replace ????? with in order to reference the InputText field with the "date" ID?

 

<apex:page controller="test">
  <apex:form>
    <apex:inputText id="date"/>
    <apex:commandButton value="button" action="{!controlleraction}">
      <apex:param name="testdate" value="?????"/>
    </apex:commandButton>
  </apex:form>
</apex:page>

 

Arek S.Arek S.

Never mind ... I figured out I can use apex properties to get these values.

 

Thanks.