Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8889315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:13:52+00:00 2026-06-14T22:13:52+00:00

Im my web app i have the following form that opens up in a

  • 0

Im my web app i have the following form that opens up in a dialog:

<!-- Event edit -->
    <p:dialog id="editEvent" 
              widgetVar="dlgEdit" 
              modal="true"
              resizable="true" 
              closable="true"
              header="Edit event">
        <p:panelGrid columns="1" 
                     styleClass="gridNoLine">
            <p:panelGrid columns="1">
                <p:messages id="mEditMessages"
                            closable="true" 
                            redisplay="true"/>
            </p:panelGrid>
            <p:panelGrid columns="2" styleClass="gridNoLine">
                <h:outputLabel value="..." />
                <p:inputText value="#{eventBean.event.eventName}"
                             required="true"
                             requiredMessage="XXX"/>
            </p:panelGrid>
            <p:panelGrid columns="2" styleClass="gridNoLine">
                <h:outputLabel value="..." />
                <p:inputTextarea value="#{eventBean.event.eventDescription}"
                                 required="true"
                                 requiredMessage="XXX" />
            </p:panelGrid>

            ...

            <p:commandButton id="cbUpdateEvent" 
                             value="Update"
                             actionListener="#{eventBean.update}"
                             oncomplete="handleAction(xhr, status, args);"
                             process="@form"
                             update="mEditMessages OTHERCONTROLS"/>

        </p:panelGrid>
    </p:dialog>

This dialog is opened from a commandButton column for each row of a DataTable as the following code shows:

<p:dataTable value="#{eventBean.events}" 
             var="event">
    <p:column styleClass="commandColumn">
        <f:facet name="header">
            <h:outputLabel value="Editar"/>
        </f:facet>
        <p:commandButton image="ui-icon-pencil" 
                     title="Edit"
                     update="editEvent"
                     oncomplete="dlgEdit.show();"
                     process="@this">
            <f:setPropertyActionListener value="#{event}" target="#{eventBean.event}" />
        </p:commandButton>
    </p:column>
    ...
 </p:dataTable>

The problem is: When i open the dialog, clear a random field (just to test validation) and click the update button a warning message shows on the dialog. Fine. But when i clear another field and click the update button, the required message associated with that control doesn’t show. And then when i close the dialog and click once again in any alter column of any row nothing happens. I can see the following message on the browser console:

Uncaught SyntaxError: Unexpected token { 

OBS: If i click the edit command and do not modify any field and just close, the app works fine and i can view the edit dialog for other records.

UPDATE:
Here is the template.xhtml code:

<h:body>
    <div class="structure"> 
        <div class="top">
        </div>
        <!--Base Menu -->
        <h:form id="menu">
            <div class="menu">
                <p:menubar autoDisplay="true" >
                    ...
                </p:menubar>
            </div>
        </h:form>
        <!-- Conteúdo -->
        <div class="left_content">

            <ui:insert name="content">
            </ui:insert>

        </div>
        ...
    </div>
</h:body>

And here is the handleAction code:

function handleAction(xhr, status, args){
    switch(args.key){
        case 'update': 
            dlgEdit.hide();
            break;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:13:54+00:00Added an answer on June 14, 2026 at 10:13 pm

    I’ve found the error. I just was importing the primefaces jar twice as pointed here. I had a primefaces-3.4.jar in my WEB-INF/lib folder and in my pom.xml file. I did remove the jar inside WEB-INF/lib and everything went right.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have configured in following way that spring MVC app using Spring 3.1.1.RELEASE web.xml
I have a web app with a form that I am trying to pass
In the web.xml of my web app I have configured the server as following:
I have a PHP app running happily on the following system: web app: PHP
I have an input box in my web app, If I type the following
I have a JavaScript data structure like the following in my Node.js/Express web app:
In a web app I am developing I display a Modal dialog using Bootstrap.
I have an ASP.NET web app (with C#). In it I have a form
I'm integrating Gigya with a web app running Acegi. I have it working that
I have the following form parsial that I'm using in activeadmin on in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.