[Lift] Re: MappedDateTime losing time?

2009-08-21 Thread Derek Chen-Becker
It should be very safe to use 1.0.1-SNAPSHOT. I'm planning on spinning the
release of 1.0.1 GA next Wednesday, so we're in a code freeze starting
Sunday. Really, the 1.0 line is strictly bug-fix at this point (1.1-SNAPSHOT
is where new features make it in). So far, the things that have made it into
1.0.1 are:

1. Proper Oracle support
2. Fix for PostgreSQL double type
3. The DateTime fix
4. Some fixes for the Textile parser
5. Some minor XML parsing fixes (PCDataMarkupParser)
6. Some Actor fixes

Technically speaking, the DateTime fix added MappedDate and MappedTime
classes so that people could choose what "resolution" they want on time
fields, but otherwise there isn't any new functionality.

Derek

On Fri, Aug 21, 2009 at 6:54 PM, Grant Wood  wrote:

>
> Hello Derek,
>
> I can confirm that 1.01-SNAPSHOT fixes the problem.  Here is output
> from my test instance from earlier.
>
> --- Begin
> [INFO] Starting jetty 6.1.19 ...
> 2009-08-21 19:40:16.410::INFO:  jetty-6.1.19
> 2009-08-21 19:40:16.526::INFO:  No Transaction manager found - if your
> webapp requires one, please configure one.
> Date: 1 2009-08-20 00:00:00.0
> Date: 2 2009-08-21 19:40:18.319
> 2009-08-21 19:40:18.822::INFO:  Started
> selectchannelconnec...@0.0.0.0:8080
> --- End
>
> Date 1 was on 1.0 and Date 2 was on 1.01-SNAPSHOT
>
> How safe is it to use 1.01-SNAPSHOT for daily development at this
> point?
>
> Thank you for the fix!
>
> Grant
>
>
> On Aug 21, 4:02 pm, Derek Chen-Becker  wrote:
> > OK, the patch is in 1.0.1-SNAPSHOT. Grant, can you test against
> > 1.0.1-SNAPSHOT and make sure that it works for you?
> >
> > Thanks,
> >
> > Derek
> >
> > On Fri, Aug 21, 2009 at 2:05 PM, Derek Chen-Becker <
> dchenbec...@gmail.com>wrote:
> >
> >
> >
> > > It didn't. As soon as I get the PostgreSql patch pushed for
> 1.1-0SNAPSHOT
> > > I'll work on getting the DateTime fix into 1.0.1
> >
> > > Derek
> >
> > > On Fri, Aug 21, 2009 at 2:57 PM, Derek Chen-Becker <
> dchenbec...@gmail.com>wrote:
> >
> > >> I don't know that it did. Let me look into it.
> >
> > >> On Fri, Aug 21, 2009 at 11:34 AM, David Pollak <
> > >> feeder.of.the.be...@gmail.com> wrote:
> >
> > >>> On Thu, Aug 20, 2009 at 6:37 PM, Grant Wood 
> wrote:
> >
> >  Hi David,
> >
> >  Here is the output you wanted:
> >  -- Begin output
> >  [INFO] Starting jetty 6.1.19 ...
> >  2009-08-20 20:34:08.780::INFO:  jetty-6.1.19
> >  2009-08-20 20:34:08.908::INFO:  No Transaction manager found - if
> your
> >  webapp requires one, please configure one.
> >  Date: 1 2009-08-20 00:00:00.0
> >  2009-08-20 20:34:11.340::INFO:  Started
> >  selectchannelconnec...@0.0.0.0:8080
> >  [INFO] Started Jetty Server
> >  [INFO] Starting scanner at interval of 5 seconds.
> >
> >  You'll notice that the timestamps on startup are 20:34:11.340 but
> the
> >  DateTest output was: 00:00:00.0
> >
> > >>> Yeah... it looks like a problem with the Derby driver...
> >
> > >>> Derek -- Did the fix to the Derby driver make it into 1.0.1?
> >
> > >>> Grant -- if you can use 1.1-SNAPSHOT or 1.1-M4, you'll have a fix to
> the
> > >>> problem.
> >
> >  I hope this is helpful.
> >
> >  -Grant
> >
> >  On Aug 20, 11:38 am, David Pollak 
> >  wrote:
> >  > On Wed, Aug 19, 2009 at 10:14 PM, Grant Wood  >
> >  wrote:
> >
> >  > > David,
> >
> >  > > I'm developing with Derby.
> >
> >  > Please add this class:
> >
> >  > import net.liftweb._
> >  > import mapper._
> >
> >  > class DateTest extends LongKeyedMapper[DateTest] with IdPK {
> >
> >  >   def getSingleton = DateTest
> >
> >  >   object date extends MappedDateTime(this)
> >
> >  > }
> >
> >  > object DateTest extends DateTest with
> LongKeyedMetaMapper[DateTest]
> >
> >  > And in boot, schemify DateTest and at the end of Boot, include the
> >  lines:
> >
> >  >  DateTest.create.date(now).save
> >
> >  > for {
> >  >   dt <- DateTest.findAll()
> >  > } println("Date: "+dt.id+" "+dt.date.is)
> >
> >  > Then send the output
> >
> >  > > I've been running Lift 1.0
> >
> >  > > -Grant
> >
> >  > > On Aug 19, 1:51 pm, David Pollak  >
> >  > > wrote:
> >  > > > Grant,
> >
> >  > > > What database are you using?
> >
> >  > > > What version of Lift?
> >
> >  > > > Thanks,
> >
> >  > > > David
> >
> >  > --
> >  > 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 frameworkhttp://liftweb.net
> > >>> Beginning Scalahttp://www.apress.com/book/view/1430219890
> >
> > >>> Follow me:http://twitter.com/dpp
> > >>> Git some:http://github.com/dpp
>
> >
>


[Lift] Re: MappedDateTime losing time?

2009-08-21 Thread Grant Wood

Hello Derek,

I can confirm that 1.01-SNAPSHOT fixes the problem.  Here is output
from my test instance from earlier.

--- Begin
[INFO] Starting jetty 6.1.19 ...
2009-08-21 19:40:16.410::INFO:  jetty-6.1.19
2009-08-21 19:40:16.526::INFO:  No Transaction manager found - if your
webapp requires one, please configure one.
Date: 1 2009-08-20 00:00:00.0
Date: 2 2009-08-21 19:40:18.319
2009-08-21 19:40:18.822::INFO:  Started
selectchannelconnec...@0.0.0.0:8080
--- End

Date 1 was on 1.0 and Date 2 was on 1.01-SNAPSHOT

How safe is it to use 1.01-SNAPSHOT for daily development at this
point?

Thank you for the fix!

Grant


On Aug 21, 4:02 pm, Derek Chen-Becker  wrote:
> OK, the patch is in 1.0.1-SNAPSHOT. Grant, can you test against
> 1.0.1-SNAPSHOT and make sure that it works for you?
>
> Thanks,
>
> Derek
>
> On Fri, Aug 21, 2009 at 2:05 PM, Derek Chen-Becker 
> wrote:
>
>
>
> > It didn't. As soon as I get the PostgreSql patch pushed for 1.1-0SNAPSHOT
> > I'll work on getting the DateTime fix into 1.0.1
>
> > Derek
>
> > On Fri, Aug 21, 2009 at 2:57 PM, Derek Chen-Becker 
> > wrote:
>
> >> I don't know that it did. Let me look into it.
>
> >> On Fri, Aug 21, 2009 at 11:34 AM, David Pollak <
> >> feeder.of.the.be...@gmail.com> wrote:
>
> >>> On Thu, Aug 20, 2009 at 6:37 PM, Grant Wood  wrote:
>
>  Hi David,
>
>  Here is the output you wanted:
>  -- Begin output
>  [INFO] Starting jetty 6.1.19 ...
>  2009-08-20 20:34:08.780::INFO:  jetty-6.1.19
>  2009-08-20 20:34:08.908::INFO:  No Transaction manager found - if your
>  webapp requires one, please configure one.
>  Date: 1 2009-08-20 00:00:00.0
>  2009-08-20 20:34:11.340::INFO:  Started
>  selectchannelconnec...@0.0.0.0:8080
>  [INFO] Started Jetty Server
>  [INFO] Starting scanner at interval of 5 seconds.
>
>  You'll notice that the timestamps on startup are 20:34:11.340 but the
>  DateTest output was: 00:00:00.0
>
> >>> Yeah... it looks like a problem with the Derby driver...
>
> >>> Derek -- Did the fix to the Derby driver make it into 1.0.1?
>
> >>> Grant -- if you can use 1.1-SNAPSHOT or 1.1-M4, you'll have a fix to the
> >>> problem.
>
>  I hope this is helpful.
>
>  -Grant
>
>  On Aug 20, 11:38 am, David Pollak 
>  wrote:
>  > On Wed, Aug 19, 2009 at 10:14 PM, Grant Wood 
>  wrote:
>
>  > > David,
>
>  > > I'm developing with Derby.
>
>  > Please add this class:
>
>  > import net.liftweb._
>  > import mapper._
>
>  > class DateTest extends LongKeyedMapper[DateTest] with IdPK {
>
>  >   def getSingleton = DateTest
>
>  >   object date extends MappedDateTime(this)
>
>  > }
>
>  > object DateTest extends DateTest with LongKeyedMetaMapper[DateTest]
>
>  > And in boot, schemify DateTest and at the end of Boot, include the
>  lines:
>
>  >  DateTest.create.date(now).save
>
>  >     for {
>  >       dt <- DateTest.findAll()
>  >     } println("Date: "+dt.id+" "+dt.date.is)
>
>  > Then send the output
>
>  > > I've been running Lift 1.0
>
>  > > -Grant
>
>  > > On Aug 19, 1:51 pm, David Pollak 
>  > > wrote:
>  > > > Grant,
>
>  > > > What database are you using?
>
>  > > > What version of Lift?
>
>  > > > Thanks,
>
>  > > > David
>
>  > --
>  > 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 frameworkhttp://liftweb.net
> >>> Beginning Scalahttp://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] Lift Core Missing on mvn install

2009-08-21 Thread Peter Robinett

Hi all,

I think I have a problem with my pom.xml file, as when I run 'mvn
install' I get an error saying that Lift Core is missing. 'mvn
jetty:run' works fine. My pom.xml is here: http://gist.github.com/172540

I'd appreciate any tips. Thanks!

Peter Robinett
--~--~-~--~~~---~--~~
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: MappedDateTime losing time?

2009-08-21 Thread Derek Chen-Becker
OK, the patch is in 1.0.1-SNAPSHOT. Grant, can you test against
1.0.1-SNAPSHOT and make sure that it works for you?

Thanks,

Derek

On Fri, Aug 21, 2009 at 2:05 PM, Derek Chen-Becker wrote:

> It didn't. As soon as I get the PostgreSql patch pushed for 1.1-0SNAPSHOT
> I'll work on getting the DateTime fix into 1.0.1
>
> Derek
>
>
> On Fri, Aug 21, 2009 at 2:57 PM, Derek Chen-Becker 
> wrote:
>
>> I don't know that it did. Let me look into it.
>>
>>
>> On Fri, Aug 21, 2009 at 11:34 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Thu, Aug 20, 2009 at 6:37 PM, Grant Wood  wrote:
>>>

 Hi David,

 Here is the output you wanted:
 -- Begin output
 [INFO] Starting jetty 6.1.19 ...
 2009-08-20 20:34:08.780::INFO:  jetty-6.1.19
 2009-08-20 20:34:08.908::INFO:  No Transaction manager found - if your
 webapp requires one, please configure one.
 Date: 1 2009-08-20 00:00:00.0
 2009-08-20 20:34:11.340::INFO:  Started
 selectchannelconnec...@0.0.0.0:8080
 [INFO] Started Jetty Server
 [INFO] Starting scanner at interval of 5 seconds.


 You'll notice that the timestamps on startup are 20:34:11.340 but the
 DateTest output was: 00:00:00.0

>>>
>>> Yeah... it looks like a problem with the Derby driver...
>>>
>>> Derek -- Did the fix to the Derby driver make it into 1.0.1?
>>>
>>> Grant -- if you can use 1.1-SNAPSHOT or 1.1-M4, you'll have a fix to the
>>> problem.
>>>
>>>

 I hope this is helpful.

 -Grant



 On Aug 20, 11:38 am, David Pollak 
 wrote:
 > On Wed, Aug 19, 2009 at 10:14 PM, Grant Wood 
 wrote:
 >
 > > David,
 >
 > > I'm developing with Derby.
 >
 > Please add this class:
 >
 > import net.liftweb._
 > import mapper._
 >
 > class DateTest extends LongKeyedMapper[DateTest] with IdPK {
 >
 >   def getSingleton = DateTest
 >
 >   object date extends MappedDateTime(this)
 >
 > }
 >
 > object DateTest extends DateTest with LongKeyedMetaMapper[DateTest]
 >
 > And in boot, schemify DateTest and at the end of Boot, include the
 lines:
 >
 >  DateTest.create.date(now).save
 >
 > for {
 >   dt <- DateTest.findAll()
 > } println("Date: "+dt.id+" "+dt.date.is)
 >
 > Then send the output
 >
 >
 >
 >
 >
 >
 >
 > > I've been running Lift 1.0
 >
 > > -Grant
 >
 > > On Aug 19, 1:51 pm, David Pollak 
 > > wrote:
 > > > Grant,
 >
 > > > What database are you using?
 >
 > > > What version of Lift?
 >
 > > > Thanks,
 >
 > > > David
 >
 > --
 > 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: TableEditor article

2009-08-21 Thread glenn

Naftoli,

I think a configurable TableEditor is a good thing to have. I don't
believe it would take much to enhance what you have started. For one
thing, if TableEditorImpl were not a protected class, then
one could simply override what is needed. Perhaps it should be made a
trait that users could simply implement for any customization. Maybe
ItemList could be broken up into FieldList, for just
fields, and ItemList, for those non-field items, such as
MappedManyToMany. As it is, I will need to rewrite portions of the
code to handle these things. If I can do it so that it is reuseable
outside my own particular situation, I will let you know.

Glenn...

On Aug 21, 1:05 pm, Naftoli Gugenheim  wrote:
> I should have thought of that problem.
> I could make TableEditor more flexible when I have time, but the truth is 
> that I don't know if it's worth it. The whole thing is less than 80 LOC with 
> scaladocs (not counting the utilities it uses which you can also use). The 
> real logic that provides its semantics is ItemsList, which includes 
> sortability, and is public. So it's probably not worth it to not write your 
> own snippet! The value of TableEditor is that it's automatic--3 lines in the 
> view and two in Boot, (actually that could surely be lessened when I have a 
> chance) and it works on any table. Once your customizing it it might not be 
> worth it. It basically does old fashioned binds, backed by an ItemsList 
> (better name anyone?). Also it uses eachField from mapper.view.Util, but in 
> your case you know which fields you have.
> What do you think?
>
> -
>
> glenn wrote:
>
> Naftoli,
>
> I must be doing something wrong. I tried the following, as you
> suggested,
> inserting the extra xml after the item:fields tag, but
> ManagerUsers.list does its
> own iteration through the table items and I get duplicate columns.
>
> ManageUsers.list just does a bind to the myuser:roles tag.
>
> 
>     
>       
>         
>       
>       
>         
>       
>       
>     
>   
>
> Then, I have the added problem of saving changes to the item, since
> roles is not
> a field recognized by ItemsList.save.
>
> Any suggestions??
>
> Kevin,
>
> I implemented asmselect in my app and it works great.
> Thanks for the heads up.
>
> Glenn...
>
> On Aug 20, 3:44 pm, Naftoli Gugenheim  wrote:
>
> > It's not too hard to make your own without ajax.
> > def addRemove(c: Child) = (_:Boolean) match {
> >   case true => if(!field.contains(c)) field+=c
> >   case false => field -= c}
>
> > Then iterate (flatMap) over Child.findAll creating a checkbox initialized 
> > to field.contains(x) with addRemove(x) as its setter.
>
> > -
>
> > Kevin Wright wrote:
>
> > Absolutely spot-on article here about multiple selection on 
> > webpages:http://www.ryancramer.com/journal/entries/select_multiple/
> > I'm a big fan of asmselect, and the real beauty is that we already have
> > jquery support in lift out-of-the-box :)
> > 
>
> > On Thu, Aug 20, 2009 at 11:27 PM, glenn  wrote:
>
> > > Naftoli,
>
> > > I like the checkboxes style for a small selection (say 10 or less),
> > > and perhaps a multi-selectbox if the choices are more numerous.
> > > Another approach is to use two list boxes, one for the choices and
> > > another for the selections, with maybe a drag-and-drop capability or
> > > some add/remove buttons in between. I guess there is no good default
> > > solution.
>
> > > One enhancement to your tableeditor would be a tableviewer option,
> > > using a  instead of a  tag.
>
> > > Thanks for your help.
>
> > > Glenn...
>
> > > On Aug 20, 2:20 pm, Naftoli Gugenheim  wrote:
> > > > The name is really a misnomer. It's not a MappedField. So it's missing
> > > the opposite half: it _is_ the "validSelectValues" but it doesn't have the
> > > toForm method of MappedField's to make use of its values.
> > > > I'm not sure how a hypothetical "toForm" would work for a many-to-many
> > > "field." Actually it depends on the circumstances. One option is how MS
> > > Access works---every time you select a value you get a new blank row. This
> > > is good where you can have many or duplicate children, but is more complex
> > > to implement. Similarly you can have a list of current children and a
> > > dropdown to add. Another option (where duplicates are not allowed) is a 
> > > set
> > > of checkboxes.
>
> > > > -
>
> > > > glenn wrote:
>
> > > > Naftoli,
>
> > > > Sorry for the addendum, but ideally, it would be nice to
> > > > do something like:
>
> > > > override def validSelectValues: Box[List[(Long, String)]] ...
>
> > > > as you can with MappedLongForeignKey, and have a select box
> > > > display in the table.
>
> > > > Glenn...
>
> > > > On Aug 20, 12:51 pm, glenn  wrote:
>
> > > > > Naftoli,
>
> > > > > I tried using TableEditor with a MetaMapper instance of a ManyToMany
> 

[Lift] Re: TableEditor article

2009-08-21 Thread Naftoli Gugenheim

I should have thought of that problem.
I could make TableEditor more flexible when I have time, but the truth is that 
I don't know if it's worth it. The whole thing is less than 80 LOC with 
scaladocs (not counting the utilities it uses which you can also use). The real 
logic that provides its semantics is ItemsList, which includes sortability, and 
is public. So it's probably not worth it to not write your own snippet! The 
value of TableEditor is that it's automatic--3 lines in the view and two in 
Boot, (actually that could surely be lessened when I have a chance) and it 
works on any table. Once your customizing it it might not be worth it. It 
basically does old fashioned binds, backed by an ItemsList (better name 
anyone?). Also it uses eachField from mapper.view.Util, but in your case you 
know which fields you have.
What do you think?

-
glenn wrote:


Naftoli,

I must be doing something wrong. I tried the following, as you
suggested,
inserting the extra xml after the item:fields tag, but
ManagerUsers.list does its
own iteration through the table items and I get duplicate columns.

ManageUsers.list just does a bind to the myuser:roles tag.



  

  
  

  
  

  

Then, I have the added problem of saving changes to the item, since
roles is not
a field recognized by ItemsList.save.

Any suggestions??

Kevin,

I implemented asmselect in my app and it works great.
Thanks for the heads up.

Glenn...


On Aug 20, 3:44 pm, Naftoli Gugenheim  wrote:
> It's not too hard to make your own without ajax.
> def addRemove(c: Child) = (_:Boolean) match {
>   case true => if(!field.contains(c)) field+=c
>   case false => field -= c}
>
> Then iterate (flatMap) over Child.findAll creating a checkbox initialized to 
> field.contains(x) with addRemove(x) as its setter.
>
> -
>
> Kevin Wright wrote:
>
> Absolutely spot-on article here about multiple selection on 
> webpages:http://www.ryancramer.com/journal/entries/select_multiple/
> I'm a big fan of asmselect, and the real beauty is that we already have
> jquery support in lift out-of-the-box :)
> 
>
> On Thu, Aug 20, 2009 at 11:27 PM, glenn  wrote:
>
> > Naftoli,
>
> > I like the checkboxes style for a small selection (say 10 or less),
> > and perhaps a multi-selectbox if the choices are more numerous.
> > Another approach is to use two list boxes, one for the choices and
> > another for the selections, with maybe a drag-and-drop capability or
> > some add/remove buttons in between. I guess there is no good default
> > solution.
>
> > One enhancement to your tableeditor would be a tableviewer option,
> > using a  instead of a  tag.
>
> > Thanks for your help.
>
> > Glenn...
>
> > On Aug 20, 2:20 pm, Naftoli Gugenheim  wrote:
> > > The name is really a misnomer. It's not a MappedField. So it's missing
> > the opposite half: it _is_ the "validSelectValues" but it doesn't have the
> > toForm method of MappedField's to make use of its values.
> > > I'm not sure how a hypothetical "toForm" would work for a many-to-many
> > "field." Actually it depends on the circumstances. One option is how MS
> > Access works---every time you select a value you get a new blank row. This
> > is good where you can have many or duplicate children, but is more complex
> > to implement. Similarly you can have a list of current children and a
> > dropdown to add. Another option (where duplicates are not allowed) is a set
> > of checkboxes.
>
> > > -
>
> > > glenn wrote:
>
> > > Naftoli,
>
> > > Sorry for the addendum, but ideally, it would be nice to
> > > do something like:
>
> > > override def validSelectValues: Box[List[(Long, String)]] ...
>
> > > as you can with MappedLongForeignKey, and have a select box
> > > display in the table.
>
> > > Glenn...
>
> > > On Aug 20, 12:51 pm, glenn  wrote:
>
> > > > Naftoli,
>
> > > > I tried using TableEditor with a MetaMapper instance of a ManyToMany
> > > > class, but  and
> > > >  tags in the template didn't pick up the MappedManyToMany
> > > > object in the class.
>
> > > > Is there some method that I need to override,or is there some way to
> > > > write the template that will
> > > > resolve this?
>
> > > > Glenn...
>
> > > > On Aug 12, 2:48 pm, Naftoli Gugenheim  wrote:
>
> > > > > I just wrote a brief wiki article on GitHub about using TableEditor,
> > but not
> > > > > being familiar with the formatting syntax, the code snippets are
> > truncated.
> > > > > Can anyone take a look at it and fix it? 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 
htt

[Lift] Re: TableEditor article

2009-08-21 Thread glenn

Kevin,

The way I implemented asmselect for a MappedManyToMany object was to
write a method in my Mapper class to extract the information
from the database.

object roles
extends MappedManyToMany(UserRole, UserRole.user, UserRole.role,
Role)

def validSelectValues: Box[List[(Long, String)]] =
  Full(
 Role.findAll.map( x => (x.id.is, x.name.is) ))


In my snippet, I created the select list like so:

   var options = new Queue[Node]()

e.validSelectValues match {
  case Full(x) => for(r <- x){
if(e.roles.contains(r._1))
  options+= {r._2}
options+= {r._2}
   }
  case _ =>
}

def selectRoles =
  
 {options}
  

where e represents my Mapper instance. Then I just bound selectRoles
to
the tag in my template.

It was really pretty simple.

Glenn...

On Aug 21, 11:06 am, glenn  wrote:
> Naftoli,
>
> I must be doing something wrong. I tried the following, as you
> suggested,
> inserting the extra xml after the item:fields tag, but
> ManagerUsers.list does its
> own iteration through the table items and I get duplicate columns.
>
> ManageUsers.list just does a bind to the myuser:roles tag.
>
> 
>     
>       
>         
>       
>       
>         
>       
>       
>     
>   
>
> Then, I have the added problem of saving changes to the item, since
> roles is not
> a field recognized by ItemsList.save.
>
> Any suggestions??
>
> Kevin,
>
> I implemented asmselect in my app and it works great.
> Thanks for the heads up.
>
> Glenn...
>
> On Aug 20, 3:44 pm, Naftoli Gugenheim  wrote:
>
> > It's not too hard to make your own without ajax.
> > def addRemove(c: Child) = (_:Boolean) match {
> >   case true => if(!field.contains(c)) field+=c
> >   case false => field -= c}
>
> > Then iterate (flatMap) over Child.findAll creating a checkbox initialized 
> > to field.contains(x) with addRemove(x) as its setter.
>
> > -
>
> > Kevin Wright wrote:
>
> > Absolutely spot-on article here about multiple selection on 
> > webpages:http://www.ryancramer.com/journal/entries/select_multiple/
> > I'm a big fan of asmselect, and the real beauty is that we already have
> > jquery support in lift out-of-the-box :)
> > 
>
> > On Thu, Aug 20, 2009 at 11:27 PM, glenn  wrote:
>
> > > Naftoli,
>
> > > I like the checkboxes style for a small selection (say 10 or less),
> > > and perhaps a multi-selectbox if the choices are more numerous.
> > > Another approach is to use two list boxes, one for the choices and
> > > another for the selections, with maybe a drag-and-drop capability or
> > > some add/remove buttons in between. I guess there is no good default
> > > solution.
>
> > > One enhancement to your tableeditor would be a tableviewer option,
> > > using a  instead of a  tag.
>
> > > Thanks for your help.
>
> > > Glenn...
>
> > > On Aug 20, 2:20 pm, Naftoli Gugenheim  wrote:
> > > > The name is really a misnomer. It's not a MappedField. So it's missing
> > > the opposite half: it _is_ the "validSelectValues" but it doesn't have the
> > > toForm method of MappedField's to make use of its values.
> > > > I'm not sure how a hypothetical "toForm" would work for a many-to-many
> > > "field." Actually it depends on the circumstances. One option is how MS
> > > Access works---every time you select a value you get a new blank row. This
> > > is good where you can have many or duplicate children, but is more complex
> > > to implement. Similarly you can have a list of current children and a
> > > dropdown to add. Another option (where duplicates are not allowed) is a 
> > > set
> > > of checkboxes.
>
> > > > -
>
> > > > glenn wrote:
>
> > > > Naftoli,
>
> > > > Sorry for the addendum, but ideally, it would be nice to
> > > > do something like:
>
> > > > override def validSelectValues: Box[List[(Long, String)]] ...
>
> > > > as you can with MappedLongForeignKey, and have a select box
> > > > display in the table.
>
> > > > Glenn...
>
> > > > On Aug 20, 12:51 pm, glenn  wrote:
>
> > > > > Naftoli,
>
> > > > > I tried using TableEditor with a MetaMapper instance of a ManyToMany
> > > > > class, but  and
> > > > >  tags in the template didn't pick up the MappedManyToMany
> > > > > object in the class.
>
> > > > > Is there some method that I need to override,or is there some way to
> > > > > write the template that will
> > > > > resolve this?
>
> > > > > Glenn...
>
> > > > > On Aug 12, 2:48 pm, Naftoli Gugenheim  wrote:
>
> > > > > > I just wrote a brief wiki article on GitHub about using TableEditor,
> > > but not
> > > > > > being familiar with the formatting syntax, the code snippets are
> > > truncated.
> > > > > > Can anyone take a look at it and fix it? Thanks.
--~--~-~--~~~---~--~~
You received this me

[Lift] Re: MappedDateTime losing time?

2009-08-21 Thread Derek Chen-Becker
It didn't. As soon as I get the PostgreSql patch pushed for 1.1-0SNAPSHOT
I'll work on getting the DateTime fix into 1.0.1

Derek

On Fri, Aug 21, 2009 at 2:57 PM, Derek Chen-Becker wrote:

> I don't know that it did. Let me look into it.
>
>
> On Fri, Aug 21, 2009 at 11:34 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Thu, Aug 20, 2009 at 6:37 PM, Grant Wood  wrote:
>>
>>>
>>> Hi David,
>>>
>>> Here is the output you wanted:
>>> -- Begin output
>>> [INFO] Starting jetty 6.1.19 ...
>>> 2009-08-20 20:34:08.780::INFO:  jetty-6.1.19
>>> 2009-08-20 20:34:08.908::INFO:  No Transaction manager found - if your
>>> webapp requires one, please configure one.
>>> Date: 1 2009-08-20 00:00:00.0
>>> 2009-08-20 20:34:11.340::INFO:  Started
>>> selectchannelconnec...@0.0.0.0:8080
>>> [INFO] Started Jetty Server
>>> [INFO] Starting scanner at interval of 5 seconds.
>>>
>>>
>>> You'll notice that the timestamps on startup are 20:34:11.340 but the
>>> DateTest output was: 00:00:00.0
>>>
>>
>> Yeah... it looks like a problem with the Derby driver...
>>
>> Derek -- Did the fix to the Derby driver make it into 1.0.1?
>>
>> Grant -- if you can use 1.1-SNAPSHOT or 1.1-M4, you'll have a fix to the
>> problem.
>>
>>
>>>
>>> I hope this is helpful.
>>>
>>> -Grant
>>>
>>>
>>>
>>> On Aug 20, 11:38 am, David Pollak 
>>> wrote:
>>> > On Wed, Aug 19, 2009 at 10:14 PM, Grant Wood 
>>> wrote:
>>> >
>>> > > David,
>>> >
>>> > > I'm developing with Derby.
>>> >
>>> > Please add this class:
>>> >
>>> > import net.liftweb._
>>> > import mapper._
>>> >
>>> > class DateTest extends LongKeyedMapper[DateTest] with IdPK {
>>> >
>>> >   def getSingleton = DateTest
>>> >
>>> >   object date extends MappedDateTime(this)
>>> >
>>> > }
>>> >
>>> > object DateTest extends DateTest with LongKeyedMetaMapper[DateTest]
>>> >
>>> > And in boot, schemify DateTest and at the end of Boot, include the
>>> lines:
>>> >
>>> >  DateTest.create.date(now).save
>>> >
>>> > for {
>>> >   dt <- DateTest.findAll()
>>> > } println("Date: "+dt.id+" "+dt.date.is)
>>> >
>>> > Then send the output
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > I've been running Lift 1.0
>>> >
>>> > > -Grant
>>> >
>>> > > On Aug 19, 1:51 pm, David Pollak 
>>> > > wrote:
>>> > > > Grant,
>>> >
>>> > > > What database are you using?
>>> >
>>> > > > What version of Lift?
>>> >
>>> > > > Thanks,
>>> >
>>> > > > David
>>> >
>>> > --
>>> > 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: MappedDateTime losing time?

2009-08-21 Thread Derek Chen-Becker
I don't know that it did. Let me look into it.

On Fri, Aug 21, 2009 at 11:34 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Thu, Aug 20, 2009 at 6:37 PM, Grant Wood  wrote:
>
>>
>> Hi David,
>>
>> Here is the output you wanted:
>> -- Begin output
>> [INFO] Starting jetty 6.1.19 ...
>> 2009-08-20 20:34:08.780::INFO:  jetty-6.1.19
>> 2009-08-20 20:34:08.908::INFO:  No Transaction manager found - if your
>> webapp requires one, please configure one.
>> Date: 1 2009-08-20 00:00:00.0
>> 2009-08-20 20:34:11.340::INFO:  Started
>> selectchannelconnec...@0.0.0.0:8080
>> [INFO] Started Jetty Server
>> [INFO] Starting scanner at interval of 5 seconds.
>>
>>
>> You'll notice that the timestamps on startup are 20:34:11.340 but the
>> DateTest output was: 00:00:00.0
>>
>
> Yeah... it looks like a problem with the Derby driver...
>
> Derek -- Did the fix to the Derby driver make it into 1.0.1?
>
> Grant -- if you can use 1.1-SNAPSHOT or 1.1-M4, you'll have a fix to the
> problem.
>
>
>>
>> I hope this is helpful.
>>
>> -Grant
>>
>>
>>
>> On Aug 20, 11:38 am, David Pollak 
>> wrote:
>> > On Wed, Aug 19, 2009 at 10:14 PM, Grant Wood 
>> wrote:
>> >
>> > > David,
>> >
>> > > I'm developing with Derby.
>> >
>> > Please add this class:
>> >
>> > import net.liftweb._
>> > import mapper._
>> >
>> > class DateTest extends LongKeyedMapper[DateTest] with IdPK {
>> >
>> >   def getSingleton = DateTest
>> >
>> >   object date extends MappedDateTime(this)
>> >
>> > }
>> >
>> > object DateTest extends DateTest with LongKeyedMetaMapper[DateTest]
>> >
>> > And in boot, schemify DateTest and at the end of Boot, include the
>> lines:
>> >
>> >  DateTest.create.date(now).save
>> >
>> > for {
>> >   dt <- DateTest.findAll()
>> > } println("Date: "+dt.id+" "+dt.date.is)
>> >
>> > Then send the output
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > I've been running Lift 1.0
>> >
>> > > -Grant
>> >
>> > > On Aug 19, 1:51 pm, David Pollak 
>> > > wrote:
>> > > > Grant,
>> >
>> > > > What database are you using?
>> >
>> > > > What version of Lift?
>> >
>> > > > Thanks,
>> >
>> > > > David
>> >
>> > --
>> > 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: **URGENT** PostgreSQL drivers broken for PG 8.1

2009-08-21 Thread Derek Chen-Becker
OK, this is pushed into 1.1-SNAPSHOT and 1.0.1-SNAPSHOT.

On Fri, Aug 21, 2009 at 11:50 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Fri, Aug 21, 2009 at 9:02 AM, Derek Chen-Becker 
> wrote:
>
>> It gets even better. I put together some code to determine driver behavior
>> and it seems to work. The problem is that now I'm testing against PG 8.0,
>> which I just found out doesn't support the "lastval()" function :(. This
>> begs the question, can we document somewhere what versions of the databases
>> that we support?
>
>
> That would be good.  Also, if we can fail early by throwing an exception
> with a very detailed message, that'd be great!
>
>
>> I could do it in Scaladoc on the DriverTypes classes, but I'd at least
>> like to write somewhere that we only support versions X, Y and Z. If we want
>> to support PG 8.0 I'm going to have to figure out how to get the generated
>> value some other way...
>
>
> Maybe on a wiki page.
>
> Thanks for your diligent work on this!
>
> David
>
>
>>
>>
>> Derek
>>
>>
>> On Thu, Aug 20, 2009 at 3:53 PM, Derek Chen-Becker > > wrote:
>>
>>> I should have a real fix out pretty soon that will take into account the
>>> server version. Actually, the "current" behavior of calling lastval() is
>>> broken if columns other than the primary key are auto-generated. I think
>>> that this is pretty rare but I'd still like to look into fixing it.
>>>
>>> Derek
>>>
>>>
>>> On Thu, Aug 20, 2009 at 4:47 PM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>


 On Thu, Aug 20, 2009 at 2:31 PM, Derek Chen-Becker <
 dchenbec...@gmail.com> wrote:

> A fix has been pushed to master and 1.0_maint. Give hudson some time to
> build 1.1-SNAPSHOT and I'll push a 1.0.1-SNAPSHOT release from here.
> Apologies for the issue.


 Thanks for your wicked fast response!


>
>
> Derek
>
>
> On Thu, Aug 20, 2009 at 4:08 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> Folks,
>>
>> We changed the way that the PostgreSQL retrieved primary keys from
>> INSERTs.  Turns out that the new code does not work with PG 8.1.
>>
>> You will see something like:
>>
>>  ERROR: syntax error at or near "RETURNING"
>> org.postgresql.util.PSQLException: ERROR: syntax error at or near
>> "RETURNING"
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1559)
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
>> at
>> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
>> at
>> net.liftweb.mapper.PostgreSqlDriver$.performInsertWithPK(Driver.scala:207)
>> at net.liftweb.mapper.DriverType.performInsert(Driver.scala:68)
>> at
>> net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:676)
>> at
>> net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:622)
>>
>> If you are running PG 8.1 and Lift.  We will be fixing the problem
>> ASAP.
>>
>> Thanks,
>>
>> David
>>
>> --
>> 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
>>
>>
>>
>
>
>


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



>>>
>>
>>
>>
>
>
> --
> 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: erro: MappedDouble is not mapped to 'double precision' datatype in PostgreSQL?

2009-08-21 Thread Derek Chen-Becker
OK, the fix is in 1.0.1-SNAPSHOT and I'll be releasing 1.0.1 stable next
Wednesday.

Derek

On Sun, Aug 2, 2009 at 6:16 AM, JanWillem Tulp wrote:

>
> That would be great! Thanks!
>
> On Aug 2, 7:09 am, Derek Chen-Becker  wrote:
> > Pending the verification of the Oracle fix, I'll work on a 1.0.1 release
> > with these changes this week.
> >
> > Derek
> >
> > On Sat, Aug 1, 2009 at 3:41 AM, JanWillem Tulp  >wrote:
> >
> >
> >
> >
> >
> > > Hi Derek,
> >
> > > you fix worked!! The schemifier has successfully created a table with
> > > a column of type DOUBLE PRECISION.
> >
> > > JanWillem
> >
> > > On Jul 31, 9:28 am, JanWillem Tulp  wrote:
> > > > Thanks, yes, I'll try tomorrow and let you know!
> >
> > > > On Jul 29, 12:43 am, Derek Chen-Becker 
> wrote:
> >
> > > > > OK, I've pushed 1.0.1-SNAPSHOT to the repo with something that
> should
> > > fix
> > > > > the PostgreSQL stuff. Can you update your POM to 1.0.1-SNAPSHOT and
> try
> > > it?
> >
> > > > > Thanks,
> >
> > > > > Derek
> >
> > > > > On Tue, Jul 28, 2009 at 11:40 AM, JanWillem Tulp
> > > > > wrote:
> >
> > > > > > Hi Derek,
> >
> > > > > > I am using liftweb version 1.0
> >
> > > > > > Thanks!
> >
> > > > > > On Jul 27, 10:27 pm, Derek Chen-Becker 
> > > wrote:
> > > > > > > This looks like an issue with PostgreSQLDriver. The type should
> be
> > > > > > "DOUBLE
> > > > > > > PRECISION". What version of Lift are you using? Let me know and
> > > I'll put
> > > > > > a
> > > > > > > fix in the proper place.
> >
> > > > > > > Derek
> >
> > > > > > > On Sun, Jul 26, 2009 at 5:59 AM, JanWillem Tulp <
> > > > > > janwillem.t...@gmail.com>wrote:
> >
> > > > > > > > Still looking to find a solution for this, or at least what
> > > causes
> > > > > > > > this behavior. I am looking at the Liftweb source code, and
> see
> > > in the
> > > > > > > > BaseMetaMapper trait a function called buildMapper that does
> some
> > > > > > > > pattern matching on SQL column types (colType). Just for my
> > > > > > > > understanding, why is there a match for almost any of the
> basic
> > > SQL
> > > > > > > > types, but not for Types.DOUBLE?
> >
> > > > > > > > Has anyone else run into this problem?
> >
> > > > > > > > On Jul 26, 1:34 am, JanWillem Tulp  >
> > > wrote:
> > > > > > > > > Hi all,
> >
> > > > > > > > > I'm not sure that I am missing something here, but the
> > > Schemifier
> > > > > > > > > cannot create a table for a model class that contains an
> object
> > > that
> > > > > > > > > extends from MappedDouble.
> >
> > > > > > > > > This is the Lift code:
> >
> > > > > > > > > class MeasureValue extends LongKeyedMapper[MeasureValue]
> with
> > > IdPK {
> > > > > > > > >   def getSingleton = MeasureValue
> >
> > > > > > > > >   object value extends MappedDouble(this)
> > > > > > > > >   object measure extends MappedLongForeignKey(this,
> Measure)
> >
> > > > > > > > > }
> >
> > > > > > > > > object MeasureValue extends MeasureValue with
> > > LongKeyedMetaMapper
> > > > > > > > > [MeasureValue]
> >
> > > > > > > > > I added MeasureValue to the Schemifier so that it will
> create a
> > > table
> > > > > > > > > when boot is executed. However, this is the stacktrace I
> get
> > > when I
> > > > > > > > > start the application:
> >
> > > > > > > > > main INFO  lift - CREATE TABLE measurevalue (measure BIGINT
> ,
> > > value
> > > > > > > > > DOUBLE , id BIGSERIAL)
> > > > > > > > > main ERROR lift - Failed to Boot
> > > > > > > > > org.postgresql.util.PSQLException: ERROR: type "double"
> does
> > > not
> > > > > > exist
> > > > > > > > > at
> > > > > > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse
> > > > > > > > > (QueryExecutorImpl.java:1592)
> > > > > > > > > at
> > > org.postgresql.core.v3.QueryExecutorImpl.processResults
> > > > > > > > > (QueryExecutorImpl.java:1327)
> > > > > > > > > at org.postgresql.core.v3.QueryExecutorImpl.execute
> > > > > > > > > (QueryExecutorImpl.java:192)
> > > > > > > > > at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute
> > > > > > > > > (AbstractJdbc2Statement.java:451)
> > > > > > > > > at
> > > > > > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags
> > > > > > > > > (AbstractJdbc2Statement.java:336)
> > > > > > > > > at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute
> > > > > > > > > (AbstractJdbc2Statement.java:328)
> > > > > > > > > at
> > > > > > net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$
> > > > > > > > > $maybeWrite(Schemifier.scala:150)
> > > > > > > > > at
> > > > > > net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$
> > > > > > > > > $ensureTable(Schemifier.scala:160)
> > > > > > > > > at
> >
> > > net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$1.apply
> > > > > > > > > (Schemifier.scala:60)
> > > > > > > > > at
> >
> > > net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$1.apply
> > > > > > > > > (Schemifier.scala:60)
> > > > > > > > >  

[Lift] Re: Include build # in LiftVersion?

2009-08-21 Thread Timothy Perrett

Perhaps its worth going to market (as it were) to check that there is either
no single solution, nor a number of other solutions (mojos) that we could
string together to get what we want? Im not sure that the effort involved in
making our own is warranted given the output...

Perhaps someone in the wider java/maven land has some existing effort in a
repo someplace...

Cheers, Tim


On 21/08/2009 17:53, "David Pollak"  wrote:

> Gaacckkk... that's the first thought that comes to mind... ;-)
> 
> Looks like our choices are:
> - Write our own Maven plugin and/or update the BuildNumber plugin
> - Avoid the feature
> 
> We actually have the build time already in the manifest.  I'd love to get the
> repo and the fingerprint in there as well.
>  



--~--~-~--~~~---~--~~
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: TableEditor article

2009-08-21 Thread glenn

Naftoli,

I must be doing something wrong. I tried the following, as you
suggested,
inserting the extra xml after the item:fields tag, but
ManagerUsers.list does its
own iteration through the table items and I get duplicate columns.

ManageUsers.list just does a bind to the myuser:roles tag.



  

  
  

  
  

  

Then, I have the added problem of saving changes to the item, since
roles is not
a field recognized by ItemsList.save.

Any suggestions??

Kevin,

I implemented asmselect in my app and it works great.
Thanks for the heads up.

Glenn...


On Aug 20, 3:44 pm, Naftoli Gugenheim  wrote:
> It's not too hard to make your own without ajax.
> def addRemove(c: Child) = (_:Boolean) match {
>   case true => if(!field.contains(c)) field+=c
>   case false => field -= c}
>
> Then iterate (flatMap) over Child.findAll creating a checkbox initialized to 
> field.contains(x) with addRemove(x) as its setter.
>
> -
>
> Kevin Wright wrote:
>
> Absolutely spot-on article here about multiple selection on 
> webpages:http://www.ryancramer.com/journal/entries/select_multiple/
> I'm a big fan of asmselect, and the real beauty is that we already have
> jquery support in lift out-of-the-box :)
> 
>
> On Thu, Aug 20, 2009 at 11:27 PM, glenn  wrote:
>
> > Naftoli,
>
> > I like the checkboxes style for a small selection (say 10 or less),
> > and perhaps a multi-selectbox if the choices are more numerous.
> > Another approach is to use two list boxes, one for the choices and
> > another for the selections, with maybe a drag-and-drop capability or
> > some add/remove buttons in between. I guess there is no good default
> > solution.
>
> > One enhancement to your tableeditor would be a tableviewer option,
> > using a  instead of a  tag.
>
> > Thanks for your help.
>
> > Glenn...
>
> > On Aug 20, 2:20 pm, Naftoli Gugenheim  wrote:
> > > The name is really a misnomer. It's not a MappedField. So it's missing
> > the opposite half: it _is_ the "validSelectValues" but it doesn't have the
> > toForm method of MappedField's to make use of its values.
> > > I'm not sure how a hypothetical "toForm" would work for a many-to-many
> > "field." Actually it depends on the circumstances. One option is how MS
> > Access works---every time you select a value you get a new blank row. This
> > is good where you can have many or duplicate children, but is more complex
> > to implement. Similarly you can have a list of current children and a
> > dropdown to add. Another option (where duplicates are not allowed) is a set
> > of checkboxes.
>
> > > -
>
> > > glenn wrote:
>
> > > Naftoli,
>
> > > Sorry for the addendum, but ideally, it would be nice to
> > > do something like:
>
> > > override def validSelectValues: Box[List[(Long, String)]] ...
>
> > > as you can with MappedLongForeignKey, and have a select box
> > > display in the table.
>
> > > Glenn...
>
> > > On Aug 20, 12:51 pm, glenn  wrote:
>
> > > > Naftoli,
>
> > > > I tried using TableEditor with a MetaMapper instance of a ManyToMany
> > > > class, but  and
> > > >  tags in the template didn't pick up the MappedManyToMany
> > > > object in the class.
>
> > > > Is there some method that I need to override,or is there some way to
> > > > write the template that will
> > > > resolve this?
>
> > > > Glenn...
>
> > > > On Aug 12, 2:48 pm, Naftoli Gugenheim  wrote:
>
> > > > > I just wrote a brief wiki article on GitHub about using TableEditor,
> > but not
> > > > > being familiar with the formatting syntax, the code snippets are
> > truncated.
> > > > > Can anyone take a look at it and fix it? 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: Include build # in LiftVersion?

2009-08-21 Thread David Pollak
On Fri, Aug 21, 2009 at 6:18 AM, Indrajit Raychaudhuri
wrote:

>
> Maven is still quite git unfriendly, unfortunately.
>
> We used to have BuildNumber plugin (http://mojo.codehaus.org/
> buildnumber-maven-plugin/create-mojo.html)
> in a Subversion based
> project.
> I don't think that works for Maven's Git SCM provider though.
>
> Alternately, this plugin allows injecting timestamp (http://
> code.google.com/p/maven-timestamp-plugin/) into manifest.mf.
> This is crude, and far different from what we want (git commit hash),
> but probably useful in identifying the unique build timestamp.
>
> Thoughts?


Gaacckkk... that's the first thought that comes to mind... ;-)

Looks like our choices are:
- Write our own Maven plugin and/or update the BuildNumber plugin
- Avoid the feature

We actually have the build time already in the manifest.  I'd love to get
the repo and the fingerprint in there as well.


>
>
> /indrajit
>
> On Aug 21, 12:32 pm, David Bernard  wrote:
> > I don't know how to grab git fingerprint, but I can modify the pom.xml
> > to add a timestamp in the Manifest
> >
>  
> ${project.version}-${buildNumber}
> >
> > Are you ok ?
> >
> > On Wed, Aug 19, 2009 at 18:26, David
> >
> > Pollak wrote:
> >
> > > On Wed, Aug 19, 2009 at 5:44 AM, Jeppe Nejsum Madsen  >
> > > wrote:
> >
> > >> Hi,
> >
> > >> When living on the bleeding edge (i.e. 1.1-SNAPSHOT) it is sometimes
> > >> difficult to figure out which version of lift is in use and deployed.
> >
> > >> LiftRules.liftVersion only returns 1-1.0-SNAPSHOT.
> >
> > >> I could probably try to correlate liftBuildDate with hudson and github
> but
> > >> this seem error prone :-)
> >
> > >> Would it be possible to:
> >
> > >> 1) Include the build # in liftVersion for the snapshot release?
> >
> > > Right now the version number is available in the manifest file.  If
> you, or
> > > someone else, can suggest a way grab the Git fingerprint for the build
> > > release, I'm all for including that in the manifest as well.
> >
> > >> 2) Make it possible to identify the revision from this build #
> > >> (e.g. push the hudson build tags to the github repo or something
> > >> similar)?
> >
> > >> /Jeppe
> >
> > > --
> > > 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: **URGENT** PostgreSQL drivers broken for PG 8.1

2009-08-21 Thread David Pollak
On Fri, Aug 21, 2009 at 9:02 AM, Derek Chen-Becker wrote:

> It gets even better. I put together some code to determine driver behavior
> and it seems to work. The problem is that now I'm testing against PG 8.0,
> which I just found out doesn't support the "lastval()" function :(. This
> begs the question, can we document somewhere what versions of the databases
> that we support?


That would be good.  Also, if we can fail early by throwing an exception
with a very detailed message, that'd be great!


> I could do it in Scaladoc on the DriverTypes classes, but I'd at least like
> to write somewhere that we only support versions X, Y and Z. If we want to
> support PG 8.0 I'm going to have to figure out how to get the generated
> value some other way...


Maybe on a wiki page.

Thanks for your diligent work on this!

David


>
>
> Derek
>
>
> On Thu, Aug 20, 2009 at 3:53 PM, Derek Chen-Becker 
> wrote:
>
>> I should have a real fix out pretty soon that will take into account the
>> server version. Actually, the "current" behavior of calling lastval() is
>> broken if columns other than the primary key are auto-generated. I think
>> that this is pretty rare but I'd still like to look into fixing it.
>>
>> Derek
>>
>>
>> On Thu, Aug 20, 2009 at 4:47 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Thu, Aug 20, 2009 at 2:31 PM, Derek Chen-Becker <
>>> dchenbec...@gmail.com> wrote:
>>>
 A fix has been pushed to master and 1.0_maint. Give hudson some time to
 build 1.1-SNAPSHOT and I'll push a 1.0.1-SNAPSHOT release from here.
 Apologies for the issue.
>>>
>>>
>>> Thanks for your wicked fast response!
>>>
>>>


 Derek


 On Thu, Aug 20, 2009 at 4:08 PM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

> Folks,
>
> We changed the way that the PostgreSQL retrieved primary keys from
> INSERTs.  Turns out that the new code does not work with PG 8.1.
>
> You will see something like:
>
>  ERROR: syntax error at or near "RETURNING"
> org.postgresql.util.PSQLException: ERROR: syntax error at or near
> "RETURNING"
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1559)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
> at
> net.liftweb.mapper.PostgreSqlDriver$.performInsertWithPK(Driver.scala:207)
> at net.liftweb.mapper.DriverType.performInsert(Driver.scala:68)
> at
> net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:676)
> at
> net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:622)
>
> If you are running PG 8.1 and Lift.  We will be fixing the problem
> ASAP.
>
> Thanks,
>
> David
>
> --
> 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
>
>
>



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


-- 
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] HasManyThrough and PreCache?

2009-08-21 Thread harryh

class List extends LongKeyedMapper[TipList] with IdPK {
  object tips extends HasManyThrough(this, Tip, TipListBind,
TipListBind.listid, TipListBind.tipid)
}

class Tip extends LongKeyedMapper[TipList] with IdPK {
  object user extends MappedLongForeignKey(this, User)
}

class TipListBind extends LongKeyedMapper[TipList] with IdPK {
  object tipid extends MappedLongForeignKey(this, Tip)
  object listid extends MappedLongForeignKey(this, List)

  object xtimestamp extends MappedDateTime[TipUserBind](this)
}

So if I'm dealing with all the Tips that are in a List, and I care
about the users on those tips I get an N+1 query situation.  Is there
any way to PreCache Tip.user with the HasManyThrough?

I'd also really like to sort the tips based on the xtimestamp in
TipListBind.  Kind of makes me think that HasManyThrough should take a
QueryParam*.  It could even handle By() type QueryParams if I wanted
to only get some of the Tips based on fields in TipListBind (say all
the tips where TipListBind.xtimestamp > NOW() - 10 DAY).

-harryh
--~--~-~--~~~---~--~~
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: **URGENT** PostgreSQL drivers broken for PG 8.1

2009-08-21 Thread Derek Chen-Becker
I hate talking over myself, but it seems like I could kill two birds with
one stone by uzing the index names to fire off currval calls instead. That
would fix this for all PG server 8.0-8.1 and it would also solve the problem
of retrieving values when there is more than one generated key.

Derek

On Fri, Aug 21, 2009 at 10:02 AM, Derek Chen-Becker
wrote:

> It gets even better. I put together some code to determine driver behavior
> and it seems to work. The problem is that now I'm testing against PG 8.0,
> which I just found out doesn't support the "lastval()" function :(. This
> begs the question, can we document somewhere what versions of the databases
> that we support? I could do it in Scaladoc on the DriverTypes classes, but
> I'd at least like to write somewhere that we only support versions X, Y and
> Z. If we want to support PG 8.0 I'm going to have to figure out how to get
> the generated value some other way...
>
> Derek
>
>
> On Thu, Aug 20, 2009 at 3:53 PM, Derek Chen-Becker 
> wrote:
>
>> I should have a real fix out pretty soon that will take into account the
>> server version. Actually, the "current" behavior of calling lastval() is
>> broken if columns other than the primary key are auto-generated. I think
>> that this is pretty rare but I'd still like to look into fixing it.
>>
>> Derek
>>
>>
>> On Thu, Aug 20, 2009 at 4:47 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Thu, Aug 20, 2009 at 2:31 PM, Derek Chen-Becker <
>>> dchenbec...@gmail.com> wrote:
>>>
 A fix has been pushed to master and 1.0_maint. Give hudson some time to
 build 1.1-SNAPSHOT and I'll push a 1.0.1-SNAPSHOT release from here.
 Apologies for the issue.
>>>
>>>
>>> Thanks for your wicked fast response!
>>>
>>>


 Derek


 On Thu, Aug 20, 2009 at 4:08 PM, David Pollak <
 feeder.of.the.be...@gmail.com> wrote:

> Folks,
>
> We changed the way that the PostgreSQL retrieved primary keys from
> INSERTs.  Turns out that the new code does not work with PG 8.1.
>
> You will see something like:
>
>  ERROR: syntax error at or near "RETURNING"
> org.postgresql.util.PSQLException: ERROR: syntax error at or near
> "RETURNING"
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1559)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
> at
> net.liftweb.mapper.PostgreSqlDriver$.performInsertWithPK(Driver.scala:207)
> at net.liftweb.mapper.DriverType.performInsert(Driver.scala:68)
> at
> net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:676)
> at
> net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:622)
>
> If you are running PG 8.1 and Lift.  We will be fixing the problem
> ASAP.
>
> Thanks,
>
> David
>
> --
> 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
>
>
>



>>>
>>>
>>> --
>>> 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: **URGENT** PostgreSQL drivers broken for PG 8.1

2009-08-21 Thread Derek Chen-Becker
It gets even better. I put together some code to determine driver behavior
and it seems to work. The problem is that now I'm testing against PG 8.0,
which I just found out doesn't support the "lastval()" function :(. This
begs the question, can we document somewhere what versions of the databases
that we support? I could do it in Scaladoc on the DriverTypes classes, but
I'd at least like to write somewhere that we only support versions X, Y and
Z. If we want to support PG 8.0 I'm going to have to figure out how to get
the generated value some other way...

Derek

On Thu, Aug 20, 2009 at 3:53 PM, Derek Chen-Becker wrote:

> I should have a real fix out pretty soon that will take into account the
> server version. Actually, the "current" behavior of calling lastval() is
> broken if columns other than the primary key are auto-generated. I think
> that this is pretty rare but I'd still like to look into fixing it.
>
> Derek
>
>
> On Thu, Aug 20, 2009 at 4:47 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Thu, Aug 20, 2009 at 2:31 PM, Derek Chen-Becker > > wrote:
>>
>>> A fix has been pushed to master and 1.0_maint. Give hudson some time to
>>> build 1.1-SNAPSHOT and I'll push a 1.0.1-SNAPSHOT release from here.
>>> Apologies for the issue.
>>
>>
>> Thanks for your wicked fast response!
>>
>>
>>>
>>>
>>> Derek
>>>
>>>
>>> On Thu, Aug 20, 2009 at 4:08 PM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>
 Folks,

 We changed the way that the PostgreSQL retrieved primary keys from
 INSERTs.  Turns out that the new code does not work with PG 8.1.

 You will see something like:

  ERROR: syntax error at or near "RETURNING"
 org.postgresql.util.PSQLException: ERROR: syntax error at or near
 "RETURNING"
 at
 org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1559)
 at
 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
 at
 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:193)
 at
 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
 at
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
 at
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
 at
 net.liftweb.mapper.PostgreSqlDriver$.performInsertWithPK(Driver.scala:207)
 at net.liftweb.mapper.DriverType.performInsert(Driver.scala:68)
 at
 net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:676)
 at
 net.liftweb.mapper.MetaMapper$$anonfun$12.apply(MetaMapper.scala:622)

 If you are running PG 8.1 and Lift.  We will be fixing the problem ASAP.

 Thanks,

 David

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



>>>
>>>
>>>
>>
>>
>> --
>> 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: error while SHtml.ajaxInvoke call

2009-08-21 Thread David Pollak
I still don't understand.

Does the user do anything to get the faster table updated or do you want the
faster table "pushed" from the server when something changes on the server?

If it's the former (the user does something to get the faster table
updated), you want to use ajaxButton... the user clicks on the button and
the server-responds with JavaScript that updates the browser.

If it's the latter (the user does nothing, but the server pushes changes to
the client), see CometActor.  You can see an example in the Clock.scala code
in the Lift sites/example project.

On Fri, Aug 21, 2009 at 1:25 AM, pravin  wrote:

>
> Hi,
> Thanks for u r quick reply.
> Now I am explain my problem in details :
>
> I have normal form with one text box and one submit button.
>
> Also i have 2 table components(these are dynamic tables )..but these
> table are out of the from tag.These table only displays information.
>
> Flow of the application:
>
> When i click on submit button.
> i am population two Lists .
>
> One list get populated from DB.( Slower)
> second list get populated from hard code values (faster)
>
> Now i am populate above 2 tables with these two lists when i click on
> submit button.
>
> With the above flow i am able to populate above tables(synchronously).
>
> But now i want to configure Ajax into this so i can get faster
> results...(as one List get faster)
> while other list can get populated asynchronously.
>
> So when i click on Submit button i will populate one list ..but how
> can i populate other list with Ajax...
>
> i tried for following:
> i was planning when other table getting render  make ajax call with
> ajaxInvokebut i wont work...
>
> Please help ...
>
> Thanks in advance
>
> -Pravin
>
>
>
>
>
>
> On Aug 20, 6:56 pm, David Pollak 
> wrote:
> > On Wed, Aug 19, 2009 at 10:50 PM, pravin  wrote:
> >
> > > yes i have submit button.
> > > on click event of this i am doing other tasks.
> >
> > What is the user interface (HTML) element that causes the Ajax update to
> > happen?  What does the user do in order to get the Ajax thing to happen?
> >
> > ajaxInvoke is a very low level call.  If you want to have an Ajax button,
> > use SHtml.ajaxButton.  If you want to have an Ajax form, use
> SHtml.ajaxForm.
> >  If you can describe what the user interaction should be, I'll write up
> some
> > example code for you.
> >
> >
> >
> >
> >
> > > above data population for text is not on click submit button.
> >
> > > On Aug 20, 2:56 am, David Pollak 
> > > wrote:
> > > > Are you trying to create a link/button that someone clicks on to
> cause
> > > the
> > > > Ajax call to be made?
> >
> > > > On Wed, Aug 19, 2009 at 8:43 AM, pravin 
> wrote:
> >
> > > > > Hi ,
> > > > > i am trying to configure Ajax in my application using lift.
> >
> > > > > I have :
> >
> > > > > 
> > > > >   > > > > cellpadding="10">
> > > > > 
> > > > > 
> > > > > 
> >
> > > > > snippet for given html code :
> >
> > > > > def showFeeds(xhtml:NodeSeq):NodeSeq ={
> > > > >   println("Inside showFeeds");
> > > > >   bind("t", xhtml,"feedsResultRows" -> SHtml.ajaxInvoke
> > > > > (updateStartDate)._2)
> > > > > }
> >
> > > > > def updateStartDate () : JsCmd= {
> >
> > > > > JsCmds.SetHtml("resultsRow", displayResult(List("abc","xyz")))
> > > > >  }
> >
> > > > > def displayResult(rList:List[Object]):NodeSeq={
> > > > >   
> > > > >  
> > > > > rList(0).toString()} > > > > td>
> > > > > 
> > > > > {rList(1).toString()}  > > > > td>
> > > > > 
> > > > >  
> > > > > 
> > > > >  }
> >
> > > > > But its not working-
> > > > > Giving out put on html page like-
> > > > >  lift_ajaxHandler('F966737512075R2E' + '=true',
> > > > > null, null)
> >
> > > > > What is this 
> > > > > How can i use Ajax in my application.I want to give asynchronous
> call
> > > > > (Ajax) for my above html component so it can get show list that i
> get
> > > > > from Db call .
> >
> > > > > This all  happening  on submit button click
> >
> > > > > Appreciate any pointer regarding this
> >
> > > > > -Pravin
> >
> > > > --
> > > > 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 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 becaus

[Lift] Re: MappedDateTime losing time?

2009-08-21 Thread David Pollak
On Thu, Aug 20, 2009 at 6:37 PM, Grant Wood  wrote:

>
> Hi David,
>
> Here is the output you wanted:
> -- Begin output
> [INFO] Starting jetty 6.1.19 ...
> 2009-08-20 20:34:08.780::INFO:  jetty-6.1.19
> 2009-08-20 20:34:08.908::INFO:  No Transaction manager found - if your
> webapp requires one, please configure one.
> Date: 1 2009-08-20 00:00:00.0
> 2009-08-20 20:34:11.340::INFO:  Started
> selectchannelconnec...@0.0.0.0:8080
> [INFO] Started Jetty Server
> [INFO] Starting scanner at interval of 5 seconds.
>
>
> You'll notice that the timestamps on startup are 20:34:11.340 but the
> DateTest output was: 00:00:00.0
>

Yeah... it looks like a problem with the Derby driver...

Derek -- Did the fix to the Derby driver make it into 1.0.1?

Grant -- if you can use 1.1-SNAPSHOT or 1.1-M4, you'll have a fix to the
problem.


>
> I hope this is helpful.
>
> -Grant
>
>
>
> On Aug 20, 11:38 am, David Pollak 
> wrote:
> > On Wed, Aug 19, 2009 at 10:14 PM, Grant Wood 
> wrote:
> >
> > > David,
> >
> > > I'm developing with Derby.
> >
> > Please add this class:
> >
> > import net.liftweb._
> > import mapper._
> >
> > class DateTest extends LongKeyedMapper[DateTest] with IdPK {
> >
> >   def getSingleton = DateTest
> >
> >   object date extends MappedDateTime(this)
> >
> > }
> >
> > object DateTest extends DateTest with LongKeyedMetaMapper[DateTest]
> >
> > And in boot, schemify DateTest and at the end of Boot, include the lines:
> >
> >  DateTest.create.date(now).save
> >
> > for {
> >   dt <- DateTest.findAll()
> > } println("Date: "+dt.id+" "+dt.date.is)
> >
> > Then send the output
> >
> >
> >
> >
> >
> >
> >
> > > I've been running Lift 1.0
> >
> > > -Grant
> >
> > > On Aug 19, 1:51 pm, David Pollak 
> > > wrote:
> > > > Grant,
> >
> > > > What database are you using?
> >
> > > > What version of Lift?
> >
> > > > Thanks,
> >
> > > > David
> >
> > --
> > 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: Include build # in LiftVersion?

2009-08-21 Thread Indrajit Raychaudhuri

Maven is still quite git unfriendly, unfortunately.

We used to have BuildNumber plugin (http://mojo.codehaus.org/
buildnumber-maven-plugin/create-mojo.html) in a Subversion based
project.
I don't think that works for Maven's Git SCM provider though.

Alternately, this plugin allows injecting timestamp (http://
code.google.com/p/maven-timestamp-plugin/) into manifest.mf.
This is crude, and far different from what we want (git commit hash),
but probably useful in identifying the unique build timestamp.

Thoughts?

/indrajit

On Aug 21, 12:32 pm, David Bernard  wrote:
> I don't know how to grab git fingerprint, but I can modify the pom.xml
> to add a timestamp in the Manifest
>    
> ${project.version}-${buildNumber}
>
> Are you ok ?
>
> On Wed, Aug 19, 2009 at 18:26, David
>
> Pollak wrote:
>
> > On Wed, Aug 19, 2009 at 5:44 AM, Jeppe Nejsum Madsen 
> > wrote:
>
> >> Hi,
>
> >> When living on the bleeding edge (i.e. 1.1-SNAPSHOT) it is sometimes
> >> difficult to figure out which version of lift is in use and deployed.
>
> >> LiftRules.liftVersion only returns 1-1.0-SNAPSHOT.
>
> >> I could probably try to correlate liftBuildDate with hudson and github but
> >> this seem error prone :-)
>
> >> Would it be possible to:
>
> >> 1) Include the build # in liftVersion for the snapshot release?
>
> > Right now the version number is available in the manifest file.  If you, or
> > someone else, can suggest a way grab the Git fingerprint for the build
> > release, I'm all for including that in the manifest as well.
>
> >> 2) Make it possible to identify the revision from this build #
> >> (e.g. push the hudson build tags to the github repo or something
> >> similar)?
>
> >> /Jeppe
>
> > --
> > 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

--~--~-~--~~~---~--~~
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: managing foreign key object relationships with mapper

2009-08-21 Thread george

in case it helps anyone else, here is the solution to the above
problem

the dirty_? function should (obviously) use || not &&

override def dirty_?(toCheck: User): Boolean =
Address.dirty_?(toCheck.getAddress) || super.dirty_?(toCheck)

it appears i have been suffering from a severe bout of code
blindness / stupidity!

@naftoli - I tried out your LongMappedForeignMapper pulled from github
today, and it does now seem to work as advertised by setting the long
foreign key properly. It would be nice though if a call to user.save
could propogate to all the LongMappedForeignMapper children in the
User class. I have implemented this by overriding the dirty_? function
and using a beforeSave, but there is probably a better way.

--~--~-~--~~~---~--~~
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] Lift Wizard

2009-08-21 Thread Timothy Perrett

Hey all,

I guess im mainly asking this to DPP, as the wizard is his baby, but
have you (or do you) intend to make more progress on this soon? Its
something that interests me a great deal and i'd like to discuss /
help out if possible.

Cheers, Tim
--~--~-~--~~~---~--~~
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: error while SHtml.ajaxInvoke call

2009-08-21 Thread pravin

Hi,
Thanks for u r quick reply.
Now I am explain my problem in details :

I have normal form with one text box and one submit button.

Also i have 2 table components(these are dynamic tables )..but these
table are out of the from tag.These table only displays information.

Flow of the application:

When i click on submit button.
i am population two Lists .

 One list get populated from DB.( Slower)
 second list get populated from hard code values (faster)

Now i am populate above 2 tables with these two lists when i click on
submit button.

With the above flow i am able to populate above tables(synchronously).

But now i want to configure Ajax into this so i can get faster
results...(as one List get faster)
while other list can get populated asynchronously.

So when i click on Submit button i will populate one list ..but how
can i populate other list with Ajax...

i tried for following:
i was planning when other table getting render  make ajax call with
ajaxInvokebut i wont work...

Please help ...

Thanks in advance

-Pravin






On Aug 20, 6:56 pm, David Pollak 
wrote:
> On Wed, Aug 19, 2009 at 10:50 PM, pravin  wrote:
>
> > yes i have submit button.
> > on click event of this i am doing other tasks.
>
> What is the user interface (HTML) element that causes the Ajax update to
> happen?  What does the user do in order to get the Ajax thing to happen?
>
> ajaxInvoke is a very low level call.  If you want to have an Ajax button,
> use SHtml.ajaxButton.  If you want to have an Ajax form, use SHtml.ajaxForm.
>  If you can describe what the user interaction should be, I'll write up some
> example code for you.
>
>
>
>
>
> > above data population for text is not on click submit button.
>
> > On Aug 20, 2:56 am, David Pollak 
> > wrote:
> > > Are you trying to create a link/button that someone clicks on to cause
> > the
> > > Ajax call to be made?
>
> > > On Wed, Aug 19, 2009 at 8:43 AM, pravin  wrote:
>
> > > > Hi ,
> > > > i am trying to configure Ajax in my application using lift.
>
> > > > I have :
>
> > > > 
> > > >               > > > cellpadding="10">
> > > >                         
> > > >             
> > > > 
>
> > > > snippet for given html code :
>
> > > > def showFeeds(xhtml:NodeSeq):NodeSeq ={
> > > >       println("Inside showFeeds");
> > > >       bind("t", xhtml,"feedsResultRows" -> SHtml.ajaxInvoke
> > > > (updateStartDate)._2)
> > > > }
>
> > > > def updateStartDate () : JsCmd= {
>
> > > >     JsCmds.SetHtml("resultsRow", displayResult(List("abc","xyz")))
> > > >  }
>
> > > > def displayResult(rList:List[Object]):NodeSeq={
> > > >       
> > > >                      
> > > >                         rList(0).toString()} > > > td>
> > > >                         
> > > >                         {rList(1).toString()}  > > > td>
> > > >                         
> > > >                      
> > > >                     
> > > >  }
>
> > > > But its not working-
> > > > Giving out put on html page like-
> > > >                      lift_ajaxHandler('F966737512075R2E' + '=true',
> > > > null, null)
>
> > > > What is this 
> > > > How can i use Ajax in my application.I want to give asynchronous call
> > > > (Ajax) for my above html component so it can get show list that i get
> > > > from Db call .
>
> > > > This all  happening  on submit button click
>
> > > > Appreciate any pointer regarding this
>
> > > > -Pravin
>
> > > --
> > > 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 frameworkhttp://liftweb.net
> Beginning Scalahttp://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: Include build # in LiftVersion?

2009-08-21 Thread David Bernard

I don't know how to grab git fingerprint, but I can modify the pom.xml
to add a timestamp in the Manifest
   
${project.version}-${buildNumber}

Are you ok ?

On Wed, Aug 19, 2009 at 18:26, David
Pollak wrote:
>
>
> On Wed, Aug 19, 2009 at 5:44 AM, Jeppe Nejsum Madsen 
> wrote:
>>
>> Hi,
>>
>> When living on the bleeding edge (i.e. 1.1-SNAPSHOT) it is sometimes
>> difficult to figure out which version of lift is in use and deployed.
>>
>> LiftRules.liftVersion only returns 1-1.0-SNAPSHOT.
>>
>> I could probably try to correlate liftBuildDate with hudson and github but
>> this seem error prone :-)
>>
>> Would it be possible to:
>>
>> 1) Include the build # in liftVersion for the snapshot release?
>
> Right now the version number is available in the manifest file.  If you, or
> someone else, can suggest a way grab the Git fingerprint for the build
> release, I'm all for including that in the manifest as well.
>
>>
>> 2) Make it possible to identify the revision from this build #
>> (e.g. push the hudson build tags to the github repo or something
>> similar)?
>>
>> /Jeppe
>>
>>
>
>
>
> --
> 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
-~--~~~~--~~--~--~---