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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:14:34+00:00 2026-06-03T04:14:34+00:00

I have a JSF h:datatable with rows of data: <h:dataTable id=dataTable value=#{SessionsController.dataList} binding=#{table} var=item>

  • 0

I have a JSF h:datatable with rows of data:

  <h:dataTable id="dataTable" value="#{SessionsController.dataList}" binding="#{table}" var="item">
                    <!-- Check box -->
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Select" />
                        </f:facet>
                        <h:selectBooleanCheckbox  onclick="highlight(this)" value="#{SessionsController.selectedIds[dataItem.id]}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:commandLink value="№" actionListener="#{SessionsController.sort}">
                                <f:attribute name="№" value="№" />
                            </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{table.rowIndex + SessionsController.firstRow + 1}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:commandLink value="Account Session ID" actionListener="#{SessionsController.sort}">
                                <f:attribute name="sortField" value="Account Session ID" />
                            </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{item.aSessionID}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:commandLink value="User ID" actionListener="#{SessionsController.sort}">
                                <f:attribute name="sortField" value="User ID" />
                            </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{item.userID}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:commandLink value="Activity Start Time" actionListener="#{SessionsController.sort}">
                                <f:attribute name="sortField" value="Activity Start Time" />
                            </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{item.activityStart}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:commandLink value="Activity End Time" actionListener="#{SessionsController.sort}">
                                <f:attribute name="sortField" value="Activity End Time" />
                            </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{item.activityEnd}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:commandLink value="Activity" actionListener="#{SessionsController.sort}">
                                <f:attribute name="sortField" value="Activity" />
                            </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{item.activity}" />
                    </h:column>
                </h:dataTable>

I want to give to the user ability to open a new page when he clicks on a row.
I found that JavaScript code to be useful:

   $("table#dataTable tbody tr").click(function () {
            window.location = $(this).find("a:first").attr("href");
        });

The problem is that I need a JSF tag which will be used by JavaScript to open new page when the row is clicked and pass data. In this example href is used to navigate to the new window. I need JSF tag which can be used for the same purpose. Is there suitable JSF tag?

Best wishes

  • 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-03T04:14:35+00:00Added an answer on June 3, 2026 at 4:14 am

    You can just use plain HTML <a> in JSF.

    <a href="page.xhtml">link</a>
    

    Or <h:link>

    <h:link value="link" outcome="page" />
    

    Unrelated to the concrete question, as to your jQuery selector, don’t forget to take into account that JSF prepends the client ID with the ID of parent naming container components. Check the generated HTML output to be sure.

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

Sidebar

Related Questions

I have a h:dataTable that displays ProfileNotification like below: <h:dataTable value=#{myBean.profileNotifications} var=item rendered=#{myBean.renderProfileNotification}> <h:column>
I have jsf page: .... <form jsfc=h:form action=> <h:dataTable value=#{newMusician.strings} var=preferredMusicGenre id=musicGenresSelectTable> <h:column> <h:inputText
I am using rich faces data table tag in my jsf: <r:dataTable id=dataTable var=user
I have a JSF datatable like this one: <h:form id=productsBox> <h:dataTable var=product value=#{categoriesBean.category.products} id=productsTable>
jsf: <rich:dataTable id=files styleClass=table headerClass=header value=#{file} var=fileRecord rendered=#{file.rowCount>0} rowClasses=even,odd onRowMouseOver=this.style.backgroundColor='#F1F1F1' onRowMouseOut=this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'> <rich:column> precondition: have
I have a JSF 1.2 dataTable using ICEfaces 1.8. In one column, I would
I am using JSF 2.0 and PrimeFaces 2.2. I have a data table whose
I'm using JSF 1.1. I have a JSP page with a .... <t:dataTable id=data
I have worked with JSF, so pretty much delighted with JSF datatable . Is
Brief intro about my requirement. I have an empty JSF dataTable. Now, when I

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.