You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Karen Schaper <Ka...@frontiernet.net> on 2008/08/14 01:19:12 UTC

Filter Toolbar and changing size of TextFilter input box

Hello,

I have a question about the FilterToolbar.  I just came across it and I love
it.

Except now my page is taking up to much space and the user has to scroll
right to see all my columns.

This is because the text filter boxes are too big for the column they
represent.

How do I change this?  Do I have to create my own TextFilter object and set
the size on the input box?  I can't remember but if you don't set the size
for an input text box I think html defaults to something?

Is that what is happening?

Thanks

Karen



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Filter Toolbar and changing size of TextFilter input box

Posted by TahitianGabriel <gl...@piti.pf>.
Here's a simple way to do it :

new TextFilteredPropertyColumn<Corbeille, Corbeille>(new
Model<String>("longitude"),
                "pointCollecte.longitude", "pointCollecte.longitude") {

                   @Override
                    public Component getFilter(final String varComponentId,
final FilterForm varForm) {
                        TextFilter<Corbeille> filter =
(TextFilter<Corbeille>) super.getFilter(varComponentId, varForm);
                        filter.getFilter().add(new AttributeModifier("size",
true, new Model<String>("7")));
                        return filter;
                    }
        }


regards,

Gabriel.
-- 
View this message in context: http://www.nabble.com/Filter-Toolbar-and-changing-size-of-TextFilter-input-box-tp18973042p25194515.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Filter Toolbar and changing size of TextFilter input box

Posted by Karen Schaper <Ka...@frontiernet.net>.
Thanks.

I got it working.  I created my own TextFilteredPropertyColumn and my own
TextFilter.

The constructor takes an input box size.

> -----Original Message-----
> From: Kai Mütz [mailto:kmuetz@googlemail.com]
> Sent: Thursday, August 14, 2008 2:35 AM
> To: users@wicket.apache.org
> Subject: RE: Filter Toolbar and changing size of TextFilter input box
>
>
> Karen Schaper <ma...@frontiernet.net> wrote:
> > Hello,
> >
> > I have a question about the FilterToolbar.  I just came across it
> > and I love
> > it.
> >
> > Except now my page is taking up to much space and the user has to
> > scroll right to see all my columns.
> >
> > This is because the text filter boxes are too big for the column they
> > represent.
> >
> > How do I change this?  Do I have to create my own TextFilter
> > object and set
> > the size on the input box?  I can't remember but if you don't set the
> > size for an input text box I think html defaults to something?
>
> I have extended TextFilter with my own markup where I have set the size of
> the input field.
>
> HTH, Kai
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Filter Toolbar and changing size of TextFilter input box

Posted by Kai Mütz <km...@googlemail.com>.
Karen Schaper <ma...@frontiernet.net> wrote:
> Hello,
>
> I have a question about the FilterToolbar.  I just came across it
> and I love
> it.
>
> Except now my page is taking up to much space and the user has to
> scroll right to see all my columns.
>
> This is because the text filter boxes are too big for the column they
> represent.
>
> How do I change this?  Do I have to create my own TextFilter
> object and set
> the size on the input box?  I can't remember but if you don't set the
> size for an input text box I think html defaults to something?

I have extended TextFilter with my own markup where I have set the size of
the input field.

HTH, Kai


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org