Note that there are some explanatory texts on larger screens.

plurals
  1. POpage does not refresh after an action is called
    primarykey
    data
    text
    <p>I have <code>commandLink</code> with an <code>actionListener</code> that calls a method to change the value of <code>text</code>. The same <code>commandLink</code> has an <code>action</code> that reloads the page. When I click the <code>commandLink</code>, the <code>actionListener</code> is called. But the <code>action</code> only is completed --showing the updated value of text-- when I refresh the browser. Why isn't the <code>outputText</code> being automatically updated?</p> <p>Some code: <strong>home.jspx</strong></p> <pre><code>(...) &lt;f:view&gt; &lt;table id="main_table"&gt; &lt;tr&gt;&lt;td width="160px"&gt;&lt;jsp:directive.include file="./logo.jspx" /&gt;&lt;/td&gt; &lt;td&gt;&lt;jsp:directive.include file="./header.jspx" /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td width="160px"&gt;&lt;jsp:directive.include file="./vertical_navigation.jspx" /&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;ice:outputText value="main" /&gt;&lt;/ice:outputText&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;/f:view&gt; (...) </code></pre> <p><strong>customer.jspx</strong> is the same, but the value of the <code>outputText</code> is <code>#{customer.text}</code> <strong>vertical_navigation.jspx</strong>: many command links like the following:</p> <pre><code>(...) &lt;ice:form id="nav_form"&gt;&lt;ice:panelGrid columns="1"&gt; &lt;ice:panelCollapsible expanded="true"&gt; &lt;f:facet name="header"&gt;&lt;ice:panelGroup&gt; &lt;ice:outputText value="Customer" /&gt; &lt;/ice:panelGroup&gt;&lt;/f:facet&gt; &lt;ice:panelGrid columns="1"&gt; &lt;ice:commandLink actionListener="#{client.defineText}" immediate="true" action="customer" id="list"&gt; &lt;ice:outputText value="List" /&gt; &lt;/ice:commandLink&gt; (...) </code></pre> <p>the bean:</p> <pre><code>(...) public String text; public void defineText(ActionEvent evt) { text = ... some text related to the link } public String getText() { return text; } </code></pre> <p>Well, everything works fine, except that I have to refresh the page when I click a link so that the value of <code>text</code> is updated. I put some <code>System.out.println()</code> satatements inside the bean methods and noticed that the <code>defineText</code> method is called whenever I click a link. But the <code>getText</code> is called only after a refresh. The output is like this:</p> <pre><code>// click the link "list" called defineText for link list // click the link "new" called defineText for link new // click the link "external" called defineText for link external // refresh the broswer called getText // this will show the updated value of "text" for the link "external" // click the link "new" // refresh the broswer called defineText for link new called getText // this will show the updated value of "text" for the link "new" </code></pre> <p>I'm working with <strong>JSF 1.2</strong> and <strong>IceFaces 1.8.2</strong>.</p>
    singulars
    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.
 

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