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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:00:00+00:00 2026-06-08T00:00:00+00:00

I couldn’t find a solution for this in other posts, so here is my

  • 0

I couldn’t find a solution for this in other posts, so here is my problem.
(In advance, I use JSF 2 with Mojarra implementation and Primefaces 3.2 on a JBoss 7.1 AS)

I am building a search-mask that should be generated dynamically during runtime. I know from another post that I should use a dataTable for that. That is what I will do.

But the search-mask consists of 3 parts, the search-criterion (e.g. name, birthday,…), the operator (is, is not, larger than, in range,…) and the operand (what the user will give as search-input).

My goal is to get the search-mask get generated dynamically, BUT the type of input field is dependent on what criterion+operator has been choosen by the user.

So if the user chose criterion: “name” and operator: “is not” from the dropdown boxes, then the input field for the operand should be just a simple p:inputText.

But if the user chose criterion “birthday” and operator: “before”, then the input field should be a datepicker like p:calendar.

My idea was to use a p:dataTable for a List of “SearchRow” objects where every object has an array of criteria and operands to use them in a h:selectOneMenu.

Then I add a valueChangeListener to the selectMenues and in there I calculate and create the right type of UIComponent I need as inputfield.

But I have no idea how to add that UICOmponent as the 3rd column inside the dataTable.

So is my idea any good and is there a way at all to solve my problem?

Thanks in advance!

  • 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-08T00:00:01+00:00Added an answer on June 8, 2026 at 12:00 am

    Same solution as to the Problem described here. The article from @BalusC explains very nicely how to add components from the bean.

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

Sidebar

Related Questions

I couldn't find a solution for this problem online, as simple as it seems.
Couldn't find a function for this. I'm assuming I need to use regex? I'm
I couldn't find this anywhere, so i thought I'd ask here. Can you do
I couldn't find the answer to this in any other question. Suppose that I
Couldn't find Submission without an ID This problem has haunted me for last few
Couldn't find any answer to this problem, or not even any questions asked. So
Couldn't comment on this post, which states the problem I'm experiencing: jQuery remove() on
I couldn't find anything similar to this anywhere. I have an array of pointers
I couldn't find this in the documentation. If I have a complex object in
I couldn't find anything on this, but probably its just because I don't know

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.