Note that there are some explanatory texts on larger screens.

plurals
  1. POUpdate component on template.xhtml from test.xhtml
    primarykey
    data
    text
    <p>I have a menutab on my template that i am using on every page. I would like to update a component from the template from another paged which is based on the template.</p> <p>Its working like just any other emailpage, as soon as i read an email, it should update the number of the unread emails. The number is shown in the menutab in the template.xhtml and the emails are on my test.xhtml. As soon as I read an email it should update the number of the unread emails in the menutab in template.xhtml. </p> <p>this is my template.xhtml</p> <pre><code>&lt;ui:define name="navi"&gt; &lt;h:form id="navForm"&gt; &lt;div id="MMeineVersicherungen" class="hauptmenu"&gt; &lt;h:commandLink action="#{navigationController.switchView('1')}"&gt;#{messages['menu.1']}&lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MPolizzen" class="menuitem"&gt; &lt;h:commandLink action="#{navigationController.switchView('1.1')}" styleClass="#{navigationController.isAktPageId('1.1') or navigationController.isAktPageId('1') ? 'activelink' : ''}"&gt;- #{messages['menu.1.1']}&lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MSchaeden" class="menuitem"&gt; &lt;h:commandLink action="#{navigationController.switchView('1.2')}" styleClass="#{navigationController.isAktPageId('1.2') ? 'activelink' : ''}"&gt;- #{messages['menu.1.2']}&lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MTopKunden" class="menuitem"&gt; &lt;h:commandLink action="#{navigationController.switchView('1.3')}" styleClass="#{navigationController.isAktPageId('1.3') ? 'activelink' : ''}"&gt;- #{messages['menu.1.3']}&lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MMeineDaten" class="hauptmenu"&gt; &lt;h:commandLink action="#{navigationController.switchView('2')}"&gt;#{messages['menu.2']}&lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MKundendaten" class="menuitem"&gt; &lt;h:commandLink action="#{navigationController.switchView('2.1')}" styleClass="#{navigationController.isAktPageId('2.1') or navigationController.isAktPageId('2') ? 'activelink' : ''}"&gt;- #{messages['menu.2.1']}&lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MBenutzer" class="menuitem"&gt; &lt;h:commandLink action="#{navigationController.switchView('2.2')}" styleClass="#{navigationController.isAktPageId('2.2') ? 'activelink' : ''}"&gt;- #{messages['menu.2.2']} &lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MPostfach" class="hauptmenu"&gt; &lt;h:commandLink action="#{navigationController.switchView('3')}" styleClass="#{navigationController.isAktPageId('3') ? 'activelink' : ''}"&gt;(#{post.getAnzahlNeueNachrichten()}) #{messages['menu.3']} &lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MKommunikationsvereinb" class="hauptmenu"&gt; &lt;h:commandLink action="#{navigationController.switchView('4')}" styleClass="#{navigationController.isAktPageId('4') ? 'activelink' : ''}"&gt;#{messages['menu.4']}&lt;/h:commandLink&gt; &lt;/div&gt; &lt;div id="MAbmelden" class="hauptmenu" style="margin-top: 20px;"&gt; &lt;h:commandLink action="#{loginController.logout}" value="#{messages['menu.5']}" /&gt; &lt;/div&gt; &lt;/h:form&gt; &lt;/ui:define&gt; </code></pre> <p>this is test.xhtml</p> <pre><code>&lt;ui:define name="main"&gt; &lt;h:form id="postform"&gt; &lt;p:dialog id="msgdlg" dynamic="true" modal="true" widgetVar="msgdlg" width="600" height="500"&gt; &lt;f:facet name="header"&gt;#{post.aktNachricht.subject}&lt;/f:facet&gt; &lt;p:ajax event="close" listener="#{post.closeDlg}" /&gt; &lt;p:hotkey bind="esc" handler="msgdlg.hide(); " /&gt; &lt;ui:include src="#{post.view}" /&gt; &lt;/p:dialog&gt; &lt;p:tabView id="posttabview" activeIndex="0" cache="true"&gt; &lt;p:tab id="empftab" title="#{messages['post.empfangen']}" titleStyleClass="thementab"&gt; &lt;p:dataTable value="#{post.empfangenList}" var="msg"&gt; &lt;p:column styleClass="coldatum"&gt; &lt;p:commandLink action="#{post.showNachricht(msg)}" oncomplete="msgdlg.show();" update=":postform"&gt; &lt;h:outputText value="#{msg.datum}" styleClass="#{msg.gelesen ? '' : 'unread'}"&gt; &lt;f:convertDateTime pattern="dd.MM.yyyy" timeZone="Europe/Berlin" /&gt; &lt;/h:outputText&gt; &lt;/p:commandLink&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;h:outputText value="#{msg.subject}" styleClass="#{msg.gelesen ? '' : 'unread'}" /&gt; &lt;/p:column&gt; &lt;/p:dataTable&gt; &lt;/p:tab&gt; &lt;p:tab id="sendtab" title="#{messages['post.gesendet']}" titleStyleClass="thementab"&gt; &lt;/p:tab&gt; &lt;/p:tabView&gt; &lt;br /&gt; &lt;p:commandButton value="#{messages['post.neu']}" action="#{post.neu}" update="msgdlg" oncomplete="msgdlg.show();" /&gt; &lt;/h:form&gt; &lt;/ui:define&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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