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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:11:17+00:00 2026-06-15T10:11:17+00:00

Whats the advantage is JSF 2 Panel grid vs an HTML table? e.g. <h:panelGrid

  • 0

Whats the advantage is JSF 2 Panel grid vs an HTML table?

e.g.

<h:panelGrid columns="1">
 <h:outputText value="Hello"/>
</h:panelGrid>

vs

<table>
<tr>
<td>
 <h:outputText value="Hello"/>
</td>
</tr>
</table>
  • 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-15T10:11:18+00:00Added an answer on June 15, 2026 at 10:11 am

    "h:panelGrid" tag in JSF is used to generate HTML table tags. It places JSF components in rows and columns layout. The Advantage of using it is you do not have to type all those html tags.

    For example, here you have to type all these html tags in your coding,

    <table>
    <tbody>
    <tr>
        <td>
            Enter a Phone number : 
        </td>       
        <td>
            <h:inputText id="input1" value="#{bean.input1}" 
                size="20" required="true"
                label="Number" >
                <f:convertNumber />
            </h:inputText>
        </td>
        <td>
            <h:message for="input1" style="color:red" />
        </td>
    </tr>
    </tbody>
    </table>
    

    but the same thing can be done using “h:panelGrid” by typing the following,

    <h:panelGrid columns="3">
        Enter a Phone number : 
        <h:inputText id="input1" value="#{bean.input1}" 
            size="20" required="true"
            label="Number" >
            <f:convertNumber />
        </h:inputText>
        <h:message for="input1" style="color:red" />
    </h:panelGrid>
    

    JSF doc gives more details, and panelGrid has got some limitations too.
    It would be very easy to align various panels and your can have JSF form control () within the panel, without much help from UI developer.

    One of the limitations with PanelGrid is : It would not be easy to apply CSS styles. You need look for alternate solutions. But with standard html tags it would be easy to apply CSS styles. JSF2 Primefaces gives themes but I could not avoid CSS styles in a real time application development.
    But with PanelGrid you can use almost any JSF control that fits in the rendered html of PanelGrid.

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

Sidebar

Related Questions

Whats the advantage of having deleted/updated time/creation dates about a table record? I saw
Whats the advantage/disadvantage between storing files as a byte array in a SQL table
Whats the advantage that the BDM ELF file has over the normal ELF file
In grails 2.0 whats new http://grails.org/doc/2.0.0.RC1/guide/introduction.html#whatsNew it says: 1.1.3 Web Features Controller Actions as
in an href in html, whats the difference between using <a href=http://www.somesite.com/ name=The Name>
Whats the advantage of pre-compiling an ASP.NET project using aspnet_compiler.exe? Also, is there a
What advantage is there to designing child-parent relationships, which allow us to do writes
What advantage (if any) is there to using typedef in place of #define in
What is advantage of locks over wait/notify? Code is very similar. private Object full
What's the advantage of using malloc (besides the NULL return on failure) over static

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.