On Mon, May 4, 2009 at 11:33 PM, pravin karne <[email protected]> wrote:
> how th <lift:Template.show template="_simple_template" /> tag works > This tag loads the net.liftweb.example.snippet.Template class. Because this class is a DispatchSnippet, Lift looks at the PartialFunction returned by the dispatch method and checks to see if "show" is defined in that PartialFunction (PartialFunctions can be Map's or pattern matching). The dispatch method matches "show" and returns a function that points to the show() method. The show() method uses a for comprehension to load the template referenced by the "template" attribute. The next line extracts the <temp:tbl/> and <temp:row/> tags from the template. The rows from the User table are bound to the <temp:row/> part of the template and then the <temp:tbl/> is bound to the newly created rows variable. The result of the for comprehension is assigned to the ret variable. This is then pattern matched based on the success of the for comprehension. Does this help? > > Sorry for such basic questions , i am beginner to lift > > On Mon, May 4, 2009 at 8:03 PM, marius d. <[email protected]> wrote: > >> >> There are so many ways ... >> >> 1. Use chooseTemplate technique. I think the examples application >> from /sites uses this. >> 2. In the snippet you have the snippet content and you can just strip >> it out >> 3. You can have a little JavaScript that is called when the page loads >> that shows or hides the div ... if you need something more dynamic. >> >> >> Br's, >> Marius >> >> On May 4, 1:28 pm, pravin <[email protected]> wrote: >> > HI, >> > >> > I want to hide /display div tag. >> > how can i controlled it from my snippet? >> > my div tag contain table tag. >> > >> > Thanks >> >> > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
