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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:25:42+00:00 2026-05-26T07:25:42+00:00

I have this xhtml code: <p:dataGrid id=dgData columns=1 rows=100 value=#{myStickiesController.items} var=sticky> <p:panel header=From :#{sticky.users.displayName}

  • 0

I have this xhtml code:

<p:dataGrid id="dgData"
    columns="1"
    rows="100"
    value="#{myStickiesController.items}"
    var="sticky">
    <p:panel header="From :#{sticky.users.displayName}" rendered="#{eventstickiesController.eventSticky}" binding="#{eventstickiesController.eventPanel}">
        <f:attribute name="stickyId" value="#{sticky.stickyID}" ></f:attribute>
        <h:panelGrid columns="2">
            <p:graphicImage value="#{imageStreamer.fileContent}" style="width:50px; height: 50px" alt="No Profile Image">
                <f:param id="uid" name="uid" value="#{sticky.users.userID}" />
            </p:graphicImage>
            <h:outputLabel value="Event Info : #{eventstickiesController.content}" binding="#{eventstickiesController.outputLabel}">
                <f:attribute name="stickyId" value="#{sticky.stickyID}" ></f:attribute>
            </h:outputLabel>
        </h:panelGrid>
        <f:facet name="footer">
            <p:commandButton image="/images/buttons/Delete.gif"
                             actionListener="#{myStickiesController.deleteSticky}"
                             action="#{snippetsStickyEditorLinkerBean.updateSnippetLink}"
                             update="dgData" >
                <f:attribute name="stickyId" value="#{sticky.stickyID}" ></f:attribute>
                <f:param  name="pageViewId" value="Default"/>
            </p:commandButton>
        </f:facet>
    </p:panel>
</p:dataGrid>

the code of the actionListener class:

public class MyStickiesController {
public void deleteSticky(ActionEvent ae)
{
    Long sid = (Long)ae.getComponent().getAttributes().get("stickyId");
    Stickies s = ejbFacade.find(sid);
    List<Recipients> rl = s.getRecipientsList();
    DBConnectionProxyUser sbcpu = new DBConnectionProxyUser();
    Users currentUser = sbcpu.getConnectedUser(ejbUsersFacade);
    for (Recipients r:rl)
    {
        if (currentUser.getUserID()==r.getUsers().getUserID())
        {
            r.setDisplay(Boolean.FALSE);
        }
    }       
}
}

Now, if I put the command button that is inside the p:dataGrid, the dataGrid is updated and the actionListener works. If I put the button inside the dataGrid, the dataGrid is not updated and the actionListener doesn’t work.

I tried wrapping thw whole thing with p:outputPanel, and the actionListener doesn’t work.

The ActionEvent is javax.faces.event.ActionEvent
I am using Mojarra 2.1.3 with primefaces 2.2.1, Glassfish 3.0.1 and Netbeans 6.9.1

Thanks in advance…

  • 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-26T07:25:42+00:00Added an answer on May 26, 2026 at 7:25 am

    I managed to make it work…

    The solution renders into 2 parts:

    1. I updated the Glassfish Mojarra Module to 2.1.3

    2. I added a p:remotecommamd and a p:outputpanel to be rendered in case the inner snippet is to be rendered. Other snippets are easy to be rendered.

    I hope this one helps somebody…

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

Sidebar

Related Questions

I have an html page with this code <object data=ciao.xhtml width=100% height=100% type=application/xhtml+xml> </object>
I have this code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml
I have this xpath query: descendant-or-self::link and this html code: <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta
I have this code function calculateTotal() { var total = 0; $(.quantity).each(function() { if
I have this simple code in facelets numbers.xhtml: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html
I have this simple jQuery code $(document).ready(function() { $('#test').attr('value','hello world'); $('#test1').text('hello world'); }); And
I have this code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml>
in a JSF facelet page (.xhtml) I have this javascript code <script type=text/javascript> function
I have this simplified code: <div class=container> <input type=submit name=submit class=submit value=Sign Up> </div>
i have this simple layout css which provide 3 rows layout css code <style

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.