title: Calling JSF managed bean method with arguments in jQuery
body: <p>I am using JSF to build a site. I have included <a href="http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/" rel="nofollow">jQuery Gritter (Growl)</a> notification on my home page. Is it possible to call a managed bean method inside the <code>before_close:</code> of <code>$.gritter.add</code> function?</p>
  
  <p>The code that I want to use is as follows:</p>
  
  <pre><code>&lt;h:body&gt;
      &lt;c:forEach items="#{notificationBean.growlNotificationList}" var="p"&gt;
          &lt;script&gt;
          /* &lt;![CDATA[ */
          $.gritter.add({
              // (string | mandatory) the heading of the notification
              title: 'Notification',
              // (string | mandatory) the text inside the notification
              text: 'Comment on your staus',
              // (bool | optional) if you want it to fade out on its own or just sit there
              sticky: true, 
              // (int | optional) the time you want it to be alive for before fading out (milliseconds)
              time: 8000,
              // (string | optional) the class name you want to apply directly to the notification for custom styling
              class_name: 'gritter-light',
              // (function | optional) function called before it closes
              before_close: function(e, manual_close){
                  '#{notificationBean.set0ToGrowlToShow(p.notificationID)}'
              }
          });
          /* ]]&gt; */
          &lt;/script&gt;
      &lt;/c:forEach&gt;
  &lt;/h:body&gt;
  </code></pre>