Problem with client side "bean" validation

UI Components for JSF
Post Reply
yfrechette
Posts: 2
Joined: 03 Oct 2016, 19:21

02 Dec 2016, 17:23

Hi,

I have create an editable datatable component with the primefaces DataTable.
Since the default edit function was not what I need for my project, I have added buttons to edit/cancel/delete record on each row.

The information displayed can be change dynamically, so the backing bean associate with the data change in the rendered components.
Ex : A dropdown will show 2 tables : City (in Backing bean :Name Size=50) and Country (Name Size=30)
When you select City, the controller will get the new requested data and the cities will be display in the datatable, ready for editing.
When you select Country, the Datatable is refresh with the Countries data.

So the jsf constraints like @Size(Max=30) and @NotNull are "map" the first time I get the data (maxlength for InputText for cities is 50 like expected) but when I changed for Countries, it's still 50, not 30 !
When I checked the HTML code, I see data-p-minlength=0 et data-p-maxlength=30 are but maxlength = 50 !

Is it possible to force primefaces to refresh/re-map the backing bean informations ?

Thanks in advance

Yves
Primefaces 6.0 JSF 2.2.14
SpingBoot 1.4.2 Java 8.0.102 x64
Apache Tomcat 8.5.6

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests