Nic,
I had the same problem with the IndexOutOfBoundsException.
I fixed the demo code to get it working with the gen2 package:
public void onModuleLoad() {
int numStudents = 100;
...
FixedWidthGrid dataTable = createDataTable(numStudents, 10);
./.
/**
* Create the data table.
*
* @return a data table
*/
private FixedWidthGrid createDataTable(int rows, int cols) {
// Create a new table
FixedWidthGrid dataTable = new FixedWidthGrid(rows, cols);
// Set some options in the data table
dataTable.setSelectionPolicy
(SelectionGrid.SelectionPolicy.MULTI_ROW);
// Return the data table
return dataTable;
}
Best Regards,
Johan Vermeire
Belgium
On Feb 27, 4:17 pm, Isaac Truett <[email protected]> wrote:
> Nick,
>
> The widgetideas classes are deprecated because they are being replaced
> by newer, improved versions in the gen2 package. The old classes are
> still around to help people who are transitioning to the gen2
> versions.
>
> I'm not aware of a completely comprehensive guide to incubator
> widgets, but there is a lot of demo code that can be very helpful. The
> JavaDocs are also a good place to look for information on widget API.
>
> - Isaac
>
> On Fri, Feb 27, 2009 at 9:57 AM, Nick <[email protected]> wrote:
>
> > Well, I was able to get this working by swapping out the gen2 imports
> > with the widgetsideas package. I'm noticing that all the classes are
> > deprecated though.
> > Is there a reason for this and is there someplace that explains more
> > details on using the incubator widgets?
>
> > On Feb 27, 9:45 am, Nick <[email protected]> wrote:
> >> I'm attempting to use the ScrollTable from the incubator package and
> >> I'm having problems. I copied the code
> >> fromhttp://code.google.com/docreader/#p=google-web-toolkit-incubator,gwt-...
> >> and I fixed an issue that must be from an old version, so I changed
> >> FlexCellFormatter to FixedWidthFlexCellFormatter. Added <inherits
> >> name='com.google.gwt.gen2.Gen2' /> in the xml file. It all compiles.
> >> But I get a:
> >> [ERROR] Unable to load module entry point class
> >> com.mycompany.client.ScrollTest (see associated exception for details)
> >> java.lang.IndexOutOfBoundsException: Row index: 0, Row size: 0
>
> >> The error is on the line:
> >> dataTable.setHTML(i, 0, LAST_NAMES[Random.nextInt
> >> (LAST_NAMES.length)]);
>
> >> So basically it's trying start setting the cell data and it's saying
> >> that there are no rows.
> >> Now, according to the ScrollTable constructor:
> >> ScrollTable(FixedWidthGrid dataTable, FixedWidthFlexTable
> >> headerTable)
> >> from the docshttp://collectionofdemos.appspot.com/javadoc/index.html
> >> The dataTable is a FixedWidthGrid which is basically a Grid. And I
> >> know Grids need to be sized at the start, but there doesn't seem to be
> >> a place to size it.
>
> >> Anyone have a clue how to get this widget working?
> >> All I'm really looking for is a replacement for the FlexTable that
> >> allows resizable columns and the demo for this looks like what I
> >> need. I already tried both ext libs, smartgwt and another component
> >> library.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---