Note that there are some explanatory texts on larger screens.

plurals
  1. PO<p:inputText> auto set value when page refreshes
    primarykey
    data
    text
    <p>I am facing this problem where when I leave everything blank for inputText, click on the Save button, one of the inputText field will be auto set with 0.000000. I have been looking at this for sometime but I still couldn't figure out what is wrong with it. By right, it should remain blank.</p> <pre><code>&lt;tr&gt; &lt;td&gt;&lt;p:commandButton type="button" value="#{msg.cr1002_command_save}" onclick="confirmation.show()" id="cr1002_command_save" styleClass="commandButton"&gt; &lt;/p:commandButton&gt; &lt;p:confirmDialog id="confirmDialog" message="#{msg.cr1002_prompt_confirm_save}" severity="alert" widgetVar="confirmation"&gt; &lt;p:commandButton id="confirm" value="OK" oncomplete="confirmation.hide()" action="#{pc_Cr1002.doCr1002_command_saveAction}" ajax="false" styleClass="commandButton" /&gt; &lt;p:commandButton id="decline" value="Cancel" onclick="confirmation.hide()" type="button" styleClass="commandButton" /&gt; &lt;/p:confirmDialog&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;h:outputText styleClass="outputText" id="cr1002_output_sample_value" value="#{msg.cr1002_output_sample_value}"&gt;&lt;/h:outputText&gt; &lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;p:inputText styleClass="inputTextRefresh" id="cr1002_input_sample_value" onchange="this.form.submit()" valueChangeListener="#{pc_Cr1002.handleCr1002_input_sample_valueValueChange}" style="text-align: right" value="#{pc_Cr1002.w_currency.sample_value}"&gt; &lt;f:convertNumber pattern="##0.000000" /&gt; &lt;/p:inputText&gt; &lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;p:message styleClass="message_200px" id="cr1002_error_sample_value" for="cr1002_input_sample_value" display="text"&gt;&lt;/p:message&gt; &lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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