IndexOutOfBoundException and PropertyModel

2008-05-19 Thread guillaume.mary
Hi all, I'm wondering why the PropertyModel sends an IndexOutOfBoundException when I use an expression such as myList.0.name and that the 0 element doesn't exist, whereas it doesn't sends a NullPointerException when I user person.name with a null person. Is it a wanted behavior

Re: IndexOutOfBoundException and PropertyModel

2008-05-19 Thread Mathias P.W Nilsson
with hibernate you will get an empty list. But doens't contains any elements. -- View this message in context: http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17316645.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: IndexOutOfBoundException and PropertyModel

2008-05-19 Thread guillaume.mary
://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17316664.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: IndexOutOfBoundException and PropertyModel

2008-05-19 Thread Wouter Huijnink
What I meant in my first post, is since I don't get a NPE in that case, I was thinking that Wicket shouldn't throw a IOOBE in the case of an inexisting position in my List: according to me Wicket should handle it. Am i wrong ? Yes, you are wrong. It's bad practice to refer to a location in

Re: IndexOutOfBoundException and PropertyModel

2008-05-19 Thread Mathias P.W Nilsson
if the object is null and throws a IllegalArgumentException. Is a really null? -- View this message in context: http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17316687.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: IndexOutOfBoundException and PropertyModel

2008-05-19 Thread guillaume.mary
/IndexOutOfBoundException-and-PropertyModel-tp17315359p17322053.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: IndexOutOfBoundException and PropertyModel

2008-05-19 Thread guillaume.mary
: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17322161.html Sent from the Wicket - User mailing list archive at Nabble.com

Re: IndexOutOfBoundException and PropertyModel

2008-05-19 Thread Mathias P.W Nilsson
I think a good practice is to always take care of null objects and list your self. You never know when or if the implementation might change. -- View this message in context: http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17330046.html Sent from the Wicket - User