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

  • Home
  • SEARCH
  • 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 892891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:07:58+00:00 2026-05-15T14:07:58+00:00

When the Apache My Faces JSF 1.2 Implementation renders an HTML page behind the

  • 0

When the Apache My Faces JSF 1.2 Implementation renders an HTML page behind the scenes , is it even possible to set/code something which will display a pure HTML Table / DIV (NOT the jsf component ) conditionally. When I searched , I saw that , using h:panelGroup is a solution, but I haven’t tried yet, posting here for any better methods or approaches.

Its almost like wanting to say – writing a javascript code in java and inject it when the HTML is rendered – is it possible?

Thanks,

  • 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-15T14:07:59+00:00Added an answer on May 15, 2026 at 2:07 pm

    Several ways.

    1. Use <h:panelGroup layout="block">. It renders a HTML <div> element.

      <h:panelGroup layout="block" rendered="#{bean.condition}">
          content
      </h:panelGroup>
      
    2. Wrap the HTML <div> element inside a <h:panelGroup>. Without any client-side attributes like id, styleClass, onclick, etc, the <h:panelGroup> won’t render anything. With them it would however render a <span> element (or <div> if layout is set to block).

      <h:panelGroup rendered="#{bean.condition}">
          <div>content</div>
      </h:panelGroup>
      
    3. Wrap the HTML <div> element inside a <f:verbatim>.

      <f:verbatim rendered="#{bean.condition}">
          <div>content</div>
      </f:verbatim>
      

    It’s by the way not so special that MyFaces generates HTML. The Mojarra JSF implementation also does that. The competitors Struts2, Spring MVC, Wicket, Tapestry, etc..etc.. also. Microsoft ASP.NET MVC also. PHP also. All server side languages in fact. Simply because of the fact that the webbrowser doesn’t understand them. It only understands HTML/CSS/JS 😉

    As to mixing JavaScript with Java/JSP/JSF, you may find this article useful.

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

Sidebar

Related Questions

I am using JSF 1.2 + Facelets + Apache My Faces without Tomahawk or
I set up my web app as follows: <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/WEB-INF/include/viewExpired.html</location> </error-page> so that
I have a JSP page in a JSF application which uses A4J. I want
I have a JSF Page which gets few inputs from the User, I want
With Apache/PHP5, is it possible to get the contents of an uploaded file directly
In a Screen to be rendered by a JSF Implementation, I had to show
i have developed an application using jsf 1.2. it worked fine with apache tomcat
I got the following error: > org.apache.jasper.JasperException: An > exception occurred processing JSP page
I'm trying to build a JavaServer Faces 2.0 project (using Apache Myfaces 2.0.2 +
We are using OpenSessionInViewFilter in our JSF 1.1 web application which is using Spring

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.