yeah, some people dont grok IDataProvider at first, here is the simplest way i know how to explain what it does,
following class will take a list and make it a data provider

public class ListDataProvider implements IDataProvider
{
    private List list;

    public ListDataProvider(List list)
    {
        this.list = list;
    }

    public Iterator iterator(final int first, final int count)
    {
        return list.listIterator(first);
    }

    public int size()
    {
        return list.size();
    }

    public IModel model(Object object)
    {
        return new Model((Serializable)object);
    }

}


this is actually an abridged version of an actual class i extensions.

-Igor


On 5/21/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
I guess I've avoided anything but ListView because the other
Grid/layout table controls are more complicated and I'm in a time
crunch.  I can pass a List into a ListView but I have to write extra
glue-code to use the others in extensions....and I'm just not familiar
w/ them.

Is it the "public Iterator iterator(int arg0, int arg1)" method that
provides the data in the overridden IDataProvider class?  I guess it's
not obvious or intuitive to me how you get data *into* the GridView.

I need to pass a object as a parameter into this data prodivder since
the master table determines what is shown in the child table.

On 5/21/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> why not use a gridview from extensions? it will do the wrapping for you.
> -Igor
>
>
>
> On 5/21/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:
> >
> I'm having an issue trying to display things a certain way.  I want to
> display 3 thumbnails per-row and wrap on the third.  In the HTML this
> is made up of a table tag w/ a single cell.  The thumbnails are
> wrapped in their own table so it's something like this:
>
> <table wicket:id="masterListView">
>   <tr>
>     <td>
>       <!-- want this to happen 3x then break! -->
>       <table wicket:id="thumbnailListView">
>         <tr>
>           <td><img src="" /></td>
>           <td>description...</td>
>         </tr>
>       </table>
>     </td>
>   </tr>
> </table>
>
> Could I maybe print a "<br />" tag after the third thumbnail table?
> Can someone suggest a better approach?  I thought if I put a static
> pixel width on the master table they would wrap automatically...but
> they don't and the table stretches indefinitely.
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to