1 Reply Latest reply on Sep 10, 2010 6:42 AM by ilya_shaikovsky

    rich:element problem, ending up null

    samuraicoder

      I am trying to pass an element by it's id using rich:element in my javascript onclick event.

       

      Do I have it in the wrong place?

       

      When I alert(); it after passing the value it is null...

       

      <rich:inplaceSelect id="col6b" value="#{_item.estatus}" onclick="removePleaseSelect(#{rich:element('selectItems')});">
              <f:selectItems id="selectItems" value="#{mconsoleContext.ecometryItemStatusCodes}"/>
              <a:support event="onviewactivated" reRender="col6b"/>
          </rich:inplaceSelect>
      

       

      I want to use jQuery to remove the first Option in the select list when it is opened.

       

       

      Help appreciated!

        • 1. Re: rich:element problem, ending up null
          ilya_shaikovsky

          Select items rendered as a set of elements. So you will not be able to get the element like that.

           

          And as I guess you using first element in order to show something like "please choose". If so - just remove it at all and use defaultLabel functionality which provided out of the box.