Re: Custom tag and map-backed action

2008-09-24 Thread stanlick
Like you, I was under the impression that generics were erased and you were out of luck at runtime! After the type conversion burn at the top of this thread, I started to dig in and found this article. I have experimented with it and it works great. As it turns out, this is probably about all an

Re: Custom tag and map-backed action

2008-09-24 Thread Laurie Harper
I stand corrected -- and thanks for the link; I've never seen this documented before. Very interesting... L. [EMAIL PROTECTED] wrote: http://www.google.com/gwt/n?eosr=on&q=Reflection+generics+Java+&source=m&hl=en&ei=ZWfZSODxI5nYqAKR1t53&sa=X&oi=blended&ct=res&cd=4&rd=1&u=http%3A%2F%2Ftutorials

Re: Custom tag and map-backed action

2008-09-23 Thread stanlick
http://www.google.com/gwt/n?eosr=on&q=Reflection+generics+Java+&source=m&hl=en&ei=ZWfZSODxI5nYqAKR1t53&sa=X&oi=blended&ct=res&cd=4&rd=1&u=http%3A%2F%2Ftutorials.jenkov.com%2Fjava-reflection%2Fgenerics.html On 9/23/08, Laurie Harper <[EMAIL PROTECTED]> wrote: > Sounds reasonable until you remember

Re: Custom tag and map-backed action

2008-09-23 Thread Laurie Harper
Sounds reasonable until you remember two words: type erasure. There is no way to 'glean the generic type' of a collection at runtime. L. Gabriel Belingueres wrote: I agree too. 2008/9/23 stanlick <[EMAIL PROTECTED]>: I agree totally! If the TypeDeterminer had called getEmployees() *and* ha

Re: Custom tag and map-backed action

2008-09-23 Thread Gabriel Belingueres
I agree too. 2008/9/23 stanlick <[EMAIL PROTECTED]>: > > I agree totally! If the TypeDeterminer had called getEmployees() clearly did for iterator> *and* had bothered to glean the generic type of > the key, it would have recognized the action expected the key to of type > String. If the data ty

Re: Custom tag and map-backed action

2008-09-23 Thread stanlick
I agree totally! If the TypeDeterminer had called getEmployees() *and* had bothered to glean the generic type of the key, it would have recognized the action expected the key to of type String. If the data type is specifically spelled out and the framework decides a type diametrically opposed,

Re: Custom tag and map-backed action

2008-09-23 Thread Gabriel Belingueres
AFAIK, OGNL does not have any support for generics, but even if it would support it, I would prefer that it wont be too smart, for example in: I prefer that abc be treated as an action property and call method getAbc() than coerce it to the string 'abc'. 2008/9/23 <[EMAIL PROTECTED]>: > Those

Re: Custom tag and map-backed action

2008-09-23 Thread stanlick
Those are all good points, but when my collection was expressly declared to be a Map I would sort of expect the key to be a String! When the framework "guesses" for a different type (feature?) and your application fails; all the discussion about valid number systems is sort of meaningless. Scott

Re: Custom tag and map-backed action

2008-09-22 Thread Gabriel Belingueres
I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce to the string 'abc', the expression 0xabc reduce to an Integer (have tested it), since it is an hexadecimal number. 2008/9/22 <[

Re: Custom tag and map-backed action

2008-09-22 Thread stanlick
I expected the conversion facility or iterator key to be smart enough to recognize my Map and setup the internal key variable accordingly. Do you suppose it would have worked if my Map had contained 'abc':emp1, 'def':emp2, 'ghi':emp3? Peace, Scott On Mon, Sep 22, 2008 at 3:47 PM, Gabriel Belingu

Re: Custom tag and map-backed action

2008-09-22 Thread Gabriel Belingueres
Interesting. Seems it is a feature, as documented in [1]. Tested it myself: The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id