Pravin,

There's nothing magic going on with chooseTemplate or any of the other Lift
Snippet code.

The snippets take in a NodeSeq (a bunch of XML) and return a NodeSeq (a
bunch of XML).

XML is represented as NodeSeq which is a Seq[Node].  Seq[_] is the generic
Scala representation for a linear collection of stuff, so all Scala
collection operations (map, flatMap, filter, etc.) and works with Scala's
for comprehension.

The answers to your various questions are roots in manipulating XML which is
basically Scala's collection manipulation.  So, please spend some time
learning about this basic Scala feature.  We'll be glad to help you through
the concepts, but I'm not sure answering small variants on "how do I
transform X to Y" is going to give you the help you need.

Thanks,

David

On Wed, May 13, 2009 at 10:42 PM, pravin <[email protected]> wrote:

>
> Hi ,
> I am using chooseTemplate in UI.
>
> As per condition i am able to hide and display particular template but
> suppose i want to display all templates at one condition ,how can i do
> that.
>
> e.g  suppose from count game example
>
>    case "run" if lastGuess == number =>
>    xhtml => win(chooseTemplate("choose", "win", xhtml))
>
>    case "run"  =>
>    xhtml => nextGuess(chooseTemplate("choose", "guess", xhtml))
>
>  In this ,it displays one template(win or guess) at time ,
>  but i want to display both template at time for particular condition.
>  how can i do this?
>
> Thanks in advance
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

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

Reply via email to