Hi all.
Normally this kind of post would be better posted to -users, but I'm looking 
for the developers comments on this.

Anyone have any experience using Scala with Struts2? I'm especially thinking 
about s:iterate and scala.List.

I've managed to use s:iterate with Scala's List like this:
<s:iterator value="%{getMyList().toArray().unbox(@java.lang.obj...@class)}" 
status="status">
getMyList() returns a scala.List from my Scala-object, which I convert to an 
JAVA-array using toArray().unbox().

This seems very hackish and it would be cool if one could make a 
"struts2-scala-plugin" which registered some kind of Iterator which the 
IteratorComponent could use, refactoring out the call to 
"MakeIterator.convert(findValue(value))" to a factory of some kind which 
checked some kind of registry for providing a proper Iterator for the 
Scala-object returned by findValue(value).

Comments?

-- 
Andreas Joseph Krogh <[email protected]>
Senior Software Developer / CTO
------------------------+---------------------------------------------+
OfficeNet AS            | The most difficult thing in the world is to |
Rosenholmveien 25       | know how to do a thing and to watch         |
1414 TrollÄsen          | somebody else doing it wrong, without       |
NORWAY                  | comment.                                    |
                        |                                             |
Tlf:    +47 24 15 38 90 |                                             |
Fax:    +47 24 15 38 91 |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to