Aufruf von JSF-managed-bean-Methode mit Argumenten in jQuery

Ich bin mit JSF um eine Website zu bauen. Ich habe jQuery-Gritter (Knurren) Benachrichtigung auf meiner Homepage. Ist es möglich, den Anruf zu einem managed-bean-Methode innerhalb der before_close: von $.gritter.add Funktion?

Den code, den ich verwenden wollte ist wie folgt:

<h:body>
    <c:forEach items="#{notificationBean.growlNotificationList}" var="p">
        <script>
        /* <![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)}'
            }
        });
        /* ]]> */
        </script>
    </c:forEach>
</h:body>
InformationsquelleAutor | 2013-03-27
Schreibe einen Kommentar