1 Reply Latest reply on Aug 25, 2008 10:32 AM by slcon1

    Scope of params form componentControl

    slcon1

      The Exadel livedemo documentation says:

      You may put f:param components as nested to component control component and all the parameters that are defined will be available from target component.


      I want to transmit parameters to an modal panel but don't get it work. It only seems to work with context menus.

      <rich:contextMenu id="SHOW_MENU">
       <rich:menuItem >
       <h:outputText value="{myParam}"/>
       </rich:menuItem>
      </rich:contextMenu>
      
      <rich:modalPanel id="SHOW_PANEL">
       <h:outputText value="{myParam}"/>
      </rich:modalPanel>
      
      <h:outputText id="componentTest" value="Component Test" >
       <rich:componentControl for="SHOW_MENU,SHOW_PANEL" event="onclick" operation="show">
       <f:param name="myParam" value="somevalue"/>
       </rich:componentControl>
      </h:outputText>


      Does anyone know what I'm doing wrong?

      Thanks in advance,

        • 1. Re: Scope of params form componentControl
          slcon1

          The modal panel can show the value in an alert box but doesn't show it in the outputText.

          <rich:modalPanel id="SHOW_PANEL"
           onshow="alert(event.parameters.myParam)" > <%-- Alerts "somevalue" --%>
           <h:outputText value="{myParam}"/> <%-- Shows "{myParam}" --%>
          </rich:modalPanel>
          
          <rich:contextMenu id="SHOW_MENU">
           <rich:menuItem >
           <h:outputText value="{myParam}"/> <%-- Shows "somevalue" --%>
           </rich:menuItem>
          </rich:contextMenu>
          
          <h:outputText id="componentTest" value="Component Test" >
           <rich:componentControl for="SHOW_MENU,SHOW_PANEL" event="onclick" operation="show">
           <f:param name="myParam" value="somevalue"/>
           </rich:componentControl>
          </h:outputText>
          


          How Can I pass values to the modalPanel?