How to pass values from visualforce to Apex

Passing input values to an apex controller from a visualforce page can be very easy. In the example below inside an <apex:form> tag I am using the input field {!myInputQueryString} to pass the value typed in when the command button is clicked. This will invoke the controller and re render the output input text field with the value you passed in.

What it looks like:


Visualforce:

Apex Controller:

One thought on “How to pass values from visualforce to Apex

Add Comment