ResourceBundles problem p:commandButton

UI Components for JSF
Post Reply
Galanthein
Posts: 11
Joined: 07 Apr 2010, 16:13

07 Apr 2010, 16:31

Hello,

I have a malfunction with the primefaces library.

The xhtml page contains a field corresponding to the following code

Code: Select all

<h:inputText readonly="#{productBill.blockQuant}" style="width:4em;" binding="#{productBill.quantityTxt}" value="#{productBill.quantProduct}"/>
Of course productBill is my ManagedBean which contain the attribute quantProduct which is declared as Integer within my Class.

I also have a primeFaces commandButton corresponding to the following code

Code: Select all

<p:commandButton update="itemInvoice" actionListener="#{productBill.addProduct_action}" async="false" styleClass="button" value="#{app['button.add']}"/>
app is the name declared for the resourceBundle.
The "addProduct_action" calculates an amount (with taxes) using the quantity of products entered in the unputText field.

This quantity is supposed to be an integer as productBill.quantProduct is. However here is the bug :

If the input entered in this field is NOT an integer (for instance "AFR") then :
  • A primefaces message appears indicating that "AFR" is not a number. This is normal and expected
  • If the attribute "async" of the commandButton is set to "true" a part of the page text (corresponding to a resourceBundle) disapears
  • If the attribute "async" of the commandButton is set to "false" the whole page text (corresponding to all the resourceBundles used) disapears
  • The addProduct_action is not processed (seen with debug entry point on the method)
  • not ANY validator/converter (custom or standard, primefaces or classic JSF) is processed
  • there is no Java exception catched anywhere. The chain process just stops (i still can use the application though)
So i am stuck because this bug appears before any action i can do.

I tried using PrimeFaces 2.0.0.RC, 2.0.0 and 2.0.1-SNAPSHOT, Firefox (3.6+) and IE (6+)

Using JDK 1.6.0_17, Tomcat 6.0.20, NetBeans 6.8

Any help will be appreciated

Thanks
Primefaces 2.2.1 / Mojarra 2.1.0
Tomcat 6.0.33
Using JDK 1.6.0_27-b07
Coding on Netbeans 7.0.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

08 Apr 2010, 10:33

You are making an ajax request with p:commandButton, is this the behavior you want, correct name of attribute is ajax="true|false" to configure this behavior.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 40 guests