Note that there are some explanatory texts on larger screens.

plurals
  1. POPrimefaces push encoding
    text
    copied!<p>I use primefaces push to write a message in a p:notificationBar. if i push a message with specials characters (like russians char), I've got '?' in my message. How can I fix this problem ? Thanks for your help. </p> <p>(config : primefaces 3.4 and jsf2. All my html pages are utf8 encoding).</p> <p>Here is my view code : </p> <pre><code>&lt;p:notificationBar id="bar" widgetVar="pushNotifBar" position="bottom" style="z-index: 3;border: 8px outset #AB1700;width: 97%;background: none repeat scroll 0 0 #CA837D;"&gt; &lt;h:form prependId="false"&gt; &lt;p:commandButton icon="ui-icon-close" title="#{messages['gen.close']}" styleClass="ui-notificationbar-close" type="button" onclick="pushNotifBar.hide();"/&gt; &lt;/h:form&gt; &lt;h:panelGrid columns="1" style="width: 100%; text-align: center;"&gt; &lt;h:outputText id="pushNotifSummary" value="#{growlBean.summary}" style="font-size:36px;text-align:center;"/&gt; &lt;h:outputText id="pushNotifDetail" value="#{growlBean.detail}" style="font-size: 20px; float: left;" /&gt; &lt;/h:panelGrid&gt; &lt;/p:notificationBar&gt; &lt;p:socket onMessage="handleMessage" channel="/notifications"/&gt; &lt;script type="text/javascript"&gt; function handleMessage(data) { var substr = data.split(' %% '); $('#pushNotifSummary').html(substr[0]); $('#pushNotifDetail').html(substr[1]); pushNotifBar.show(); } &lt;/script&gt; </code></pre> <p>and my Bean code : </p> <pre><code>public void send() { PushContext pushContext = PushContextFactory.getDefault().getPushContext(); String var = summary + " %% " + detail; pushContext.push("/notifications", var); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload