I have a page with search results, with the search results taking a while to query.
In this page I want to use a comet actor and partialUpdate to drip feed results in, fading them in with JQ. I have a list of results maintained in the actor. I don't want to use setHtml and re-render because that simply overwrites the HTML with the block of results. I want to use a NodeSeq that captures the template to apply to the results.
So in render I have something like:
".div-results" #> SHtml.idMemoize { outer => {
resultsDiv = Some(outer)
results.map(thumbnailCss)
}}
thumbnailCss is a function returning a CssSel.
That works if the results are already in. Now in my message handling I want something like:
resultsDiv.map(div => ???)
.foreach(thumbnailNodeSeq =>
partialUpdate(addResult(thumbnailNodeSeq))
)
}
In the place of ??? I tried:
thumbnailNodeSeq.apply(div.latestKids)
But that gave an AbstractMethodError!
Is there a way of doing this?
Dan