Note that there are some explanatory texts on larger screens.

plurals
  1. PORequired fields with OmniFaces 1.6.1
    primarykey
    data
    text
    <p>Primefaces 3.5.16, JBoss 7.2.0, PE 0.7.1, Mojara 2.1.26, WELD-000900 1.1.10 (Final) Web.xml has some configuration stuff, faces-config has languages bundles defined.</p> <p>I have following dialog with some input fields and p:tabview: </p> <pre><code>&lt;p:dialog&gt; &lt;h:form&gt; &lt;p:tabView binding="#{tabViewEL}"&gt; &lt;p:messages autoUpdate="true"/&gt; &lt;p:tab title="tab1"&gt; &lt;p:inputText value="#{bean.value1}" required="true" /&gt; &lt;p:inputText value="#{bean.value2}" /&gt; &lt;p:selectOneMenu value="#{bean.value3}"&gt; &lt;f:selectItems value="#{bean.items1}"&gt;&lt;/f:selectItems&gt; &lt;/p:selectOneMenu&gt; &lt;/p:tab&gt; &lt;p:tab&gt; ... &lt;/p:tab&gt; &lt;/p:tabView&gt; &lt;p:commandButton value="ok" oncomplete="checkAndHide(xhr, status, args);" action="#{bean.action()}"/&gt; &lt;/h:form&gt; &lt;/p:dialog&gt; </code></pre> <p>If I click "ok" and I am using OmniFaces v. 1.5 or 1.6 it functions right. If I'm using 1.6.1 all required fields (and p:selectOneMenu without null-selected-Item) are marked red with errors "Value is required". How can I use 1.6.1 without validation errors ?</p> <p><em><strong>Edit</em></strong> : I've tried to create an example but I've discovered another curious behavior of application. With OmniFaces 1.6 it functions right, but with 1.6.1 the input fields are not filled with values. </p> <pre><code> OmnitestBean.java import java.io.Serializable; import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; import javax.inject.Named; @Named @SessionScoped public class OmnitestBean implements Serializable{ private Integer value1 = 12; private Integer value2 = 3; public OmnitestBean (){ System.out.println("Constru"); } @PostConstruct public void a(){ value1 = 14; value2 = 30; System.out.println("in postconstruct"); } public Integer getValue1() { return value1; } public void setValue1(Integer value1) { this.value1 = value1; } public Integer getValue2() { return value2; } public void setValue2(Integer value2) { this.value2 = value2; } public void action(){ System.out.println("In action"); } } </code></pre> <p>omnifaces.xhtml:</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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:pe="http://primefaces.org/ui/extensions"&gt; &lt;h:head /&gt; &lt;body&gt; &lt;h:form id="editPopForm"&gt; &lt;p:messages id="messages2" autoUpdate="true"&gt;&lt;/p:messages&gt; &lt;p:inputText value="#{omnitestBean.value1}" required="true" /&gt; &lt;p:inputText value="#{omnitestBean.value2}" /&gt; &lt;p:commandButton process="@form" action="#{omnitestBean.action()}" value="OK" update="@form" id="editFormOkButt" /&gt; &lt;/h:form&gt; </code></pre> <p> </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.
 

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