2 Replies Latest reply on Feb 3, 2010 6:42 AM by Nick Belaevski

    Getting element id inside of rich:column

    Daniel Kim Newbie


      I am trying to get element id this is inside of rich:column. If I take selectBooleanCheckbox out of rich:column, it works. (This only works in Firefox not IE.) So, it is not working inside of rich:column. I googled and tried, but wasn't successful.


      So, my questions are:
      1. how do I get element id inside of rich:column?
      2. why this doesn't work even outside of rich:column in IE?




      <h:form id="kpata" styleClass="edit">
      <h:selectBooleanCheckbox  value="#{quanChkBoxBean.kpataAllQ1}" id="kpataAllQ1" onclick="quanChkBox();"/> Select All Q1


           <h:selectBooleanCheckbox id="kpataCherokeeG1Q1"  value="#{quanChkBoxBean.kpataCherokeeG1Q1}" /><b/>
            <h:outputText value="Cherokee" />




      function quanChkBox(){
                                                       document.getElementById('kpata:kpataCherokeeG1Q1').disabled = true;



      I found followings:

      this works since this is outside of rich:column:
      if (#{rich:element('kpata:kpataAllQ1')}.checked==true) {
              #{rich:element('kpata:kpataAllQ1')}.disabled = true;

      but this doesn't work. (maybe this is inside of rich:column?)
         #{rich:element('kpata:kpataCherokeeG1Q1')}.checked = true;


      anyway, rich:column causing problem and this seems obvious so far.