I use the following code. The main idea is to update all dialog strings when the value of the language combo is changed. It works fine, except the dialog title. It is outside of the form so I must to specify its id directly in the render parameter. As you can see, this ID is different from the one specified (dialog-tile) as the final title id is overriden by some default value (ui-dialog-title) and my ID is used as a suffix. Although this final ID (ui-dialog-title-dialog-title) matches the ID in the document, it isn't updated. I don't know if it is problem of jsf.js library or Primefaces component or any bug in my source...
Code: Select all
<p:dialog id="dialog-title" header="#{msg['pageTitle']}" widgetVar="settingsDialog" modal="true" height="200" resizable="false">
<h:form>
<h:outputText value="#{msg['intro']}" />
<h:selectOneMenu value="#{language.localeCode}"
onchange="jsf.ajax.request(this, event, {render:'ui-dialog-title-dialog-title @form'}); return false;"
valueChangeListener="#{language.countryLocaleCodeChanged}">
<f:selectItems value="#{language.countriesInMap}" />
</h:selectOneMenu>
<h:commandButton value="Submit" action="index.xhtml?faces-redirect=true&includeViewParams=true"/>
</h:form>
</p:dialog>
Thanks for any hint.
Regards,
Jan