Salesforce 要显示文本,请单击vf页面中的复选框

Salesforce 要显示文本,请单击vf页面中的复选框,salesforce,Salesforce,希望在VF页面中单击复选框后显示字段中的文本。但同一复选框正在调用一个方法。 代码如下……请写控制器。需要紧急帮助 <apex:outputPanel id="jobPanel"> <apex:outputPanel id="jobPanel"> 请尝试下面的代码 <apex:outputPanel id="jobPanel"> 顶点类: <apex:outputPanel id="jobPanel"> public class Tes

希望在VF页面中单击复选框后显示字段中的文本。但同一复选框正在调用一个方法。 代码如下……请写控制器。需要紧急帮助

<apex:outputPanel id="jobPanel">

<apex:outputPanel id="jobPanel">
请尝试下面的代码

<apex:outputPanel id="jobPanel">
顶点类:

<apex:outputPanel id="jobPanel">
public class Test 
{
   public Boolean isChecked { get; set; }       
   public String myText{get;set;}
   public void controllerMethod()
   {
       myText = 'Your Text field rendered';
       //assign text field values
   }
}
Visualforce页面:

<apex:outputPanel id="jobPanel">
<apex:page controller="Test" >
  <apex:form >  
   <apex:pageBlock id="jobBlock">
      <apex:inputCheckbox id="inche" value="{!isChecked}" >
          <apex:actionsupport event="onclick" action="{!controllerMethod}" rerender="jobPanel" />
      </apex:inputCheckbox>

      <apex:outputPanel id="jobPanel">
          <apex:pageBlockSection rendered="{!isChecked}">
              <apex:pageblockSectionItem >
                   <apex:inputText value="{!myText}"/>
              </apex:pageblockSectionItem>                           
          </apex:pageBlockSection>
      </apex:outputPanel>
   </apex:pageBlock>
 </apex:form>
</apex:page>
希望对你有帮助

<apex:outputPanel id="jobPanel">