[Lift] Re: how to hide /display div tag in lift

2009-05-14 Thread David Pollak
On Thu, May 14, 2009 at 3:29 AM, pravin pravinka...@gmail.com wrote:


 can i get source code of that example(tamplate for div )?


Beyond the source code that exists on the page, you can get the source code
for all of demo.liftweb.net from
http://github.com/dpp/liftweb/tree/master/sites/example




 On May 13, 4:22 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Please see some example code that I just put live athttp://
 demo.liftweb.net/templating/selectomatic
 
  It will allow you to select which div tags are displayed based on value
 of
  a bunch of Booleans
 
 
 
  On Thu, May 7, 2009 at 2:55 AM, pravin pravinka...@gmail.com wrote:
 
   Hi,
   If there are more than 10 div tags on page ,So how can we display or
   hide them with chooseTemplate technique.
   boz chooseTemplate  method chose one tag at time
   e.g
  val dispatch: DispatchIt = {
  case run if lastGuess == number =
  xhtml = win(chooseTemplate(choose, win, xhtml))
 
  case run  =
  xhtml = nextGuess(chooseTemplate(choose, guess, xhtml))
 
  case count_down =
  xhtml = countDown(attr(from).map(Helpers.toInt).openOr(0))
}
 
   this code is from site /examples (Number guess example)
 
   can we chose multiple templates at a time so ,we can display no of div
   tag ?
   or is there any other way to do this?
 
   Thanks in advace
 
   On May 4, 7:33 pm, marius d. marius.dan...@gmail.com 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 pravinka...@gmail.com 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 frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

 



-- 
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 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
-~--~~~~--~~--~--~---



[Lift] Re: how to hide /display div tag in lift

2009-05-07 Thread pravin

Hi,
If there are more than 10 div tags on page ,So how can we display or
hide them with chooseTemplate technique.
boz chooseTemplate  method chose one tag at time
e.g
val dispatch: DispatchIt = {
case run if lastGuess == number =
xhtml = win(chooseTemplate(choose, win, xhtml))

case run  =
xhtml = nextGuess(chooseTemplate(choose, guess, xhtml))

case count_down =
xhtml = countDown(attr(from).map(Helpers.toInt).openOr(0))
  }

this code is from site /examples (Number guess example)

can we chose multiple templates at a time so ,we can display no of div
tag ?
or is there any other way to do this?

Thanks in advace

On May 4, 7:33 pm, marius d. marius.dan...@gmail.com 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 pravinka...@gmail.com wrote:

  HI,

  I want to hide /display div tag.
  how can i controlled it from my snippet?
  my div tag contain table tag.

  Thanks

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Lift] Re: how to hide /display div tag in lift

2009-05-05 Thread David Pollak
On Mon, May 4, 2009 at 11:33 PM, pravin karne pravinka...@gmail.com 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. marius.dan...@gmail.com 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 pravinka...@gmail.com 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 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
-~--~~~~--~~--~--~---



[Lift] Re: how to hide /display div tag in lift

2009-05-04 Thread marius d.

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 pravinka...@gmail.com wrote:
 HI,

 I want to hide /display div tag.
 how can i controlled it from my snippet?
 my div tag contain table tag.

 Thanks
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Lift] Re: how to hide /display div tag in lift

2009-05-04 Thread Timothy Perrett

Just my two pence, but id got for chooseTemplate. If it helps, I
discuss using chooseTemplate in this article: http://is.gd/sfyT

Cheers, Tim

On May 4, 3:33 pm, marius d. marius.dan...@gmail.com 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 pravinka...@gmail.com wrote:



  HI,

  I want to hide /display div tag.
  how can i controlled it from my snippet?
  my div tag contain table tag.

  Thanks
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---