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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:17:46+00:00 2026-05-26T04:17:46+00:00

We have a list to be displayed under a panel of the screen where

  • 0

We have a list to be displayed under a panel of the screen where all the code in which the fields are repeatable are kept under a different Facelet file. While I am trying to render an image based on the listener’s action for an ajax event I am getting some problem to update the image with ID as JSF is generating an ID with the index in the middle due to the use of <ui:repeat> like so repeatForm:repeat:2:redimage.

This is the main page:

<!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:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <title>Repeat Test Demo</title>
    </h:head>
    <h:body>
        <h:form id="repeatForm">
            <ui:repeat id ="repeat" value="#{listBean.xyzList}" var="repeatListVar">
                <p:panel id="genLiabPanelRender">
                    <ui:include src="MyScreen.xhtml" />
                </p:panel>
            </ui:repeat>
        </h:form>
    </h:body>
</html>

This Facelet is repeatable based on the list size within the panel.

MyScreen.xhtml this is the include Facelet file:

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.prime.com.tr/ui">

    <h:body class="body">
        <h:panelGrid columns="4" border="0" width="90%">
            <h:panelGroup style="display:block;text-align:left;width: 320px">
                <h:selectBooleanCheckbox value="#{repeatListVar.primaryPolicyInd}" />
                <h:outputText value="#{label.primaryCov}" />
            </h:panelGroup>
            <h:panelGroup style="display:block;text-align:left;width: 240px">
                <h:selectBooleanCheckbox value="#{repeatListVar.abcInd1}" />
                <h:outputText value="#{label.commGenLiab}" />
            </h:panelGroup>
            <h:panelGroup style="display:block;text-align:left;width: 180px">
                <h:outputText value=" #{label.eachOccur}" style="text-align:left" />
            </h:panelGroup>
            <h:panelGroup style="display:block;text-align:left;width: 130px">
                <p:inputMask mask="#{label.limitAmtMask}" id="genLiabEachOccAmt"
                        value="#{repeatListVar.a25GLEOAmt}" required="true"
                        style="width: 90px">
                    <f:ajax event="blur" render="redimage" listener="#{repeatListVar.testA25GLEOAmt}"/> 
                </p:inputMask>
                <h:graphicImage id="redimage" url="/images/icons/redIcon.png" rendered="#{repeatListVar.testA25GLEOAmtInd}" />
            </h:panelGroup>

This ends up generating IDs for the <h:outputText> that look like: repeatForm:repeat:2:redimage. But because we’re using the <f:ajax> tag, we only need to specify "redimage". The tag takes care of the work of finding out what the real ID is.

We are calling a method in the listener and set the value of boolean indicator to either true or false which is false by default. The indicator is used to render the image.

But when we are using this <f:ajax> to render the image based on the indicator value, I am getting the error

malformedXML: During update repeatForm:repeat:2:redimage not found

How is this caused and how can I solve this?

  • 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-26T04:17:46+00:00Added an answer on May 26, 2026 at 4:17 am

    This should work. I see only 2 possible causes:

    1. Your bean is request scoped and does not preserve the <ui:repeat> value. Fix the bean constructor’s job and/or put the bean in the view scope.

    2. Your HTML output is syntactically invalid and is therefore confusing the JavaScript code who is responsible for updating the HTML DOM tree. You should not use <html> and <h:body> in the include file. It would be duplicated in the HTML output. You should only use it in the master page. The include page should look like this:

      <ui:composition 
          xmlns="http://www.w3.org/1999/xhtml"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:ui="http://java.sun.com/jsf/facelets">
          <h:panelGrid columns="4" border="0" width="90%">
              ...
          </h:panelGrid>
      </ui:composition>
      

      Do not duplicate <html>, <h:head> and/or <h:body> in there.

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

Sidebar

Related Questions

I have a list of elements which needs to be displayed in a NSPopUpButton.
I have a page on which a list of properties is displayed (i.e houses).
In my UI I have a list of names which I have displayed using
I have a list of items that are displayed using a ListView from a
I have a list of the user's images displayed, (who has already allowed access
I have a list of images that need to be displayed. However theres only
I have a list of object that need to be displayed and moveable on
I need to have a list of links generated by JSF and displayed in
I have a list of images (thumbnails), displayed as a gallery. These images have
I have a list of states, each with some data associated with it, displayed

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.