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
philbophilbo 

column component - headeronclick and footeronclick attributes

Hey,

Should I be expecting the 'headeronclick' and 'footeronclick' attributes to work per the VF documentation?

I have a block in my VF page looking like:

<apex:pageBlock id="myPB"> 
  <apex:pageBlockSection columns="1" title="My PB Section" id="pbSection">
    <apex:pageBlockSectionItem id="pbSectionItem">   
      <apex:outputPanel id="myPanel" layout="block">
        <apex:dataTable  value="{!myCtrlrMethod}" var="iObj">
          <apex:column id="colId" 
headerValue="colHdr"
footerValue="colFtr"
onclick="yyy(event,id)"
footeronclick="xxx(event,id)"
headeronclick="xxx(event,id)"> <apex:outputText value="{!iObj.Field__c}"/> </apex:column> . . . </apex:dataTable> </apex:outputPanel> </apex:pageBlockSectionItem> </apex:pageBlockSection> . . . </apex:pageBlock>

 where 'xxx(event,id)' and 'yyy(event.id)' are just little Javascript placeholder methods that pop up an alert identifying themselves.

When I render the page, filling the dataTable with Field__c values from the results of myCtrlrMethod, and then click in any of the data cells of that one column, the 'yyy' method runs, as evidenced by an alert popping up.  But when I click on the header or footer cell of the column - nothing.

What is wrong with this scenario?  It also doesn't work if I setup the column's header text with an
  <apex:facet name="header">colHdr</apex:facet>
directive.

Any sage advice out there?




Message Edited by philbo on 12-10-2008 10:14 PM
philbophilbo

Hey -

 

Any word on this?  I was hoping this would resolve itself in Spring '09 - but apparently not.

 

Has anybody out there ever gotten the headeronclick/footeronclick attributes to work?

 

Thanks

mtbclimbermtbclimber

This appears to be an issue. We're investigating. I will update this thread when there is more definitive information.

 

mtbclimbermtbclimber
BTW, The workaround here is to utilize the facet and place an outputPanel with an onclick event on it.