Re: Tapestry w Scala

Ilya Obshadko <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <CAAT_KPKmJxNdhWrSSmJevaGVbCzntO32h4FmnMttXrVCnd8GUw@mail.gmail.com>
I use mixed Java/Scala code for pages, components and services without any
issues.
To pass collections you need to either convert them to Java collections
(calling .asJava), or contribute to type coercer:

def createTapestryCoercions(configuration:
org.apache.tapestry5.ioc.Configuration[org.apache.tapestry5.ioc.services.CoercionTuple[_,
java.lang.Iterable[_]]]) = {
  val coercion = new Coercion[Iterable[AnyRef], java.lang.Iterable[_]] () {
    def coerce(arg: Iterable[AnyRef]) = arg.asJava
  }

  configuration.add(new CoercionTuple(classOf[Iterable[AnyRef]],
classOf[java.lang.Iterable[_]], coercion))
}



On Fri, Dec 16, 2016 at 4:53 PM, Qbyte Consulting <[email protected]
> wrote:

> Hi,
>
> Has anyone implemented a T5.4 site with Scala, or are there any kickstart
> type Scala projects out there for T5.4 please? I'd like to see how it's
> done.
>
> John
>



-- 
Ilya Obshadko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.