Hi,

I'm using the same rewriting code as in CRUDify, so that URLs like

tender/results/2

show a result page for the tender with id 2. This page contains lots of
snippets, defined (as in CRUDify) within a SnippetTest partial function.

The page renders fine when hit for the first time. The user can change
various parameters on the page, causing some of the content on the page
to change using ajax. 

I can't seem to render the content in this ajax call. It doesn't render
the snippets defined in the snippets partial function, but renders other
(ie global snippets) ok. This is an example of a select element, that
should change some content on the page:

    case ("result.name", Full(wp: Result)) => s => Text(wp.name.is)
    case ("result.select", Full(result: Result)) => {
      curResult(Full(result)); 
      s => {
        def doSelect(msg: NodeSeq) =
            ajaxSelectObj(lcs.map(lc => (lc, lc.name.is)), Empty,
                        lc => {
                          val nodeseq = 
TemplateFinder.findAnyTemplate(List("result", "results")).open_!
                          val sub = chooseTemplate("lift", 
"result.result_comparison", nodeseq)
                          val markup = 
S.session.open_!.processSurroundAndInclude("mypage", sub)
                          println("processed:"+markup)
                          SetHtml("mylc", Text(lc.name.is))
                        })


        bind("select", s, 
             "lc1" -> doSelect _,
             "lc2" -> doSelect _
        )
      }
    }
 
Here, markup does not contain the contents of the snippet result.name,
but does contain the results of other, standalone, snippets.

Any clues? Or is there a better way to render partial page content?

/Jeppe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to