function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tonitonitonetonitonitone 

onRowClick on apex:pageBlockTable row only executes once

I am trying to create a dynamic data table based on the query result of a partial value entered in an input field. This part worked great. The part that I am having problems with is, when the user clicks on a row in the data table, the value in the input field should be re-populate with the value from the selected row in the data table.

However, the field population only works on the first click, and then it stops working for subsequent clicks. I have been pulling my hair out trying to figure why. I'm also gotten sporadic results such as clicks on only the first and last rows worked, or clicks on the first row only works, etc, but never on every row.

Any help is greatly appreciated.

Here's the code for the page -
    <apex:pageBlockSectionItem >
     Enter value:
     <apex:inputText value="{!idSearchValue}" id="idSearchValueDisplay">
      <apex:actionSupport event="onkeyup" rerender="contactListDisplay" status="status">
       <apex:param name="type" value="{!idSearchType}" />
       <apex:param name="value" value="{!idSearchValue}" />
      </apex:actionSupport>
     </apex:inputText>
    </apex:pageBlockSectionItem>
    <apex:pageBlockSectionItem >
     <apex:outputPanel id="contactListDisplay">
      <apex:actionStatus id="status" startText="Requesting..">
       <apex:facet name="stop">
        Limited to 10 results.
        <apex:pageBlockTable value="{!contactList}" var="item" rendered="{!NOT(ISNULL(contactList))}">
          <apex:column headerValue="Name" value="{!item.FirstName} {!item.LastName}" />
          <apex:column headerValue="CEO ID" value="{!item.CEO_ID__c}" />
          <apex:column headerValue="NY SID" value="{!item.NYSID__c}" />
          <apex:column headerValue="SSN" value="{!item.Social_Security_Number__c}" />
          <apex:actionSupport event="onRowClick" action="{!updateSearchParams}" rerender="idSearchValueDisplay">
           <apex:param name="ceoid" value="{!item.CEO_ID__c}" />
           <apex:param name="nysid" value="{!item.NYSID__c}" />
           <apex:param name="ssn" value="{!item.Social_Security_Number__c}" />
          </apex:actionSupport>
        </apex:pageBlockTable>
       </apex:facet>
      </apex:actionStatus>
     </apex:outputPanel>
    </apex:pageBlockSectionItem>


Here's the code for the component:
    public PageReference updateSearchParams() {
        this.idSearchValue = ApexPages.currentPage().getParameters().get(this.idSearchType);
       
        return null;
    }