an IllegalArgumentException
an IllegalArgumentException
- Subject: an IllegalArgumentException
- From: "Jonathan Fleming" <email@hidden>
- Date: Fri, 19 Dec 2003 09:36:17 +0000
Hi Guys
Right, tb stands for table, Ecm stands for e-commerce and then the it's the
class name, just so that you know...
I have a Product class and a Category class (prefix omitted here for
briefity), Product has a toOne relationship with Category and toMany on the
reverse (Cat<...>>>Prod).
In a form I've created i'm using a WOBrowser element to show my list of
categories from which I'm allowed to select one categoryName, the binding
are as follows:
Browser_category: WOBrowser {
displayString = tbEcmCategory.categoryName;
item = tbEcmCategory;
list = tbEcmCategoryDisplayGroup.allObjects;
size = 6;
selections = tbEcmProduct.tbEcmCategory;
multiple = false;
}
Now my relationships works beautifully if i'm adding a new Category without
the WOBrowser by typing the name in, however, I want to simply select a
categorName, so what I want to know is what is the best way to format this
so that i don't keep ending up with this error message:
Error: java.lang.IllegalArgumentException: While trying to invoke the set
method "public void TbEcmProduct.setTbEcmCategory(TbEcmCategory)" on an
object of type TbEcmProduct we received an argument of type
com.webobjects.foundation.NSMutableArray. This often happens if you forget
to use a formatter.
Reason: While trying to invoke the set method "public void
TbEcmProduct.setTbEcmCategory(TbEcmCategory)" on an object of type
TbEcmProduct we received an argument of type
com.webobjects.foundation.NSMutableArray. This often happens if you forget
to use a formatter.
I'm not too sure on how to get the String Object at the given index from the
NSArray of the WODisplayGroup's allObjects method.
Any pointers...
Kind regards
Jonathan :^)
_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.