0
여기 hidden_field__c는 체크 박스입니다. VFP에서 사용자가 데이터베이스에서 확인란을 true로 변경하면 여전히 false로 표시되고 반대의 경우에는 내 코드에서 누락 된 부분을 지적 할 수 있습니까? 이것은 내 코드입니다.Salesforce 업데이트 변경 이벤트의 체크 박스 값
----------- 제어기 --------------
public class dataTableCon {
List<Account> accounts;
public List<Account> getAccounts() {
if(accounts == null) accounts = [select name, owner.name,hidden_field__c from account limit 10];
return accounts;
}
}
--------- VFP -------------
<apex:page controller="dataTableCon" id="page">
<apex:form >
<apex:pageBlock id="theBlock">
<apex:dataTable value="{!accounts}" var="account" id="theTable" rowClasses="odd,even" styleClass="tableClass">
<apex:column >
<apex:facet name="header">Private</apex:facet>
<apex:inputCheckbox value="{!account.hidden_field__c}" >
<apex:actionSupport event="onchange" rerender="theBlock"/>
</apex:inputCheckbox>
</apex:column>
<apex:column >
<apex:facet name="header">Name</apex:facet>
<apex:outputText value="{!account.name}" >
</apex:column>
<apex:column >
<apex:facet name="header">Owner</apex:facet>
<apex:outputText value="{!account.owner.name}" >
</apex:column>
</apex:dataTable>
</apex:pageBlock>
</apex:form>
</apex:page>