Note that there are some explanatory texts on larger screens.

plurals
  1. POValidation messages do not show up anymore
    text
    copied!<p>I need to validate if a <code>&lt;p:spinner&gt;</code> value is between a set range.</p> <pre><code>&lt;p:spinner id="minutes" min="0" max="1000" value="#{printerSettings.t}" size ="1"&gt; &lt;f:validateLongRange minimum="0" maximum="1000" /&gt; &lt;p:ajax update="NewTime"/&gt; &lt;/p:spinner&gt; &lt;h:message for="minutes" style="color:red" /&gt; </code></pre> <p>and </p> <pre><code>&lt;p&gt;Number of copies (Max of 50) : &lt;p:spinner id ="Copies" min="1" max="50" value="#{printerSettings.p}" size ="1"&gt; &lt;!-- allows the user a choice of up to 50, this is more than enough for any situation, if needed this can be removed or raised --&gt; &lt;p:ajax update="p"/&gt; &lt;f:validateLongRange minimum="1" maximum="50" /&gt; &lt;/p:spinner&gt; &lt;div class="whiteSpace"/&gt; &lt;h:outputText value="Copies that will be printed: &amp;nbsp; #{printerSettings.p}" id="p"/&gt; &lt;h:message for="Copies" style="color:red" /&gt; &lt;/p&gt; </code></pre> <p>This was working before, but now no validation happens, no error etc. How is this caused and how can I solve it?</p> <p>EDIT</p> <pre><code> &lt;div id="site_content"&gt; &lt;div id="content"&gt; &lt;h:body&gt; &lt;h:form onsubmit="return validateForm()"&gt; &lt;p&gt; In how many minutes time would you like to have your job sent to the printer ? &lt;div class="whiteSpace"/&gt; &lt;p:spinner id="minutes" min="0" max="1000" value="#{printerSettings.t}" size ="1"&gt; &lt;p:ajax update="NewTime"/&gt; &lt;f:validateLongRange minimum="1" maximum="1000" /&gt; &lt;/p:spinner&gt; &lt;h:message for="minutes" style="color:red" /&gt; &lt;br&gt;&lt;/br&gt; &lt;br&gt;&lt;/br&gt; The time the print job will be sent to the printer will be : &lt;!--&lt;p:button actionListener="{otherBean.setTValue(printerSettings.t)}" value="Set Val" /&gt; Currently causing an error --&gt; &lt;br&gt;&lt;/br&gt; &lt;h:outputText value="#{printerSettings.getNewTime()}" id="NewTime"/&gt; &lt;br&gt;&lt;/br&gt; &lt;br&gt;&lt;/br&gt; &lt;p:commandButton type="submit" action="#{email.mail(printerSettings.t, printerSettings.p, printerSettings.paperSize, printerSettings.duplex, printerSettings.orienation, printerSettings.printer)}" onclick="Thankyou()" value="Print" /&gt; &lt;p:button outcome="index" value="Homepage" icon="ui-icon-home"&gt; &lt;/p:button&gt; &lt;/h:form&gt; &lt;/h:body&gt; &lt;/div&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; function Thankyou() { alert("Sent to the printing holding queue, you may close this app now or carry on using this app, your work will still print out "); //location.href = 'index.xhtml'; } </code></pre> <p>is that ok ? i can post more code if required, as said in my comment the validation seems to be working, it is just the errors messages that are now displaying at all</p> <p>EDIT</p> <pre><code> &lt;p:commandButton type="submit" update ="minutes2 Copies2" action="#{email.mail(printerSettings.t, printerSettings.p, printerSettings.paperSize, printerSettings.duplex, printerSettings.orienation, printerSettings.printer)}" onclick="Thankyou()" value="Print" /&gt; </code></pre>
 

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