3 Replies Latest reply on Jan 31, 2008 9:23 AM by Will Norman

    <rich:table> and <t:selectOneRadio>

    Will Norman Newbie

      Is it possible to use <t:selectOneRadio> with <rich:table>? I am trying to port a page to use RichFaces, and we use the <t:selectOneRadio> in addition to the <t:radio> to implement row selection in a table. However I am not having any luck using this component from within a rich:table.

      Is there a compatiablity issue here, or another way of accomplishing this using a4j/rich components?


      Thanks for the help!

        • 1. Re: <rich:table> and <t:selectOneRadio>
          Will Norman Newbie

          Here is the code that I'm using for my table. It is inside of a facelets component, and I am guessing that the radio tag can't find the selectOne tag that it is associated with, b/c I get a null pointer exception. Once again any help would be very much appreciated.

          <rich:dataTable id="#{type}Table" value="#{ciList}" var="insertInfo" rowKeyVar="row">
          
          
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Market Sector" />
           </f:facet>
           <h:outputText value="#{insertInfo.marketSector}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="ID Type" />
           </f:facet>
           <h:outputText value="#{insertInfo.idType}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Identifier" />
           </f:facet>
           <h:outputText value="#{insertInfo.idValue}" />
           </rich:column>
           <rich:column rendered="#{instrumentType == 'eq'}">
           <f:facet name="header">
           <h:outputText value="RIC Code" />
           </f:facet>
           <h:outputText value="#{insertInfo.ricCode}" />
           </rich:column>
           <rich:column rendered="#{instrumentType == 'eq'}">
           <f:facet name="header">
           <h:outputText value="Exch Code" />
           </f:facet>
           <h:outputText value="#{insertInfo.exchangeCode}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Security Type" />
           </f:facet>
           <h:outputText value="#{insertInfo.forceProdType}" />
           </rich:column>
           <rich:column rendered="#{instrumentType == 'eq'}">
           <f:facet name="header">
           <h:outputText value="Force Exch" />
           </f:facet>
           <h:outputText value="#{insertInfo.forceExchange}" />
           </rich:column>
           <rich:column >
           <f:facet name="header">
           <h:outputText value="Force Currency" />
           </f:facet>
           <h:outputText value="#{insertInfo.currency}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Force Client ID" />
           </f:facet>
           <h:outputText value="#{insertInfo.clientId}" />
           </rich:column>
           <rich:column rowspan="#{insertInfo.status.numSecurities + 2}" >
           <f:facet name="header">
           <h:outputText value="Status" />
           </f:facet>
           <h:outputText value="#{insertInfo.status.statusMsg}" styleClass="#{status}" />
           <t:selectOneRadio id="secSelect#{row}" value="#{insertInfo.selectedSecurityId}" >
           <f:selectItems value="#{insertInfo.status.secSelect}" />
           <a4j:support event="onchange" />
           </t:selectOneRadio>
           </rich:column>
          
          
          
           <rich:subTable id="subTable" var="sec" value="#{insertInfo.status.securities}" rowKeyVar="i" rendered="#{type == 'multi'}">
          
           <rich:column>
           <f:facet name="header">
           <rich:spacer />
           </f:facet>
           <rich:spacer />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Ticker" />
           </f:facet>
           <h:outputText value="#{sec.ticker}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Comp Exch" />
           </f:facet>
           <h:outputText value="#{sec.exchangeCode}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Prim Exch" />
           </f:facet>
           <h:outputText value="#{sec.eqyPrimExchShrt}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="Crncy" />
           </f:facet>
           <h:outputText value="#{sec.crncy}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="ISIN" />
           </f:facet>
           <h:outputText value="#{sec.isin}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="CUSIP" />
           </f:facet>
           <h:outputText value="#{sec.cusip}" />
           </rich:column>
           <rich:column>
           <f:facet name="header">
           <h:outputText value="SEDOL" />
           </f:facet>
           <h:outputText value="#{sec.sedol}" />
           </rich:column>
           <rich:column id="radioColumn">
           <f:facet name="header">
           <rich:spacer />
           </f:facet>
          
           <t:radio for="acquireStatusForm:multiTable:#{row}:secSelect" index="${i}" />
          
          
          
           </rich:column>
          
           </rich:subTable>
          
          
          
           </rich:dataTable>


          • 2. Re: <rich:table> and <t:selectOneRadio>
            Nick Belaevski Master

            Could you please add stack trace?

            • 3. Re: <rich:table> and <t:selectOneRadio>
              Will Norman Newbie

              I am working on a new approach, so I don't want to revert my code right now. I can tell you that the null pointer exception was thrown from the facelets tag handler getInt method.