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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:53:10+00:00 2026-06-14T18:53:10+00:00

I am trying to attach tooptips to commandButtons in a ui:repeat loop. I create

  • 0

I am trying to attach tooptips to commandButtons in a ui:repeat loop. I create ids of commandButtons dynamically and “for” properties of tooltips too. This gives following error:

    HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Cannot find component "a_test" in view.
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
    org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
root cause

javax.faces.FacesException: Cannot find component "a_test" in view.
    org.primefaces.component.tooltip.TooltipRenderer.getTarget(TooltipRenderer.java:93)
    org.primefaces.component.tooltip.TooltipRenderer.encodeScript(TooltipRenderer.java:66)
    org.primefaces.component.tooltip.TooltipRenderer.encodeEnd(TooltipRenderer.java:35)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:883)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
    com.sun.faces.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:104)
    com.sun.faces.facelets.component.UIRepeat.process(UIRepeat.java:504)
    com.sun.faces.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:958)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
    javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:853)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
    com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
    org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.12 logs.

Apache Tomcat/7.0.12

My jsf follows:

<!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"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head></h:head>
<h:form id="MyForm">
    <ui:repeat var="rs"
        value="#{rezervasyonBean.rezervasyonSaatleriListesi}">
        <p:commandButton action="#" value="#{rs.saatAraligi}"
            update="@form" 
            id="#{rs.saatAraligi}_test" 
        />

        <p:tooltip for="#{rs.saatAraligi}_test" value="test text"/>
    </ui:repeat>

</h:form>
</html>

rezervasyonBean.rezervasyonSaatleriListesi is as list and elements of the rs.saatAraligi are a,b,c.

My question is: how can I identify ui components dynamically and “for” attribute of p:tooltip in the same way?

Regards.

  • 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-14T18:53:11+00:00Added an answer on June 14, 2026 at 6:53 pm

    The ID attribute of JSF UI components is evaluated during view build time, however the <ui:repeat> runs during view render time and thus #{rs.saatAraligi} would evaluate to null and hence the ID of the command button would always be _test.

    Just remove the #{rs.saatAraligi} expression from the id and for. You don’t need it here. JSF will automatically prefix the iteration index of <ui:repeat> and thus ensure uniqueness of the ID.

    <p:commandButton action="#" value="#{rs.saatAraligi}"
        update="@form" 
        id="test" 
    />
    <p:tooltip for="test" value="test text"/>
    

    See also:

    • JSTL in JSF2 Facelets… makes sense? – the same story applies to id attribute of JSF UI components
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question related to this one : I'm trying to attach an
I'm trying to attach an image on a button in WPF, however this code
I'm trying to attach a jQuery plugin to a dynamically generated button. I've tried
HiI am trying to attach the where clause to sql statement like this public
I'm using this tickertype jquery plugin: http://www.hungry-media.com/code/jQuery/tickerType/ And I'm trying to attach a hover
I am trying to attach an attribute to the particular property in the this
I am trying to attach the Netbeans profiler to my Java project but it
I am trying to attach onBlur and onFocus handler to a SSN input field.
I'm trying to attach my database on a server that is running SQL2005 and
I'm trying to attach < Previous and Next > links to a jQueryUI datepicker

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.