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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:10:25+00:00 2026-06-05T08:10:25+00:00

I have a <h:dataTable> with a <h:commandLink> in a column and a <h:outputext> outside

  • 0

I have a <h:dataTable> with a <h:commandLink> in a column and a <h:outputext> outside the <h:dataTable> which I need to render by the command link.

<h:form>
       <h:dataTable value="#{userControl.lista}" var="c">

           <h:column>
               <f:facet name="header" >
                   <h:outputText styleClass="leftColumn" value="Nombre"/>
               </f:facet>
                    #{c.nombre}
           </h:column>

           <h:column>
               <f:facet name="header" >
                   Usuario
               </f:facet>
               <h:commandLink actionListener="#{userControl.setAdmin_user(c.user)}" value="#{c.user}">
                    <f:ajax  render="output" />
               </h:commandLink>                  
           </h:column>       

       </h:dataTable>


       <h:outputText id="output" value="#{userControl.admin_user}"/>
</h:form>

It does not work. If I move the <h:outputText> inside the same column, then it works.

How is this caused and how can I solve it?

  • 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-05T08:10:26+00:00Added an answer on June 5, 2026 at 8:10 am

    The client ID as you currently have in the <f:ajax render> does not start with the default NamingContainer separator character : and is therefore relative to the current NamingContainer component, which is in your case the <h:dataTable>. So it will work only when the outputtext component is also in the same datatable.

    You need to refer the outputtext component by an absolute client ID instead. For starters who do not have memorized all NamingContainer components yet, the easiest way to find it out is to check the id attribute of the generated HTML element in the webbrowser. Open the page in webbrowser and do View Source and locate the <span> element generated by <h:outputText id="output"> and take exactly this ID and prefix it with : to make it absolute to the view root.

    E.g.

    <span id="formId:output">
    

    where formId is the ID of any <h:form> for the case the outputtext is enclosed in a <h:form>. If you don’t have specified a fixed ID for the <h:form>, then JSF will autogenerate one. You’d like to specify a fixed ID then like <h:form id="formId">.

    So the <f:ajax render> should look like this then

    <f:ajax render=":formId:output" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a h:commandLink inside rich:dataTable . When I click on the command link,
Let's say we have a simple table defined as: <p:dataTable value=#{testBean.dummyStringData} var=data> <p:column> <p:commandLink
I have datatable with column name tag and 100 rows of data.I need to
So I have the following table: <h:dataTable id=shoppingCartTable value=#{cartBean.shoppingCartList} var=shoppingCartItem width=100% > <h:column> <f:facet
I have datatable and there two column which is type of string and I
I have a h:dataTable that displays ProfileNotification like below: <h:dataTable value=#{myBean.profileNotifications} var=item rendered=#{myBean.renderProfileNotification}> <h:column>
In my JSF file I have below at the start. <h:form><h:commandLink value=Create New Staff
I have a DataTable. I want to get every rows first column value and
I have a h:commandLink in one of the column in datatable. JSF <h:commandLink id=save
I start with examples: Example 1 <p:dataTable> ... <p:column headerText=Actions style=text-align:center; width:100px;> <p:commandLink value=Delete

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.