Script:
<apex:includeScript value="{!$Resource.jQuery}"/> $j = jQuery.noConflict(); $j(document).ready(function() { // CheckBox Select var selectedChkbox; $j("[id$=':type4check']").each(function (index, domEle) { if ($j(this).attr('checked')) selectedChkbox = $j(this).attr('id'); }); $j("[id$=':type4check']").click(function(event){ if($j(this).attr('checked')){ if ($j(this).attr('id') != selectedChkbox) { //$j(selectedChkbox).removeAttr('checked'); document.getElementById(selectedChkbox).checked=false; } selectedChkbox = $j(this).attr('id'); // Call Action Script refreshActUsrList(); } else { event.preventDefault(); } }); });
ページ:
<apex:pageBlockTable value="{!xxxList}" var="ret" style="width:100%" id="typeBlock"> <apex:column > <apex:facet name="header"></apex:facet> <apex:inputCheckBox value="{!xxxx}" id="type4check"/> </apex:column> <apex:column > <apex:facet name="header"><apex:outputText value="xxxxx" styleClass="labelCol" /></apex:facet> <apex:outputText value="{!ret.cnt.fieldzzz}" styleClass="labelCol" /> </apex:column> <apex:column > <apex:facet name="header"><apex:outputText value="xxxxxx" styleClass="labelCol" /></apex:facet> <apex:inputField value="{!ret.cnt.fieldxxx}" /> </apex:column> </apex:pageBlockTable>