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 6895743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:56:53+00:00 2026-05-27T06:56:53+00:00

I have the following page and somehow the <p:commandButton value=Save update=data oncomplete=edit.hide(); actionListener=#{dataBean.update} />

  • 0

I have the following page and somehow the

<p:commandButton value="Save" update="data" oncomplete="edit.hide();" actionListener="#{dataBean.update}" />

does not call the method speficied in the actionListener. I checked all the options from this post and everything seems to be correct. Am I missing something?

Page

<h:body id="body" style="margin:50px; font-size: 80%">
<f:view contentType="text/html">
    <h:form>
        <p:ajaxStatus onstart="statusDialog.show();"
            onsuccess="statusDialog.hide();" />

        <p:dialog modal="true" widgetVar="statusDialog" header="Processing"
            draggable="false" closable="false" resizable="false" width="255">
            <p:graphicImage value="./images/ajax-loader.gif" />
        </p:dialog>

        <p:commandButton value="Delete selected"
            onclick="confirmationSelected.show()" />

        <p:commandButton value="Refresh data" update="data"
            style="float:right" actionListener="#{dataBean.refresh}" />

        <p:dataTable var="item" value="#{dataBean.records}" id="data"
            paginator="true" rows="10" selection="#{dataBean.selectedRecords}"
            paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
            rowsPerPageTemplate="5,10,15,20,25,50,100">

            <f:facet name="header">Stored records</f:facet>

            <p:column selectionMode="multiple" />
            <p:column style="width:18px; text-align:center;">
                <p:rowToggler />
            </p:column>
            <p:column headerText="Time" style="width:80px; text-align:center;"
                sortBy="#{item.time}" filterby="#{item.time}"
                filterMatchMode="contains">
                <h:outputText value="#{item.time}">
                    <f:convertDateTime type="both" dateStyle="short" />
                </h:outputText>
            </p:column>
            <p:column headerText="URL" style="word-break: break-all"
                sortBy="#{item.url}" filterby="#{item.url}"
                filterMatchMode="contains">
                <h:outputText value="#{item.url}" />
            </p:column>
            <p:column headerText="Rating" style="width:80px; text-align:center;"
                sortBy="#{item.rating}" filterby="#{item.rating}"
                filterMatchMode="contains">
                <h:outputText value="#{item.rating}" />
            </p:column>
            <p:column headerText="Key" style="width:80px; text-align:center;"
                sortBy="#{item.key}" filterby="#{item.key}"
                filterMatchMode="contains">
                <h:outputText value="#{item.key}" />
            </p:column>
            <p:column headerText="Actions"
                style="text-align:center; width:100px;">
                <p:commandLink value="Edit" oncomplete="edit.show()"
                    update="editPanel">
                    <f:setPropertyActionListener target="#{dataBean.key}"
                        value="#{item.key}" />
                </p:commandLink>
                &nbsp;
                <p:commandLink value="Delete" onclick="confirmation.show()">
                    <f:setPropertyActionListener target="#{dataBean.key}"
                        value="#{item.key}" />
                </p:commandLink>
            </p:column>
            <p:rowExpansion>
                <p:tabView>
                    <p:tab title="Page source">
                        <div
                            style="max-height: 300px; overflow-y: auto; word-break: break-all">#{item.page}</div>
                    </p:tab>

                    <p:tab title="Snippet">
                        <div
                            style="max-height: 300px; overflow-y: auto; word-break: break-all">#{item.snippet}</div>
                    </p:tab>
                </p:tabView>
            </p:rowExpansion>
        </p:dataTable>

        <p:confirmDialog message="Are you sure you want to delete this item?"
            header="Delete" severity="alert" widgetVar="confirmation"
            modal="true">
            <p:commandButton value="OK" oncomplete="confirmation.hide()"
                actionListener="#{dataBean.deleteOne}" update="data" />
            <p:commandLink value="Cancel" onclick="confirmation.hide()" />
        </p:confirmDialog>

        <p:confirmDialog
            message="Are you sure you want to delete all selected items?"
            header="Delete" severity="alert" widgetVar="confirmationSelected"
            modal="true">
            <p:commandButton value="Delete"
                oncomplete="confirmationSelected.hide()"
                actionListener="#{dataBean.deleteSelected}" update="data" />
            <p:commandLink value="Cancel" onclick="confirmationSelected.hide()" />
        </p:confirmDialog>

    </h:form>
    <p:dialog header="Edit record" widgetVar="edit" resizable="true"
        width="850" height="500" modal="true">
        <h:form id="editPanel">
            <h:outputText value="Record ID = #{dataBean.selectedRecordKey}"
                style="font-size:12pt;" />
            <p:separator />
            <h:panelGrid columns="6">
                <h:outputText style="margin-left:-2px;" value="Time:" />
                <h:inputText value="#{dataBean.selectedRecordTime}"
                    style="width: 230px" />

                <h:outputText style="margin-left:20px;" value="Url:" />
                <h:inputText value="#{dataBean.selectedRecordUrl}"
                    style="width: 375px" />

                <h:outputText style="margin-left:20px;" value="Rating:" />
                <p:spinner value="#{dataBean.selectedRecordRating}" min="1" max="5"
                    style="width: 30px" width="20" showOn="never" />
            </h:panelGrid>
            <br />
            <p:tabView>
                <p:tab title="Page source">
                    <h:inputTextarea value="#{dataBean.selectedRecordPage}" rows="13" cols="108" />
                </p:tab>

                <p:tab title="Snippet">
                    <h:inputTextarea value="#{dataBean.selectedRecordSnippet}" rows="13" cols="108" />
                </p:tab>
            </p:tabView>
            <br />
            <p:commandButton value="Save" update="data"
                oncomplete="edit.hide();" actionListener="#{dataBean.update}" />
            <p:commandLink value="Cancel" onclick="edit.hide()"
                style="margin-left:10px;" />
        </h:form>
    </p:dialog>
</f:view>

  • 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-05-27T06:56:54+00:00Added an answer on May 27, 2026 at 6:56 am

    Inside your dialog you are placing your contents inside a new Form

    <h:form id="editPanel">

    Can you remove this form and rerun your code ?

    So now all your content should be inside one form which you are creating at this line :

    <f:view contentType="text/html">
    <h:form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following JSF 2.1 page <h:selectOneRadio value=#{userBean.newUser}> <f:selectItem itemValue=0 itemLabel=new User />
I have the following ASP page: <asp:Content ID=Content2 ContentPlaceHolderID=ShellContent runat=server> <form runat=server id=AddNewNoteForm method=post>
I have the following in a page e.g. /mypage?myvar=oldvalue $_SESSION['myvar'] = $_GET['myvar']; $myvar =
i have following code to show div on page <div id=all_users> <div id=user11 userid=11
I have the following code in my Site.Master page of an almost empty ASP.NET
I have the following code in a jsp page (Struts backed): <c:if test=${USERINFO.someproperty ==
I have the following Javascript libraries loaded for my page. <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js></script> <script
I have the following code on my page: <p align=justify style=font-size:10pt;display:block;height:200px;vertical-align:middle;> Content </p> I
I have the following in an aspx page: <td colspan=2> <% DisplayParties(); %> </td>
Suppose I have the following CSS rule in my page: body { font-family: Calibri,

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.