The easiest way -- and arguably the cleanest -- is to let your *page* do the filtering, and have a property that gives only the rows to be displayed:

    public List<Things> getRowsToDisplay()
        {
        List<Things> toDisplay = new ArrayList<Things>();
        for(Thing thing : getAllThings())
            if(thing.shouldBeDisplayed())
                toDisplay.add(thing);
        return toDisplay;
        }

Pushing too much logic into a Tapestry page (or JSP, for that matter), only leads to headaches -- and filtering rows is definitely a step down that path. I like to keep the logic in Java as much as possible, and let the page be pure, mindless display.

That said, there may be an option like the one you're looking for.

Cheers,

Paul

On Aug 9, 2005, at 11:09 AM, Chris Chiappone wrote:

I have been using the contrib:Table component a lot for the tables in
my webapp.  Its awesome how easy it is to set up.  Now I've run into
an issue that I'm not sure how to figure out.  Is there a way to not
show a row or 'continue' a row depending on a value of a field?
Basically if I have a boolean field and it is set to false I want to
skip that row when viewing the table.

Thanks.

--
~chris

------------


_________________________________________________________________

"Prediction is hard, especially of the future."  -- Niels Bohr


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to