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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:58:51+00:00 2026-05-24T17:58:51+00:00

I have a strange situation where using @parent, or even explicit id-s dont work

  • 0

I have a strange situation where using @parent, or even explicit id-s dont work in the update attribute. But @form works fine.

I’ve made a very simple test case, that includes a simple grid whose behaviour is like this :

  1. Every record inside the grid has a modify button
  2. After the modify button is clicked, it’ll modify the server data, and the button will be gone, since it’ll be only rendered if the record has NOT been modified.

The modify button is like this :

<!-- this works, since it's using @form in the update attribute -->
<p:column>
    <p:commandLink
        value="modify record" 
        process="@this" 
        action="#{testUserBean.modifyRecord(user)}"
        update="@form"
        rendered="#{not testUserBean.isRecordModified(user)}" />
</p:column>

Notice that the update attribute makes use of @form which makes it work: when the modify button is clicked, it rerenders and disappears.

Substitute it with @this or @parent or the id of the grid, then it will NOT work. For me it’s very logical to use the id of the grid in the update attribute, since i would like to refresh the grid after clicking on the buttton.
I tried making use of rowIndexVar="rowIndex" and myGridId:#{rowIndex}:link, but still aint working.

<!-- this does not work -->
<p:column>
    <p:commandLink id="link"
        value="modify record" 
        process="@this" 
        action="#{testUserBean.modifyRecord(user)}"
        update="tblUser"
        rendered="#{not testUserBean.isRecordModified(user)}" />
</p:column>

Here are the resources for this simple example :

  1. The xhtml file
  2. The JSF Bean file
  3. The user POJO bean

Im using tomcat 7, and these are my dependencies :

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>2.2.1</version>
</dependency>
<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-api</artifactId>
    <version>2.0.4-b09</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-impl</artifactId>
    <version>2.0.4-b09</version>
    <scope>compile</scope>
</dependency>

Tried out primefaces 3.0.M1 also, but it got the same behavior also.

Please share your ideas. Is this a bug or i did something wrong ?


UPDATE


Hello,

I’ve just finished some testing, but all still fails.

Test 1 (making use of update=":gridRPBDetails") :

The JSF File :

<p:commandLink id="undoLink" value="Undo" process="@this"
    action="#{tInputBean.actionUndoRemoveRecord(rpbDetail)}"
    update=":gridRPBDetails"
    rendered="#{tInputBean.isRemoveRecord(rpbDetail)}"
    title="Batalkan buang data" />

The generated xhtml :

<a title="Batalkan buang data" onclick="PrimeFaces.ajax.AjaxRequest('/cashbank/faces/TInput.xhtml',
{formId:'j_idt38',async:false,global:true,source:'gridRPBDetails:0:undoLink',
process:'gridRPBDetails:0:undoLink',update:':gridRPBDetails'});" 
href="javascript:void(0);" id="gridRPBDetails:0:undoLink">Undo</a>

Test 2 (making use of update=":gridRPBDetails:#{rowIndex}:undoLink") :

The JSF File :

<p:commandLink id="undoLink" value="Undo" process="@this"
    action="#{tInputBean.actionUndoRemoveRecord(rpbDetail)}"
    update=":gridRPBDetails:#{rowIndex}:undoLink"
    rendered="#{tInputBean.isRemoveRecord(rpbDetail)}"
    title="Batalkan buang data" />

The generated xhtml :

<a title="Batalkan buang data" onclick="PrimeFaces.ajax.AjaxRequest('/cashbank/faces/TInput.xhtml',
{formId:'j_idt38',async:false,global:true,source:'gridRPBDetails:0:undoLink',
process:'gridRPBDetails:0:undoLink',update:':gridRPBDetails:0:undoLink'});" 
href="javascript:void(0);" id="gridRPBDetails:0:undoLink">Undo</a>

Both tests still fail in terms of clicking the undo button cannot refresh the record of the grid, or even the grid itself.


UPDATE


I’ve just updated my test using :

<p:commandLink
    value="modify record" 
    process="@this" 
    action="#{testUserBean.modifyRecord(user)}"
    update=":mainForm:tblUser"
    rendered="#{not testUserBean.isRecordModified(user)}" />

Notice i used the :mainForm:tblUser, and i’ve tried the other options and still failed :

  1. :mainForm:tblUser:
  2. :tblUser (when i dont define the form name)
  3. :mainForm:tblUser:#{rowIndex}:linkId

But 1 thing i notice is,nNo matter what i choosed for the update, the update always ends up as tblUser:0

<a onclick="PrimeFaces.ajax.AjaxRequest('/cashbank/faces/test.xhtml',
{formId:'mainForm',async:false,global:true,source:'tblUser:0:j_idt33',
  process:'tblUser:0:j_idt33',
  update:'tblUser:0'
});" href="javascript:void(0);" id="tblUser:0:j_idt33">modify record</a>

I tried modifying tblUser:0 on the fly using firebug to just tblUser, the partial rendering on the grid works fine.

Im beginning to think that this is a bug when trying to update a grid from inside a grid record.


  • 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-24T17:58:52+00:00Added an answer on May 24, 2026 at 5:58 pm

    This has been answered in here.

    Here is the quote from the answer :

    This is more like a mojarra issue, it should work fine with myfaces
    without a wrapper. Workaround is to put a wrapper.

      Code:
        <h:form id="frm">
           <p:outputPanel id="wrapper">
               <p:dataTable id="tbl">
               //...
                   <p:commandButton update=":frm:wrapper" />
               //...
               <p:dataTable>
           <p:outputPanel>
        </h:form>
    

    Sorry for the late update !

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

Sidebar

Related Questions

I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
I have a strange situation using asp ajax chart controls. I have an application
I have strange situation - when I'm trying to update model, that can contains
I really have a strange situation. I'm making a Linux multi-threaded C application using
I have a strange situation where the following code works however XCode warns it
I have a strange situation where i the f:convertNumber doesnt work when trying to
I have this strange issue with my web app. You see, I'm using jQuery
Very strange situation here: I'm using L2S to populate a DataGridView. Code follows: private
I have faced a very strange situation here. I am accessing database (MDB) through
I guess this is strange situation. I have a results table which contain 100k

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.