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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:48:59+00:00 2026-05-16T17:48:59+00:00

In my JSF page I have a combobox that updates a table when an

  • 0

In my JSF page I have a combobox that updates a table when an item of the combobox is selected.

The table contains items with an edit link.

The problem is when the table is changed by the combobox you need to click twice on the link to go to the page. The first click just refresh the page.

Here is the xhtml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<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">
    <body>
        <ui:composition template="/template.xhtml">
            <ui:define name="windowTitle">Comment packages</ui:define>
            <ui:define name="content">
                <h3>Select the package to comment.</h3>
                <h:form prependId="false">
                    Section:
                    <h:selectOneMenu id="selectSection" value="#{platformService.currentSection}">
                        <f:ajax render=":list-packages" />
                        <f:selectItems value="#{platformService.releasePlatform.sections}" />
                    </h:selectOneMenu>
                </h:form>
                <p/>
                <h:panelGroup id="list-packages">
                    <h:dataTable id="packageList" var="package" value="#{packageService.packages}" border="1" >
                        <h:column>
                            <f:facet name="header">Package name</f:facet>
                            #{package.name}
                        </h:column>
                        <h:column>
                            <h:form>
                                <h:commandlink action="#{commentService.commentPackage}" value="Comment">
                                    <f:param name="packageName" value="#{package.name}" />
                                </h:commandLink>
                            </h:form>
                        </h:column>
                    </h:dataTable>
                </h:panelGroup>
            </ui:define>
        </ui:composition>
    </body>
</html>

I’ve also tried with commandButton but you also need to click twice on the button.

I’m running JSF 2.0.1-FCS in Maven/Jetty.

  • 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-16T17:49:00+00:00Added an answer on May 16, 2026 at 5:49 pm

    It works when you put the table inside a single <h:form>. Remove the inner <h:form> from the column and replace <h:panelGroup id="list-packages"> by <h:form id="list-packages">.

    I am not sure how/why this problem is caused (requires more time to investigate) but it’s probably related to the fact that the table’s state is important to know which row was selected.

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

Sidebar

Related Questions

If I have a JSF page that I want to link to where I
I have a JSF page that contains a form with several elements, that correspond
I have a JSF page that contains: <div class=tableCaption> <h2>Batch Details</h2> </div> and a
We have a rich:comboBox on a JSF page which has a valueChangeListener that calls
I have a JSF page that is included in other JSF pages (basically a
I have a JSF page that displays a RichFaces Treeview, from a TreeNodeImpl model
Ok simple question. I have a JSF application, containing a login page. The problem
I have a JSF page. At one point, I have a <h:selectManyCheckbox> that is
I have a JSF page that has a h:form that has some textfields and
i have a problem with rendering #{} inside JSF page. I'm using Mojarra 2.1.5

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.