• Post Reply Bookmark Topic Watch Topic
  • New Topic

Models & Arrays  RSS feed

 
Maja Gralewska
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys.

I am trying to populate a table in a model and the data either doesn't display all the data or in gives me the error when i run the program.

error:

Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from dataModel[] to dataModel

Here is the code that is giving me the errors
public dataModel[]loadAIM(String keys[]) throws AccessControlException, ClientControllerException {
dataClientController dcc =
new dataClientController();
try{
return dcc.fetchDataArray(keys[0]);

}catch (ValidationException ve) {

return null;
}
}

Can you please give me any suggestions on how to get mt code to work?

thanks
 
Campbell Ritchie
Marshal
Posts: 56592
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not an error at runtime; that's because Eclipse allows you to try code which still has compiler errors in. Anywhere else that would be a compiler error.
The message says it all; you have an array of models and you are trying to use a single model.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!