[Lift] Re: DB transactions - how?

2008-11-16 Thread David Pollak
Joachim,

Many moons ago, Lift automatically created a JDBC transaction when it
started handling an HTTP request and committed/released the connection at
the end of the request.  I don't know where that code went. :-(

You can use the following code:
  /**
   * Build a LoanWrapper to pass into S.addAround() to make requests for
   * the DefaultConnectionIdentifier transactional for the complete HTTP
request
   */
  def buildLoanWrapper(): LoanWrapper =
  buildLoanWrapper(List(DB.DefaultConnectionIdentifier))

  /**
   * Build a LoanWrapper to pass into S.addAround() to make requests for
   * the List of ConnectionIdentifiers transactional for the complete HTTP
request
   */
  def buildLoanWrapper(in: List[ConnectionIdentifier]): LoanWrapper =
  new LoanWrapper {
private def doWith[T](in: List[ConnectionIdentifier], f: => T): T =
in match {
  case Nil => f
  case x :: xs => DB.use(x)(ignore => doWith(xs, f))
}

def apply[T](f: => T): T = doWith(in, f)
  }

And in Boot.scala, include the line:
S.addAround(List(buildLoanWrapper())

Then rollback will work correctly.

Thanks,

David

On Sat, Nov 15, 2008 at 3:53 AM, Joachim A. <[EMAIL PROTECTED]>wrote:

>
> Hi,
> I'm using Lift 0.9 and the mapper featurese provided by Lift - I like
> it!
>
> Now I do need to do some database operations in a transaction and to
> rollback when an error occurs.
>
> I saw DB.rollback and tried DB.rollback(DefaultConnectionIdentifier),
> but that doesn't rollback anything. I also grepped the lift source
> code. No matches for "transaction" or "rollback" except in DB.
>
> How can I open a transaction and how can I rollback?
>
> Thanks a lot for any help!
> Joachim
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Valid XHTML

2008-11-16 Thread David Pollak
On Sun, Nov 16, 2008 at 11:33 AM, Charles F. Munat <[EMAIL PROTECTED]> wrote:

>
> I'm glad to hear that the xmlns issue is a validator issue. That was the
> most troubling thing. And I'm doubly glad that Lift cares about validity
> -- so many groups don't.
>
> Here are some other issues I've encountered:
>
> The SHtml default for a select element uses selected="true" but the
> XHTML DTD requires selected="selected".


Changed.


>
>
> The FocusOnLoad method generates a script element but does not include
> the type attribute (type="text/javascript") which is required.


Added


>
>
> This doesn't affect me, but many of the examples in the liftweb code use
> form="POST" which turns into method="POST" in the form element, but the
> method expects get or post, not GET or POST. In my own code, I use the
> lower case.


Fixed... and also the attribute is forced toLowerCase when Lift processes
it.


>
>
> There are a couple more but I can't remember where I found them. I'll
> post anything else I see. I believe the others involved elements where
> they weren't permitted.
>
> Some of the above may be specific to XHTML 1.1, which I use. I am
> curious as to why transitional is the default. We've been
> "transitioning" for the better part of a decade now. Will we ever get
> there? Lots of people are using JavaScript libraries now that frankly
> won't work on any of the old browsers that were the reason for the
> transitional version, so why not default to 1.1 and let those few who
> really need it switch back to transitional? You avoid the validator bug
> that way, too.


Dunno.  Transitional has worked for my projects.  If other want us to use
1.1 strict, just make your voices heard, please.


>
>
> I had almost given up on XHTML and returned to HTML when Lift convinced
> me that my despair was premature. I've since been moving my sites back
> to XHTML and even trying to serve it with the proper mime type. So
> thanks for that!


Cool.




>
>
> I'll post other issues as they come up.
>
> Chas.
>
> David Pollak wrote:
> >
> >
> > On Sat, Nov 15, 2008 at 9:24 PM, Charles F. Munat <[EMAIL PROTECTED]
> > > wrote:
> >
> >
> > Is there an interest in Lift using valid XHTML, or do the Lift crew
> only
> > care if it's well-formed?
> >
> >
> > We care if it's valid.  As Marius asked, "Please give us examples of
> > invalid XHTML" and as Tim pointed out "the W3C's XHTML validation tool
> > is broken."
> >
> > What do you change to make it more valid?
> >
> >
> >
> >
> > I ask because the current version of Lift
> > creates XHTML that is invalid on every page unless you adjust the
> > default settings, and even then there seems to be a lot of
> > framework-generated HTML that violates the XHTML DTD.
> >
> > I prefer valid XHTML, so I adjust settings and rewrite pieces of Lift
> > that break the code, but it occurs to me that others might not even
> be
> > aware that this is an issue and might like to know how to make the
> HTML
> > valid.
> >
> > So is this something others are interested in, or is it enough that
> the
> > current HTML output appears to work in most browsers?
> >
> > If the former, I'd be happy to contribute examples for how to fix the
> > problems.
> >
> > (For the record, this is a serious question. Most of the programmers
> I
> > know really couldn't care less if their HTML is "valid" as long as it
> > works, so I don't want to assume anything. Even most programming
> books
> > that show HTML show really bad, invalid, and obsolete HTML. HTML is
> > evidently not considered a real language by most programmers.)
> >
> > Chas.
> >
> > Oh, and for those who are curious and haven't tried it, the W3C HTML
> > Validator is here:
> >
> > http://validator.w3.org/
> >
> > There's a CSS validator, too:
> >
> > http://jigsaw.w3.org/css-validator/
> >
> >
> >
> >
> >
> > --
> > Lift, the simply functional web framework http://liftweb.net
> > Collaborative Task Management http://much4.us
> > Follow me: http://twitter.com/dpp
> > Git some: http://github.com/dpp
> >
> > >
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Recommended tools ?

2008-11-16 Thread Oscar Picasso
I have tried it with a simple project.
When importing the build path and dependencies are ok.
But when I try to run or debug the application directly from Netbeans it
actually launches:
NetBeans: Executing '/opt/maven/bin/mvn -Dexec.args=-Xdebug
-Djava.compiler=none -Xnoagent
-Xrunjdwp:transport=dt_socket,server=n,address=34404 -classpath %classpath
${packageClassName} -Djpda.listen=true -Djpda.address=34404
-Dexec.executable=java process-classes
org.codehaus.mojo:exec-maven-plugin:1.1:exec'

And gives me the error:
[compiler:compile]
Nothing to compile - all classes are up to date
[scala:compile {execution: default}]
Compiling 1 source files to /home/oscar/netbeans/mavos/target/classes
[WARNING] /home/oscar/netbeans/mavos/src/main/scala/org/mavos/Main.scala:10:
error: identifier expected but 'object' found.
[WARNING] object Main {
[WARNING] ^
[WARNING] one error found

Here I would prefer the run to be done as like with a scala project directly
created with Netbeans. I thought I could configure it on right-click project
> Properties but with a maven project a right click on a project raise an
error. (I just sent more details on the scala-tools list)

I guest it's a problem with the version of either NetBeans or the scala or
maven plugins.

Versions do you use for:
- NetBeans
- The Maven plugin
- The scala plugin.

On Sun, Nov 16, 2008 at 3:59 PM, David Bernard
<[EMAIL PROTECTED]>wrote:

>
> Maven + Netbeans (+ maven module/plugin for netbeans) + scala work
> like charm. after installing the netbeans maven plugin you simply open
> your maven project like native netbeans project.
> If you open a multi-module maven project, then you could see maven
> sub-project into the modules section of your project : double clik =>
> open sub-project like a native netbeans modules,...
>
> I didn't try m2eclipse or Q4E since 1 year, and under eclipse I use
> "external tools" to run maven (for java and scala project). But the
> maven plugin for netbeans is the best integration I see.
>
> On Sun, Nov 16, 2008 at 01:38, David Pollak
> <[EMAIL PROTECTED]> wrote:
> > I do maven from the command line. DavidB knows about maven in netbeans
> >
> > On Nov 15, 2008 4:20 PM, "Derek Chen-Becker" <[EMAIL PROTECTED]>
> wrote:
> >
> > Out of curiosity, how does Netbeans handle Maven projects, particularly
> ones
> > with nested modules? The most recent Eclipse plugin still has some warts,
> > but it generally seems to work OK if I set up the .classpath file
> properly
> > to point at all of the source folders.
> >
> > Thanks,
> >
> > Derek
> >
> > On Sat, Nov 15, 2008 at 11:25 AM, David Pollak
> > <[EMAIL PROTECTED]> wrote: > > I've bee...
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Recommended tools ?

2008-11-16 Thread Caoyuan

I fixed more bugs in NetBeans plugin during the week, it's much better
on code-completion especially for Liftweb project now. I'll release it
around the day when NetBeans 6.5 final released (scheduled on Nov 19).

Of course, if you are the guys who use NetBeans nightly build version,
you can get it updated at once.

On Mon, Nov 17, 2008 at 4:59 AM, David Bernard
<[EMAIL PROTECTED]> wrote:
>
> Maven + Netbeans (+ maven module/plugin for netbeans) + scala work
> like charm. after installing the netbeans maven plugin you simply open
> your maven project like native netbeans project.
> If you open a multi-module maven project, then you could see maven
> sub-project into the modules section of your project : double clik =>
> open sub-project like a native netbeans modules,...
>
> I didn't try m2eclipse or Q4E since 1 year, and under eclipse I use
> "external tools" to run maven (for java and scala project). But the
> maven plugin for netbeans is the best integration I see.
>
> On Sun, Nov 16, 2008 at 01:38, David Pollak
> <[EMAIL PROTECTED]> wrote:
>> I do maven from the command line. DavidB knows about maven in netbeans
>>
>> On Nov 15, 2008 4:20 PM, "Derek Chen-Becker" <[EMAIL PROTECTED]> wrote:
>>
>> Out of curiosity, how does Netbeans handle Maven projects, particularly ones
>> with nested modules? The most recent Eclipse plugin still has some warts,
>> but it generally seems to work OK if I set up the .classpath file properly
>> to point at all of the source folders.
>>
>> Thanks,
>>
>> Derek
>>
>> On Sat, Nov 15, 2008 at 11:25 AM, David Pollak
>> <[EMAIL PROTECTED]> wrote: > > I've bee...
>>
>> >
>>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Recommended tools ?

2008-11-16 Thread David Bernard

Maven + Netbeans (+ maven module/plugin for netbeans) + scala work
like charm. after installing the netbeans maven plugin you simply open
your maven project like native netbeans project.
If you open a multi-module maven project, then you could see maven
sub-project into the modules section of your project : double clik =>
open sub-project like a native netbeans modules,...

I didn't try m2eclipse or Q4E since 1 year, and under eclipse I use
"external tools" to run maven (for java and scala project). But the
maven plugin for netbeans is the best integration I see.

On Sun, Nov 16, 2008 at 01:38, David Pollak
<[EMAIL PROTECTED]> wrote:
> I do maven from the command line. DavidB knows about maven in netbeans
>
> On Nov 15, 2008 4:20 PM, "Derek Chen-Becker" <[EMAIL PROTECTED]> wrote:
>
> Out of curiosity, how does Netbeans handle Maven projects, particularly ones
> with nested modules? The most recent Eclipse plugin still has some warts,
> but it generally seems to work OK if I set up the .classpath file properly
> to point at all of the source folders.
>
> Thanks,
>
> Derek
>
> On Sat, Nov 15, 2008 at 11:25 AM, David Pollak
> <[EMAIL PROTECTED]> wrote: > > I've bee...
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Valid XHTML

2008-11-16 Thread Charles F. Munat

I'm glad to hear that the xmlns issue is a validator issue. That was the 
most troubling thing. And I'm doubly glad that Lift cares about validity 
-- so many groups don't.

Here are some other issues I've encountered:

The SHtml default for a select element uses selected="true" but the 
XHTML DTD requires selected="selected".

The FocusOnLoad method generates a script element but does not include 
the type attribute (type="text/javascript") which is required.

This doesn't affect me, but many of the examples in the liftweb code use 
form="POST" which turns into method="POST" in the form element, but the 
method expects get or post, not GET or POST. In my own code, I use the 
lower case.

There are a couple more but I can't remember where I found them. I'll 
post anything else I see. I believe the others involved elements where 
they weren't permitted.

Some of the above may be specific to XHTML 1.1, which I use. I am 
curious as to why transitional is the default. We've been 
"transitioning" for the better part of a decade now. Will we ever get 
there? Lots of people are using JavaScript libraries now that frankly 
won't work on any of the old browsers that were the reason for the 
transitional version, so why not default to 1.1 and let those few who 
really need it switch back to transitional? You avoid the validator bug 
that way, too.

I had almost given up on XHTML and returned to HTML when Lift convinced 
me that my despair was premature. I've since been moving my sites back 
to XHTML and even trying to serve it with the proper mime type. So 
thanks for that!

I'll post other issues as they come up.

Chas.

David Pollak wrote:
> 
> 
> On Sat, Nov 15, 2008 at 9:24 PM, Charles F. Munat <[EMAIL PROTECTED] 
> > wrote:
> 
> 
> Is there an interest in Lift using valid XHTML, or do the Lift crew only
> care if it's well-formed?
> 
> 
> We care if it's valid.  As Marius asked, "Please give us examples of 
> invalid XHTML" and as Tim pointed out "the W3C's XHTML validation tool 
> is broken."
> 
> What do you change to make it more valid?
> 
> 
>  
> 
> I ask because the current version of Lift
> creates XHTML that is invalid on every page unless you adjust the
> default settings, and even then there seems to be a lot of
> framework-generated HTML that violates the XHTML DTD.
> 
> I prefer valid XHTML, so I adjust settings and rewrite pieces of Lift
> that break the code, but it occurs to me that others might not even be
> aware that this is an issue and might like to know how to make the HTML
> valid.
> 
> So is this something others are interested in, or is it enough that the
> current HTML output appears to work in most browsers?
> 
> If the former, I'd be happy to contribute examples for how to fix the
> problems.
> 
> (For the record, this is a serious question. Most of the programmers I
> know really couldn't care less if their HTML is "valid" as long as it
> works, so I don't want to assume anything. Even most programming books
> that show HTML show really bad, invalid, and obsolete HTML. HTML is
> evidently not considered a real language by most programmers.)
> 
> Chas.
> 
> Oh, and for those who are curious and haven't tried it, the W3C HTML
> Validator is here:
> 
> http://validator.w3.org/
> 
> There's a CSS validator, too:
> 
> http://jigsaw.w3.org/css-validator/
> 
> 
> 
> 
> 
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Collaborative Task Management http://much4.us
> 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Recommended tools ?

2008-11-16 Thread Derek Chen-Becker
Right now I don't use the m2plugin in Eclipse, just the Scala plugin with an
appropriate setup for source folders. It sounds like m2plugin and Scala
still don't play nice.

Derek

On Sat, Nov 15, 2008 at 10:11 PM, Josh Suereth <[EMAIL PROTECTED]>wrote:

> Not sure if this helps, but I've been succesfully using Eclipse + Q +
> Multi-module projects + scala for several months now.  Yes the scala plugin
> is a bit flaky, but with some persuasion I can usually make it do what I
> want.  That being said, the presentation compiler tends to die on any
> project more complex than the eclipse plugin itself...
>
>
> -Josh
>
> On Sat, Nov 15, 2008 at 7:20 PM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote:
>
>> Out of curiosity, how does Netbeans handle Maven projects, particularly
>> ones with nested modules? The most recent Eclipse plugin still has some
>> warts, but it generally seems to work OK if I set up the .classpath file
>> properly to point at all of the source folders.
>>
>> Thanks,
>>
>> Derek
>>
>>
>> On Sat, Nov 15, 2008 at 11:25 AM, David Pollak <
>> [EMAIL PROTECTED]> wrote:
>>
>>> I've been using netbeans very succesfully. I recomend it.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>> On Nov 15, 2008 8:53 AM, "Oscar Picasso" <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> Which tools would you recommend to work for a lift project, and more
>>> generally with scala?
>>> The requirement being that the project also uses maven.
>>>
>>> I have tried the Eclipse plugin a number of times and I found it too
>>> unstable.
>>>
>>> The last Intellij IDEA plugin is decent, I was considering switching to
>>> IDEA. Howver I ran lately in some issues. The more important being that if I
>>> define implicits somewhere their containing folder keep loading... forever.
>>>
>>> I could use emacs but I would like some pretty formatting, code
>>> completion and error checking.
>>>
>>> On a scala list post I read David P. explaining that there are a number
>>> of decent tools to work with lift. Which ones?
>>>
>>> BTW: the lift wiki search does not work. It always returns a *No such
>>> special page*.
>>>
>>> Oscar
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Valid XHTML

2008-11-16 Thread David Pollak
On Sat, Nov 15, 2008 at 9:24 PM, Charles F. Munat <[EMAIL PROTECTED]> wrote:

>
> Is there an interest in Lift using valid XHTML, or do the Lift crew only
> care if it's well-formed?


We care if it's valid.  As Marius asked, "Please give us examples of invalid
XHTML" and as Tim pointed out "the W3C's XHTML validation tool is broken."

What do you change to make it more valid?




> I ask because the current version of Lift
> creates XHTML that is invalid on every page unless you adjust the
> default settings, and even then there seems to be a lot of
> framework-generated HTML that violates the XHTML DTD.
>
> I prefer valid XHTML, so I adjust settings and rewrite pieces of Lift
> that break the code, but it occurs to me that others might not even be
> aware that this is an issue and might like to know how to make the HTML
> valid.
>
> So is this something others are interested in, or is it enough that the
> current HTML output appears to work in most browsers?
>
> If the former, I'd be happy to contribute examples for how to fix the
> problems.
>
> (For the record, this is a serious question. Most of the programmers I
> know really couldn't care less if their HTML is "valid" as long as it
> works, so I don't want to assume anything. Even most programming books
> that show HTML show really bad, invalid, and obsolete HTML. HTML is
> evidently not considered a real language by most programmers.)
>
> Chas.
>
> Oh, and for those who are curious and haven't tried it, the W3C HTML
> Validator is here:
>
> http://validator.w3.org/
>
> There's a CSS validator, too:
>
> http://jigsaw.w3.org/css-validator/
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Recommended tools ?

2008-11-16 Thread Josh Suereth
Not sure if this helps, but I've been succesfully using Eclipse + Q +
Multi-module projects + scala for several months now.  Yes the scala plugin
is a bit flaky, but with some persuasion I can usually make it do what I
want.  That being said, the presentation compiler tends to die on any
project more complex than the eclipse plugin itself...


-Josh

On Sat, Nov 15, 2008 at 7:20 PM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote:

> Out of curiosity, how does Netbeans handle Maven projects, particularly
> ones with nested modules? The most recent Eclipse plugin still has some
> warts, but it generally seems to work OK if I set up the .classpath file
> properly to point at all of the source folders.
>
> Thanks,
>
> Derek
>
>
> On Sat, Nov 15, 2008 at 11:25 AM, David Pollak <
> [EMAIL PROTECTED]> wrote:
>
>> I've been using netbeans very succesfully. I recomend it.
>>
>> Thanks,
>>
>> David
>>
>> On Nov 15, 2008 8:53 AM, "Oscar Picasso" <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> Which tools would you recommend to work for a lift project, and more
>> generally with scala?
>> The requirement being that the project also uses maven.
>>
>> I have tried the Eclipse plugin a number of times and I found it too
>> unstable.
>>
>> The last Intellij IDEA plugin is decent, I was considering switching to
>> IDEA. Howver I ran lately in some issues. The more important being that if I
>> define implicits somewhere their containing folder keep loading... forever.
>>
>> I could use emacs but I would like some pretty formatting, code completion
>> and error checking.
>>
>> On a scala list post I read David P. explaining that there are a number of
>> decent tools to work with lift. Which ones?
>>
>> BTW: the lift wiki search does not work. It always returns a *No such
>> special page*.
>>
>> Oscar
>>
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Valid XHTML

2008-11-16 Thread Tim Perrett

Hi chas,

If you look back in the archives this has been discussed before - it's  
actually a bug in the w3c validator relating to namespaces; the xhtml  
lift produces is technicly valid :-)

Cheers, Tim

Sent from my iPhone

On 16 Nov 2008, at 05:24, "Charles F. Munat" <[EMAIL PROTECTED]> wrote:

>
> Is there an interest in Lift using valid XHTML, or do the Lift crew  
> only
> care if it's well-formed? I ask because the current version of Lift
> creates XHTML that is invalid on every page unless you adjust the
> default settings, and even then there seems to be a lot of
> framework-generated HTML that violates the XHTML DTD.
>
> I prefer valid XHTML, so I adjust settings and rewrite pieces of Lift
> that break the code, but it occurs to me that others might not even be
> aware that this is an issue and might like to know how to make the  
> HTML
> valid.
>
> So is this something others are interested in, or is it enough that  
> the
> current HTML output appears to work in most browsers?
>
> If the former, I'd be happy to contribute examples for how to fix the
> problems.
>
> (For the record, this is a serious question. Most of the programmers I
> know really couldn't care less if their HTML is "valid" as long as it
> works, so I don't want to assume anything. Even most programming books
> that show HTML show really bad, invalid, and obsolete HTML. HTML is
> evidently not considered a real language by most programmers.)
>
> Chas.
>
> Oh, and for those who are curious and haven't tried it, the W3C HTML
> Validator is here:
>
> http://validator.w3.org/
>
> There's a CSS validator, too:
>
> http://jigsaw.w3.org/css-validator/
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Valid XHTML

2008-11-16 Thread Marius

Would be nice if you can provide concrete example where Lift breaks
the XHTML DTD so we can fix them. Also some XHTML things are generated
automatically by Scala XML.

Br's,
Marius

On Nov 16, 7:24 am, "Charles F. Munat" <[EMAIL PROTECTED]> wrote:
> Is there an interest in Lift using valid XHTML, or do the Lift crew only
> care if it's well-formed? I ask because the current version of Lift
> creates XHTML that is invalid on every page unless you adjust the
> default settings, and even then there seems to be a lot of
> framework-generated HTML that violates the XHTML DTD.
>
> I prefer valid XHTML, so I adjust settings and rewrite pieces of Lift
> that break the code, but it occurs to me that others might not even be
> aware that this is an issue and might like to know how to make the HTML
> valid.
>
> So is this something others are interested in, or is it enough that the
> current HTML output appears to work in most browsers?
>
> If the former, I'd be happy to contribute examples for how to fix the
> problems.
>
> (For the record, this is a serious question. Most of the programmers I
> know really couldn't care less if their HTML is "valid" as long as it
> works, so I don't want to assume anything. Even most programming books
> that show HTML show really bad, invalid, and obsolete HTML. HTML is
> evidently not considered a real language by most programmers.)
>
> Chas.
>
> Oh, and for those who are curious and haven't tried it, the W3C HTML
> Validator is here:
>
> http://validator.w3.org/
>
> There's a CSS validator, too:
>
> http://jigsaw.w3.org/css-validator/
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift Record & Field

2008-11-16 Thread Marius



On Nov 16, 2:29 am, "Derek Chen-Becker" <[EMAIL PROTECTED]> wrote:
> That's funny, I just checked out the wip-record2-dpp branch this morning to
> start looking at it :) So far, I really like what I see. I would agree with
> Tim on calling it Persistable... vs DB... but otherwise it's looking very
> good. If I have some time this week I might start looking at how to meld
> this with JPA.
>
> One thing I've been thinking about is that I think there may be a little
> dissonance in lifecycle between what we do in JPA and what we'd do in JDBC.
> For instance, in JPA, entity state is managed by the provider; there's no
> need to explicitly save an object per se, because the provider will
> automatically detect changes to the managed instance and send those changes
> to the DB. That means that if you make a change and decide you don't want to
> save it then you need to explicitly *revert* the object or the changes will
> get pushed to the database at the end of the session. Off the top of my head
> I don't think this is going to be a huge issue but I'm going to have to go
> through it a few times from both angles (JPA style vs Mapper style) to make
> sure that I don't have any undefined or anti-defined behavior.

Good point, but to implement JPS you need to extend Record and not
DRecord. Record itself has no idea about save, delete etc. functions.
Wouldn't this suffice?

>
> Cheers,
>
> Derek
>
> On Sat, Nov 15, 2008 at 11:30 AM, Marius <[EMAIL PROTECTED]> wrote:
>
> > All,
>
> > I just committed in master the code for generic support for Record/
> > Field. David will start adding JDBC spices soon.
>
> > Perhaps there a a couple of more field "types" to add so please take a
> > look and let us know your thoughts.
>
> > Br's,
> > Marius
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Lift Record & Field

2008-11-16 Thread Marius


On Nov 16, 1:32 am, Tim Perrett <[EMAIL PROTECTED]> wrote:
> wow this is super sweet marius!
>
> A couple of questions:
>
> - net.liftweb.record.Test... shouldn't this be in the tests package?

I'll remove this. My bad.

> - DBRecord, whats the difference between this and ordinary record?

DBRecord is not yet implemented  David will add that support. DB
record/field stuff needs to be further implemented. Personally I don't
think Persistable is more explicit then DB because Persistence implies
virtually any backend (LDAP, JDO etc.) ... DB leans towards RDBMS but
perhaps JDBC instead of DB? ... FWIW I still prefer simply DB :)


> Looking at the code, it appears that DBRecord just adds some abstract
> stuff like stubbs for save methods etc: if this is the case, and it
> could indeed apply for non-database backed things, then shouldnt it be
> called "Persistab leRecord" or something more abstract?

DBRecord is specialized in JDBC persistence (to be implemented) ...
but Record itself is the generic one.

Based on people's opinions certain naming may change. I'm totally ok
with this ... we just need a consensus :)

> The actual
> persistence mechanism would then be provided by the relevant trait
> inclusion
>
> Cheers
>
> Tim
>
> On Nov 15, 6:30 pm, Marius <[EMAIL PROTECTED]> wrote:
>
> > All,
>
> > I just committed in master the code for generic support for Record/
> > Field. David will start adding JDBC spices soon.
>
> > Perhaps there a a couple of more field "types" to add so please take a
> > look and let us know your thoughts.
>
> > Br's,
> > Marius
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---