19.4. <rich:hashParam>

The <rich:hashParam> component allows client-side parameters to be grouped into a hash map. The hash map can then be passed to the client JavaScript API functions of any RichFaces component.

19.4.1. Basic usage

Nest parameter tags in the <rich:hashParam> component to group them in the hash map. The hash map itself can then be passed as a function parameter.

Example 19.7. <rich:hashParam>

<h:commandButton value="Show popup">
   <rich:componentControl target="popupPanel" operation="show">
      <a4j:param noEscape="true" value="event" />
      <rich:hashParam>
         <f:param name="width" value="500" />
         <f:param name="height" value="300" />
         <f:param name="minWidth" value="300" />
         <f:param name="minHeight" value="150" />
         <a4j:param noEscape="true" name="left" value="(jQuery(window).width()/2)-250" />
         <a4j:param noEscape="true" name="top" value="(jQuery(window).height()/2)-150" />
      </rich:hashParam>
   </rich:componentControl>
</h:commandButton>
The example illustrates the use of the <rich:hashParam> component to group multiple parameters into a hash map. The parameters are passed through to the show function pop-up panel with the popupPanel identifier.

19.4.2. Reference data

  • component-type: org.richfaces.HashParameter
  • component-class: org.richfaces.component.UIHashParameter
  • component-family: org.richfaces.HashParameter
  • handler-class: javax.faces.view.facelets.ComponentHandler