3 Replies Latest reply on Feb 17, 2008 10:14 AM by Ilya Shaikovsky

    passing n value from rich:componentControl to model.

    Madhav Inamti Novice

      I need to use a id of a clicked row to perform a query and display a table in rich:modalPanel.

      
      <rich:table>
      .....
      <h:column>
      <h:outputLink value="#" id="foo">
       <h:outputText value="#{messages.Foo}"/>
       <rich:componentControl for="fooModal" attachTo="foo" operation="show" event="onclick">
       <f:param value="#{cars.carId}" name="selectedCarId"/>
       </rich:componentControl>
      </h:outputLink>
      </h:column>
      ....
      </rich:table>
      
      


      I need to use #{selectedCar} in a query. How do I do it ? I was thinking that in my rich:modalPanel

      
      <rich:modalPanel id="fooModal" width="350" height="100">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="Foo"></h:outputText>
       </h:panelGroup>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="/img/close.png" style="cursor:pointer" id="hidelinkFoo"/>
       <rich:componentControl for="fooModal" attachTo="hidelinkFoo" operation="hide" event="onclick"/>
       </h:panelGroup>
       </f:facet>
      
       <a4j:form id="fooForm">
       <s:decorate template="layout/edit.xhtml">
       <ui:define name="label">#{messages.foo}</ui:define>
       </s:decorate>
      
       <rich:dataTable>
      
       ..... display table based on selectedCarId
      
       </rich:dataTable>
      
       </a4j:form>
       </rich:modalPanel>
      
      


      Thanks,

      M