p:commandButton inside of <h:form id="test-form"> fails

UI Components for JSF
Post Reply
Sargash
Posts: 15
Joined: 05 Apr 2010, 15:44
Location: Russia, Saint-Petersburg
Contact:

23 Jul 2010, 18:29

The p:commandButton loses css-classes if it is placed inside of h:form id="test-form", but it works fine with h:form id="test_form". It appears because of the name of javascript variable for PrimeFaces.widget.CommandButton object is made from IDs of parent forms.

Here are the piece of code that illustrate the problem:

Code: Select all

    <h:form id="test-form">

        p:commandButton fails when id of h:form includes symbol - <br/>  
            <p:commandButton value="AJAX" ajax="true" actionListener="#{buttons_model.ajax}" update="ajax_res"/>
            <h:outputText value="#{buttons_model.ajax}" id="ajax_res"/>

    </h:form>
Last edited by Sargash on 23 Jul 2010, 18:32, edited 2 times in total.
primefaces 1.1RC1
tomcat 6.0.26, pluto-2.0.0, portlet-bridge-2.0.0, mojarra 1.2_14, facelets-1.1.14

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

23 Jul 2010, 18:32

It is not supported to use - right now.

Sargash
Posts: 15
Joined: 05 Apr 2010, 15:44
Location: Russia, Saint-Petersburg
Contact:

23 Jul 2010, 18:38

Validation of parent form ID with diagnostic message to Log or throwing an exception will be good. If it is posible. Finding the cause of that kind of problem for first time is quite disappointing ;)
primefaces 1.1RC1
tomcat 6.0.26, pluto-2.0.0, portlet-bridge-2.0.0, mojarra 1.2_14, facelets-1.1.14

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

23 Jul 2010, 22:52

- needs to be escaped by jQuery, we currently escape semi-colon which is the default naming container seperator. So this fails silently :)

I agree with your comment, thanks for the feedback, something to think about for a future release.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests