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

  • Home
  • SEARCH
  • 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 6062881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:06:06+00:00 2026-05-23T09:06:06+00:00

I have 3 openFaces <o:datatable /> s in the same view page (overview.xhtml). The

  • 0

I have 3 openFaces <o:datatable />s in the same view page (overview.xhtml).

  • The first displays a list of all music bands
  • The 2d displays a list of all songs written by music bands
  • The 3d displays a list of all shows given by music bands

I am using <o:inputTextFilter /> to filter the first datatable using
the row ID (

<h:form>
        <o:datatable value="#{bandBean.items}" var="band" ........<o:inputTextFilter 
        expression="#{band.id}" .../> 
</h:form>

<h:form>    
    <o:datatable value="#{showBean.items}" var="show" ........<o:inputTextFilter 
        expression="#{band.id}" .../> 
</h:form>
    <h:form>
    <o:datatable value="#{songBean.items}" var="song" ........<o:inputTextFilter 
        expression="#{band.id}" .../> 
</h:form>

The songs and the shows are child objects of music bands.
What I really need is the ability to filter the 3 datatables using the
same inputTextFilter or something similar, since the 3 datatables have each a column with the band ID.

The user will never accept typing the band id three times, first
tilme for the BAND table, second time for the shows table and the
third time for the song table, using 3 filters. Instead he wants to type once the band
ID , and instantly the 3 tables get filtered.

One workaround would be to use three <o:inputTextFilter /> and set their values using javascript or ajax : while the user types something in a filter, the value being typed is appended immediately to the other filters. I can’t figure that workaround. yet it seems to be odd to display 3 filters while the user should use only one.
Any ideas and help will be precious!

  • 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-23T09:06:07+00:00Added an answer on May 23, 2026 at 9:06 am

    There’s no direct support for attaching a filter to several tables,
    however you can simulate this behavior. To so this, you can attach a
    hidden (“display: none”) to each of your tables
    using the “for” attribute, and specify the filtering value for all of
    them programmatically.

    Here’s a simple code snippet which demonstrate this idea:

    <o:inputText value="#{MyBean.filterText}"/> 
    <o:commandButton value="Submit" action="#{MyBean.filterAllTables}"/> 
    <o:inputTextFilter for="table1" expression="#{book.bookTitle}" 
                       value="#{MyBean.filterCriterion}" style="display: none"/> 
    <o:inputTextFilter for="table2" expression="#{book.bookTitle}" 
                       value="#{MyBean.filterCriterion}" style="display: none"/> 
    <o:dataTable id="table1" ...> 
    <o:dataTable id="table2" ...> 
    

    MyBean.java:

    private String filterText; // a property w/ getter/setter 
    private ExpressionFilterCriterion filterCriterion; // a property w/ getter/setter 
    
    public void filterTables() { 
        String filterText = getFilterText(); 
        SimplePropertyLocatorFactory.SimplePropertyLocator propertyLocator =
                    new SimplePropertyLocatorFactory.SimplePropertyLocator("id"); // "id" is a property name by which you'd like to filter
        ExpressionFilterCriterion filterCriterion = new ExpressionFilterCriterion(
                    propertyLocator, FilterCondition.CONTAINS, filterText); 
        setFiterCriterion(filterCriterion); 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have had to write my first proper multithreaded coded recently, and realised just how
**Have it working now. I forgot to populate the Array List. How embarrassing. I'm
Have a rather abstract question for you all. I'm looking at getting involved in
We have a page with a form in OpenACS, and we'd like to redirect
Have a look on following application http://itunes.apple.com/us/app/fatbooth/id372268904?mt=8 i think they are using the same
I am using OpenFaces and have to be compatible with IE6. Up to now
Have started playing with Xcode 4.2, and created a single page application using storyboard
Have a rails app that is supposed to display a list of products/managers. After
Have a string: myString = '<p>Phone Number:</p><p>706-878-8888</p>' Trying to regex out all HTML tags,
Have following setup: MainActivity class - extends activity MyLayout class - extends View Prefs

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.