ajax update on any primefaces component doesn't work

UI Components for JSF
Post Reply
buett
Posts: 23
Joined: 13 Apr 2010, 13:12

12 Jul 2010, 15:20

Hi,

I have a problem to update a primefaces component with an ajax event.
a small example:

Code: Select all

<h:selectOneMenu id="selectMenu" value="#{myBean.menuValue}">
    <f:selectItem itemValue="true" itemLabel="Yes"/>
    <f:selectItem itemValue="false" itemLabel="No"/>
    <p:ajax event="change" update="output" process="selectMenu"/>
</h:selectOneMenu>
<p:inputMask id="output" mask="" value="#{myBean.menuValue}"/>
if I'm not using a Primefaces component e.g. <h:inputText> it works.
I tried to embed the primefaces component into an p:outputPanel but there's the same effect. if there's no primefaces component in the outputPanel it works otherwise not.

Any ideas?

Thx, regards Marcus

User avatar
michiel
Posts: 240
Joined: 07 Jun 2010, 09:12
Location: Belgium

12 Jul 2010, 15:41

have you

Code: Select all

<context-param>
    <param-name>com.sun.faces.allowTextChildren</param-name>
    <param-value>true</param-value>
</context-param>
in your web.xml

wrap your code in <h:form> tags
like:

Code: Select all

<h:form>
    <h:selectOneMenu id="selectMenu" value="#{myBean.menuValue}">
        <f:selectItem itemValue="true" itemLabel="Yes"/>
        <f:selectItem itemValue="false" itemLabel="No"/>
        <p:ajax event="change" update="output" process="selectMenu"/>
    </h:selectOneMenu>
    <p:inputMask id="output" mask="" value="#{myBean.menuValue}"/>
</h:form>
JSF-2.0, mojarra-2.0.2-FCS and PrimeFaces-2.1 on GlassFish v3.0.1 (build 22)

buett
Posts: 23
Joined: 13 Apr 2010, 13:12

12 Jul 2010, 15:52

thx for your response.

ok, I didn't post the form tags, but they exists. I also tried this context param, but no changes.

But we use myfaces 2.0.1-SNAPSHOT.

If we use the <f:ajax> instead of <p:ajax> with a valueChangeListener then it works.
The model is updated correctly, but it seems like rendering doesn't work. And if I remove all primefaces components in my updated section, it works too.

brunoaranda
Posts: 52
Joined: 17 Mar 2010, 12:40

12 Jul 2010, 16:24

As i said in the other thread (http://primefaces.prime.com.tr/forum/vi ... 7&start=10) I came across the same bug today. I have opened a JIRA ticket for MyFaces:

https://issues.apache.org/jira/browse/MYFACES-2811

But it seems the problem is happening with Mojarra as well acording to the other thread. Looking into the issue!
MyFaces 2.0.5 / PrimeFaces 3.0.M2-SNAPSHOT / JSP & EL 2.2 / Spring 3.0.5 / MyFaces Orchestra

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests