Salesforce-从inputfield向控制器传递参数

Salesforce-从inputfield向控制器传递参数,salesforce,Salesforce,如何将带有inputfield的visualforce页面中的参数传递给控制器 使用inputText可以工作,但我需要输入字段: <apex:inputText id="firstname" value="{!firstname}" html-placeholder="{!Offer__c.Name__c}" disabled="true"/> <apex:commandButton action="{!submit}" value="Submit"/> 如果您在控制

如何将带有inputfield的visualforce页面中的参数传递给控制器

使用inputText可以工作,但我需要输入字段:

<apex:inputText id="firstname" value="{!firstname}" html-placeholder="{!Offer__c.Name__c}" disabled="true"/>
<apex:commandButton action="{!submit}" value="Submit"/>

如果您在控制器中有如下所示的联系人记录:

公共联系人currentContact{get;set;}

然后,您可以在Visualforce页面中引用它,如下所示:

你可以在这里获得更多信息