Note that there are some explanatory texts on larger screens.

plurals
  1. POa4j:commandLink not setting value the first time
    primarykey
    data
    text
    <p>I have placed three command links in my page. The first time I press one of the command links, its value is not updated in the bean. However, from the second time onwards it works. Can anyone please help me? Is there something to do with having two forms in my JSF?</p> <p>Here is the code I have been using:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:f="http://java.sun.com/jsf/core"&gt; &lt;h:head&gt; &lt;title&gt;My Registration Page&lt;/title&gt; &lt;link href="stylesheet/reset.css" rel="stylesheet" type="text/css" /&gt; &lt;link href="stylesheet/style.css" rel="stylesheet" type="text/css" /&gt; &lt;link rel="icon" type="image/png" href="images/icons/favicon.png" /&gt; &lt;script src="script/script.js" /&gt; &lt;/h:head&gt; &lt;h:body&gt; &lt;h:form id="secondForm"&gt; &lt;a4j:commandLink id="pendingTransactions" action="#{tellerBean.filterTransactions}" value="Show Pending" styleClass="button category-btn"&gt; &lt;/a4j:commandLink&gt; &lt;a4j:commandLink id="processedTransactions" action="#{tellerBean.filterTransactions}" value="Show Processed" styleClass="button category-btn"&gt; &lt;/a4j:commandLink&gt; &lt;a4j:commandLink id="allTransactions" action="#{tellerBean.filterTransactions}" value="Show All" styleClass="button category-btn"&gt; &lt;/a4j:commandLink&gt; &lt;/h:form&gt; &lt;/h:body&gt; &lt;/html&gt; </code></pre>
    singulars
    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.
 

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