View List content

View: New views
5 Messages — Rating Filter:   Alert me  

View List content

by wapgui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

I'm playing a littlebit with Lift and git and the following code looks
good for me (doesn't mean that it is working).
No errors, but also no output. Where am I wrong?

Cheers
Torsten

class HelloWorld {
  def howdy = <span>Welcome to scagit using {exec("git --version")._1}
</span>
  var tree = exec("git ls-tree HEAD","/home/git/repositories/
scagit.git")._1
  var elem = List.fromString(tree,'\0')
  //def list = elem.foreach(files => println(files))
  def list(xhtml:NodeSeq):NodeSeq = {
    //elem.foreach(file => println(file))
    elem.flatMap(file => bind("list", xhtml, "item" -> <p>file</p>))
  }
}

<p><lift:HelloWorld.howdy /></p>
<lift:HelloWorld.list>
   <item />
</lift:HelloWorld.list>

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


Re: View List content

by Timothy Perrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Any reason your not using eGit? Seems like it would be a lot better to  
make a scala wrapper around that rather than use exec.

Cheers, Tim

Sent from my iPhone

On 2 Nov 2009, at 21:58, wapgui <torsten.schmidt@...> wrote:

>
> Hi,
>
> I'm playing a littlebit with Lift and git and the following code looks
> good for me (doesn't mean that it is working).
> No errors, but also no output. Where am I wrong?
>
> Cheers
> Torsten
>
> class HelloWorld {
>  def howdy = <span>Welcome to scagit using {exec("git --version")._1}
> </span>
>  var tree = exec("git ls-tree HEAD","/home/git/repositories/
> scagit.git")._1
>  var elem = List.fromString(tree,'\0')
>  //def list = elem.foreach(files => println(files))
>  def list(xhtml:NodeSeq):NodeSeq = {
>    //elem.foreach(file => println(file))
>    elem.flatMap(file => bind("list", xhtml, "item" -> <p>file</p>))
>  }
> }
>
> <p><lift:HelloWorld.howdy /></p>
> <lift:HelloWorld.list>
>   <item />
> </lift:HelloWorld.list>
>
> >
>

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


Re: View List content

by wapgui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Tim,

I think you mean jGit, eGit is the eclipse plugin wrapper for jGit.
But I only knew eGit till now, so it was not in focus.
The way to get the information is quite equal via InputStreamReader. I
will try it out.
But the problem means to be the same. How can I display a list with
strings?

Cheers
Torsten

On 2 Nov., 23:51, Timothy Perrett <timo...@...> wrote:

> Any reason your not using eGit? Seems like it would be a lot better to  
> make a scala wrapper around that rather than use exec.
>
> Cheers, Tim
>
> Sent from my iPhone
>
> On 2 Nov 2009, at 21:58, wapgui <torsten.schm...@...> wrote:
>
>
>
> > Hi,
>
> > I'm playing a littlebit with Lift and git and the following code looks
> > good for me (doesn't mean that it is working).
> > No errors, but also no output. Where am I wrong?
>
> > Cheers
> > Torsten
>
> > class HelloWorld {
> >  def howdy = <span>Welcome to scagit using {exec("git --version")._1}
> > </span>
> >  var tree = exec("git ls-tree HEAD","/home/git/repositories/
> > scagit.git")._1
> >  var elem = List.fromString(tree,'\0')
> >  //def list = elem.foreach(files => println(files))
> >  def list(xhtml:NodeSeq):NodeSeq = {
> >    //elem.foreach(file => println(file))
> >    elem.flatMap(file => bind("list", xhtml, "item" -> <p>file</p>))
> >  }
> > }
>
> > <p><lift:HelloWorld.howdy /></p>
> > <lift:HelloWorld.list>
> >   <item />
> > </lift:HelloWorld.list>

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


Re: View List content

by Thiébaut Champenier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Torsten,

In your html, you have to use <list:item/> according to how you bind:

>  def list(xhtml:NodeSeq):NodeSeq = {
>    elem.flatMap(file => bind("list", xhtml, "item" -> <p>file</p>))
>  }

> <p><lift:HelloWorld.howdy /></p>
> <lift:HelloWorld.list>
>   <item />
> </lift:HelloWorld.list>

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


Re: View List content

by wapgui :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks, that made it.

On 3 Nov., 10:34, Thiébaut Champenier <tchampen...@...> wrote:

> Hi Torsten,
>
> In your html, you have to use <list:item/> according to how you bind:
>
> >  def list(xhtml:NodeSeq):NodeSeq = {
> >    elem.flatMap(file => bind("list", xhtml, "item" -> <p>file</p>))
> >  }
> > <p><lift:HelloWorld.howdy /></p>
> > <lift:HelloWorld.list>
> >   <item />
> > </lift:HelloWorld.list>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---