well it's done using DefaultDataTable... I think I should have used that in the 
first place...thnX anyway


----- Original Message ----
From: Igor Vaynberg <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Tuesday, February 12, 2008 10:03:40 PM
Subject: Re: problem using DataGridView

can you set a debug point in arrayiteratoradapter and see why it is
getting null array passed in? the line numbers dont line up for my
source, but it looks like your columns var is actually a null array?

-igor


On Feb 12, 2008 4:52 AM, Araz <[EMAIL PROTECTED]> wrote:
> Hi There,
> I'm trying to add a DataGridView to my page with custom columns, here is what 
> I've done:
>
>      DataGridView table = new DataGridView("rows", columns, new 
> ReportDataProvider(values));
>
> with this html:
> <table cellspacing="0" cellpadding="2" border="1">
>    <tr wicket:id="rows">
>    <td wicket:id="cells">
>      <span wicket:id="cell">cell content goes here</span>
>    </td>
>    </tr>
> </table>
>
>
> this is ReportDataProvider:
> public class ReportDataProvider implements IDataProvider
> {
>  Vector<SystemReportBean> data;
>
>  public ReportDataProvider(Vector<SystemReportBean> data)
>  {
>    this.data = new Vector<SystemReportBean>(data);
>  }
>
>  public IModel model(Object object)
>  {
>    return new ReportModel((SystemReportBean) object);
>  }
>
>  public int size()
>  {
>    return data.size();
>  }
>
>  public Iterator iterator(int first, int count)
>  {
>    List<SystemReportBean> vec = data.subList(first,first+count);
>    return vec.iterator();
>  }
> }
>
>
> and ReportModel is a plain object with getter setter methods
>
>
> but I get this exception every time I try to view the page I get this 
> exception:
> WicketMessage: Error attaching this container for rendering: [MarkupContainer 
> [Component id = cells, page = com.laser.monitoring.gui.ReportResultPage, path 
> = 41:rows:1:cells.AbstractDataGridView$2, isVisible = true, isVersioned = 
> false]]
> Root cause:
> java.lang.NullPointerException
>      at 
> wicket.extensions.markup.html.repeater.util.ArrayIteratorAdapter.hasNext(ArrayIteratorAdapter.java:62)
>      at 
> wicket.extensions.markup.html.repeater.refreshing.DefaultItemReuseStrategy$1.hasNext(DefaultItemReuseStrategy.java:66)
>      at 
> wicket.extensions.markup.html.repeater.refreshing.RefreshingView.addItems(RefreshingView.java:189)
>      at 
> wicket.extensions.markup.html.repeater.refreshing.RefreshingView.internalOnAttach(RefreshingView.java:117)
> ....
>
> I've done everything I thought that might help with no result
>
>
>
>
>
>
>
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com

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

Send instant messages to your online friends http://uk.messenger.yahoo.com 

Reply via email to