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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:35:44+00:00 2026-05-31T19:35:44+00:00

Brief intro about my requirement. I have an empty JSF dataTable. Now, when I

  • 0

Brief intro about my requirement.

I have an empty JSF dataTable.
Now, when I click on a button, it should fill the empty datatable with data.

<h:commandButton value="Search" action="#{myBean.searchresults}" />

Problem:
When I click on the button, it populates the data to the dataTable but instantly shows me the same page when I load my application first time (refresh the page).
I want the page to not refresh itself and show the populated data.

I am stuck in this issue for the last 2 days.
Kindly provide your advice.

Thanks in advance!

Thanks,
Lee

  • 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-31T19:35:45+00:00Added an answer on May 31, 2026 at 7:35 pm

    So you want an asynchronous submit and a partial render? There the <f:ajax> tag is for.
    You can specify the submit context in execute attribute and the to-be-updated client IDs in render attribute.

    E.g.

    <h:form>
        <h:inputText value="#{bean.query}" />
        <h:commandButton value="Search" action="#{bean.search}">
            <f:ajax execute="@form" render=":results" />
        </h:commandButton>
    </h:form>
    <h:panelGroup id="results">
        <h:dataTable value="#{bean.results}" rendered="#{not empty bean.results}">
            ...
        </h:dataTable>
    </h:panelGroup>
    

    with

    public void search() {
        results = service.find(query);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want brief knowledge about Data Template for Customizing a control(like Combo Box,List Box
In brief: Is it ever excusable to have assembly names and class names stored
I happened upon a brief discussion recently on another site about C# runtime compilation
Could anybody brief about user_token functionality in Auth module? What is a use and
My prob in brief: I have two tables namely category and product. table: category
Intro: I've seen lots of topics here on SO about software testing and other
I have a problem. I have an XML file that contains information about 100
Here's a brief and not-so-bad intro upon using Credential API in .NET. But I
To start I should provide a brief summary as to why I am asking
As a brief intro, I spent the last few days writing my own template

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.