Icefaces / JSF page does not update </a></h1> </div> <div class="grid fw-wrap pb8 mb16 bb bc-black-075"> <div class="grid--cell ws-nowrap mr16 mb8" title="2016-01-12 19:07:53Z"> <span class="fc-light mr2">Asked</span> <time itemprop="dateCreated" datetime="2012-04-26T13:26:55.440" class="fromnow">Apr 26 '12 at 13:26</time> </div> <div class="grid--cell ws-nowrap mr16 mb8"> <span class="fc-light mr2">Active</span> <time class="fromnow" title="2012-05-10T12:06:41.907" datetime="2012-05-10T12:06:41.907">May 10 '12 at 12:06</a> </div> <div class="grid--cell ws-nowrap mb8" title="Viewed 725 times"> <span class="fc-light mr2">Viewed</span> 725 times </div> </div> <div id="mainbar" role="main" aria-label="questions and answers"> <div id="question" class="question" data-questionid="10334436" data-ownerid="1358758" data-score="-2"> <div class="post-layout"> <div class="votecell post-layout--left"> <div class="js-voting-container grid jc-center fd-column ai-stretch gs4 fc-black-200" data-post-id="10334436"> <button class="js-vote-up-btn grid--cell s-btn s-btn__unset c-pointer"><svg aria-hidden="true" class="m0 svg-icon iconArrowUpLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 26h32L18 10 2 26z"></path></svg></button> <div class="js-vote-count grid--cell fc-black-500 fs-title grid fd-column ai-center" itemprop="upvoteCount" data-value="-2">-2</div> <button class="js-bookmark-btn s-btn s-btn__unset c-pointer py4"> <svg aria-hidden="true" class="svg-icon iconBookmark" width="18" height="18" viewBox="0 0 18 18"><path d="M6 1a2 2 0 00-2 2v14l5-4 5 4V3a2 2 0 00-2-2H6zm3.9 3.83h2.9l-2.35 1.7.9 2.77L9 7.59l-2.35 1.7.9-2.76-2.35-1.7h2.9L9 2.06l.9 2.77z"></path></svg> <div class="js-bookmark-count mt4" data-value="0">0</div> </button> </div> </div> <div class="postcell post-layout--right"> <div class="s-prose js-post-body" itemprop="text"><p>When navigating from one page to another the doesn't update in my pages. Can anyone tell me why?</p> <p>The setup:</p> <p>Page a.xhtml:</p> <pre><code><html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component"> <h:head> <ui:insert name="stuffToInclude"> </ui:insert> </h:head> <h:body> .... </h:body> </code></pre> <p></p> <p>Page b.xhtml:</p> <pre><code><html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:ice="http://www.icesoft.com/icefaces/component"> <ui:composition template="/a.xhtml"> <ui:define name="stuffToInclude"> <meta name="description" content="pierre" /> <title> <ui:insert name="title"/> </title> </ui:define> </h:head> </code></pre> <p></p> <p>Page c.xhtml:</p> <pre><code><html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component"> <h:head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> </h:head> <h:body> <ui:composition template="/b.xhtml"> <ui:define name="title"> <ice:outputText id="title" nospan="true" value="C Title" /> </ui:define> ..... </h:body> </html> </code></pre> <p>Navigation to page c.jsf is done this way:</p> <pre><code>FacesContext.getCurrentInstance().getViewRoot().setViewId("c.xhtml"); </code></pre> <p>The problem is that the "TITLE" element does not update to the new title. It keeps the value from the first page that I was on before going to c.xhtml. It seems that the whole "HEAD" element isn't loaded for the new page. Suggestions?</p> <p>thanks</p></div> <div class="mt24 mb12"> <div class="post-taglist grid gs4 gsy fd-column"> <div class="grid ps-relative"> <a href="../../questions/tagged/java" class="post-tag js-gps-track" title="show questions tagged 'java'" rel="tag">java</a> <a href="../../questions/tagged/jakarta-ee" class="post-tag js-gps-track" title="show questions tagged 'jakarta-ee'" rel="tag">jakarta-ee</a> <a href="../../questions/tagged/jsf-2" class="post-tag js-gps-track" title="show questions tagged 'jsf-2'" rel="tag">jsf-2</a> <a href="../../questions/tagged/jboss" class="post-tag js-gps-track" title="show questions tagged 'jboss'" rel="tag">jboss</a> <a href="../../questions/tagged/icefaces" class="post-tag js-gps-track" title="show questions tagged 'icefaces'" rel="tag">icefaces</a> </div> </div> </div> <div class="mb0"> <div class="mt16 grid gs8 gsy fw-wrap jc-end ai-start pt4 mb16"> <div class="grid--cell mr16 fl1 w96"></div> <div class="post-signature grid--cell"> <div class="user-info "> <div class="user-action-time">edited <span title="2012-04-27T07:03:01.490" class="relativetime">Apr 27 '12 at 07:03</span></div> <div class="user-gravatar32"></div> <div class="user-details" itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <span class="d-none" itemprop="name">Pierre</span> <div class="-flair"></div> </div> </div> </div> <div class="post-signature owner grid--cell"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 26 '12 at 13:26">asked Apr 26 '12 at 13:26</time> <a href="../../users/1358758/pierre" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1358758.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Pierre" /> </a> <div class="s-user-card--info"> <a href="../../users/1358758/pierre" class="s-user-card--link">Pierre</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">123</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badge">2</li> <li class="s-award-bling s-award-bling__bronze" title="9 bronze badge">9</li> </ul> </div> </div> </div> </div> </div> </div> <div class="post-layout--right js-post-comments-component"> </div> </div> </div> <div id="answers"> <a name="tab-top"></a> <div id="answers-header"> <div class="answers-subheader grid ai-center mb8"> <div class="grid--cell fl1"> <h2 class="mb0" data-answercount="9">1 Answers<span style="display:none;" itemprop="answerCount">1</span></h2> </div> </div> </div> <a name="10533626"></a> <div id="answer-10533626" class="answer accepted-answer" data-answerid="10533626" data-ownerid="1358758" data-score="0" itemprop="acceptedAnswer" itemscope="" itemtype="https://schema.org/Answer"> <div class="post-layout"> <div class="votecell post-layout--left"> <div class="js-voting-container grid jc-center fd-column ai-stretch gs4 fc-black-200" data-post-id="10533626"> <button class="js-vote-up-btn grid--cell s-btn s-btn__unset c-pointer"><svg aria-hidden="true" class="m0 svg-icon iconArrowUpLg" width="36" height="36" viewBox="0 0 36 36"><path d="M2 26h32L18 10 2 26z"></path></svg></button> <div class="js-vote-count grid--cell fc-black-500 fs-title grid fd-column ai-center" itemprop="upvoteCount" data-value="0">0</div> <div class="js-accepted-answer-indicator grid--cell fc-green-500 py6 mtn8"><div class="ta-center"><svg aria-hidden="true" class="svg-icon iconCheckmarkLg" width="36" height="36" viewBox="0 0 36 36"><path d="m6 14 8 8L30 6v8L14 30l-8-8v-8z"></path></svg></div></div> </div> </div> <div class="postcell post-layout--right"> <div class="s-prose js-post-body" itemprop="text"><p>We have now change the way we navigate to pages. Now we're using:</p> <pre><code>FacesContext.getCurrentInstance().getExternalContext().redirect(getViewId()); </code></pre></div> <div class="mb0"> <div class="mt16 grid gs8 gsy fw-wrap jc-end ai-start pt4 mb16"> <div class="grid--cell mr16 fl1 w96"></div> <div class="post-signature owner grid--cell"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="answered May 10 '12 at 12:06">answered May 10 '12 at 12:06</time> <a href="../../users/1358758/pierre" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1358758.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Pierre" /> </a> <div class="s-user-card--info"> <a href="../../users/1358758/pierre" class="s-user-card--link">Pierre</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">123</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badge">2</li> <li class="s-award-bling s-award-bling__bronze" title="9 bronze badge">9</li> </ul> </div> </div> </div> </div> </div> </div> <div class="post-layout--right js-post-comments-component"> </div> </div> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>