Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy my Controller setters aren't working in my PrimeFaces project?
    primarykey
    data
    text
    <p>I'm creating some pages with PrimeFaces 2.2.1 using the Showcase source-code as support.</p> <p>I created a page exactly like <a href="http://www.primefaces.org/showcase/ui/spinner.jsf" rel="nofollow">Spinner Showcase</a>, with the same structure: </p> <pre><code>&lt;h:form prependId="false"&gt; &lt;p:panel header="Spinners"&gt; &lt;h:panelGrid id="grid" columns="2" cellpadding="5"&gt; &lt;h:outputLabel for="spinnerBasic" value="Basic Spinner: " /&gt; &lt;p:spinner id="spinnerBasic" value="#{spinnerController.number1}" /&gt; &lt;h:outputLabel for="spinnerStep" value="Step Factor: " /&gt; &lt;p:spinner id="spinnerStep" value="#{spinnerController.number2}" stepFactor="0.25" /&gt; &lt;/h:panelGrid&gt; &lt;/p:panel&gt; &lt;p:commandButton value="Submit" update="display" oncomplete="dialog.show()" /&gt; &lt;p:dialog header="Values" widgetVar="dialog"&gt; &lt;h:panelGrid id="display" columns="2" cellpadding="5"&gt; &lt;h:outputText value="Value 1: " /&gt; &lt;h:outputText value="#{spinnerController.number1}" /&gt; &lt;h:outputText value="Value 2: " /&gt; &lt;h:outputText value="#{spinnerController.number2}" /&gt; &lt;/h:panelGrid&gt; &lt;/p:dialog&gt; &lt;/h:form&gt; </code></pre> <p>Then I created my <code>SpinnerController</code> exactly like that one in the Showcase, only renaming the package to <code>org.myproject.view</code> (wich is the package name I'm using).</p> <p>And added it to my <code>faces-config.xml</code>:</p> <pre><code>&lt;managed-bean&gt; &lt;managed-bean-name&gt;spinnerController&lt;/managed-bean-name&gt; &lt;managed-bean-class&gt;org.myproject.view.SpinnerController&lt;/managed-bean-class&gt; &lt;managed-bean-scope&gt;request&lt;/managed-bean-scope&gt; &lt;/managed-bean&gt; </code></pre> <p>But when I click on the <em>Submit</em> button, the <em>Dialog</em> shows all values with <code>0</code>.</p> <p>Using breakpoints, I can see that my <code>getNumber1</code> and <code>getNumber2</code> are running, but <code>setNumber1</code> and <code>setNumber2</code> never run. I can try to change the values using the spinners or directly typing the input field, the setters don't run as well.</p> <p>Does anyone know what I'm missing in my project that exists on the Showcase project?</p>
    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