Derek Chen-Becker | 1 Feb 01:17 2011
Picon

Re: [Lift] Using the new WebSpec

Hmmm, I had actually tried that same approach earlier and it pulls classes under net.liftweb.mocks in lift-testkit into the JAR file:

   888 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/DoNothingFilterChain$$anonfun$doFilter$1.class
  6154 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/DoNothingFilterChain.class
  1708 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/MockFilterConfig.class
  1123 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/MockHttpServletRequest$$anonfun$1.class
 17177 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/MockHttpServletRequest$$anonfun$2.class
etc...

If having it in the net.liftweb.mocks package will make it difficult to use I could refactor it tonight to sit in net.liftweb.webmock/mockweb or something else.

Derek

On Mon, Jan 31, 2011 at 4:50 PM, David Pollak <feeder.of.the.bears-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:


On Mon, Jan 31, 2011 at 2:24 PM, Derek Chen-Becker <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Playing daddy daycare until this evening, but it's my #1 priority as soon as I can get to it.

Derek



On Jan 31, 2011 2:38 PM, David Pollak <feeder.of.the.bears-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Feel encouraged to skip review board and just get this into master asap.

On Jan 31, 2011 1:29 PM, "Derek Chen-Becker" <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hmm, just checking the JAR on scala-tools.org, it appears that neither
> MockWeb nor WebSpec are there, although they show up in my target/classes
> directory when I build webkit. It looks like I need to fix the configuration
> of the maven-bundle-plugin, but I'm not really familiar with that enough to
> tinker with it. Let me see if one of the Maven Wizards here can tune it so
> that it's actually included prior to 2.3-M1
>
> Derek
>
> On Mon, Jan 31, 2011 at 12:32 PM, Diego Medina <diego <at> fmpwizard.com> wrote:
>
>> Hi
>>
>> I'm trying to use the new WebSpec mocks do write some unit tests and I
>> get this error:
>>
>>
>> WebSpec is not a member of net.liftweb.mocks
>>
>> This is the relevant sections on my sbt projecgt file:
>>
>> ===================
>>
>> val liftVersion = "2.3-SNAPSHOT"
>> val scalaToolsSnapshots = "Scala-Tools Maven2 Snapshots Repository"
>> at "http://scala-tools.org/repo-snapshots"
>>
>>
>> override def libraryDependencies = Set(
>> "net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-testkit" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-widgets" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-ldap" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-json" % liftVersion % "compile->default",
>> "org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
>> "junit" % "junit" % "4.5" % "test->default",
>> "org.mockito" % "mockito-core" % "1.8.5" % "test->default",
>> "org.scala-tools.testing" %% "specs" % "1.6.6" % "test->default",
>> "mysql" % "mysql-connector-java" % "5.1.14" % "compile->default",
>> "ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default",
>> "commons-dbcp" % "commons-dbcp" % "1.4" % "compile->default"
>> ) ++ super.libraryDependencies
>>
>> ===============
>>
>> Inside sbt I run:
>>
>> clean
>> clean-lib
>> update
>> test
>>
>> and here I get the error.
>>
>> Thanks
>>
>> Diego
>>
>>
>>
>>
>> --
>> Diego Medina
>> Web Developer
>> http://www.fmpwizard.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<liftweb%2Bunsubscribe <at> googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to liftweb <at> googlegroups.com.
> To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>

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

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



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

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

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Derek Chen-Becker | 1 Feb 01:28 2011
Picon

Re: [Lift] Using the new WebSpec

OK, I'm going to move the MockWeb and WebSpec stuff to net.liftweb.mockweb tonight and update the Wiki. I'll update when it's all done. Sorry for the confusion/mess with the packaging.

Derek

On Mon, Jan 31, 2011 at 5:17 PM, Derek Chen-Becker <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hmmm, I had actually tried that same approach earlier and it pulls classes under net.liftweb.mocks in lift-testkit into the JAR file:

   888 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/DoNothingFilterChain$$anonfun$doFilter$1.class
  6154 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/DoNothingFilterChain.class
  1708 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/MockFilterConfig.class
  1123 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/MockHttpServletRequest$$anonfun$1.class
 17177 Mon Jan 31 15:55:16 MST 2011 net/liftweb/mocks/MockHttpServletRequest$$anonfun$2.class
etc...

If having it in the net.liftweb.mocks package will make it difficult to use I could refactor it tonight to sit in net.liftweb.webmock/mockweb or something else.

Derek


On Mon, Jan 31, 2011 at 4:50 PM, David Pollak <feeder.of.the.bears <at> gmail.com> wrote:


On Mon, Jan 31, 2011 at 2:24 PM, Derek Chen-Becker <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Playing daddy daycare until this evening, but it's my #1 priority as soon as I can get to it.

Derek



On Jan 31, 2011 2:38 PM, David Pollak <feeder.of.the.bears-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Feel encouraged to skip review board and just get this into master asap.

On Jan 31, 2011 1:29 PM, "Derek Chen-Becker" <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hmm, just checking the JAR on scala-tools.org, it appears that neither
> MockWeb nor WebSpec are there, although they show up in my target/classes
> directory when I build webkit. It looks like I need to fix the configuration
> of the maven-bundle-plugin, but I'm not really familiar with that enough to
> tinker with it. Let me see if one of the Maven Wizards here can tune it so
> that it's actually included prior to 2.3-M1
>
> Derek
>
> On Mon, Jan 31, 2011 at 12:32 PM, Diego Medina <diego <at> fmpwizard.com> wrote:
>
>> Hi
>>
>> I'm trying to use the new WebSpec mocks do write some unit tests and I
>> get this error:
>>
>>
>> WebSpec is not a member of net.liftweb.mocks
>>
>> This is the relevant sections on my sbt projecgt file:
>>
>> ===================
>>
>> val liftVersion = "2.3-SNAPSHOT"
>> val scalaToolsSnapshots = "Scala-Tools Maven2 Snapshots Repository"
>> at "http://scala-tools.org/repo-snapshots"
>>
>>
>> override def libraryDependencies = Set(
>> "net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-testkit" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-widgets" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-ldap" % liftVersion % "compile->default",
>> "net.liftweb" %% "lift-json" % liftVersion % "compile->default",
>> "org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
>> "junit" % "junit" % "4.5" % "test->default",
>> "org.mockito" % "mockito-core" % "1.8.5" % "test->default",
>> "org.scala-tools.testing" %% "specs" % "1.6.6" % "test->default",
>> "mysql" % "mysql-connector-java" % "5.1.14" % "compile->default",
>> "ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default",
>> "commons-dbcp" % "commons-dbcp" % "1.4" % "compile->default"
>> ) ++ super.libraryDependencies
>>
>> ===============
>>
>> Inside sbt I run:
>>
>> clean
>> clean-lib
>> update
>> test
>>
>> and here I get the error.
>>
>> Thanks
>>
>> Diego
>>
>>
>>
>>
>> --
>> Diego Medina
>> Web Developer
>> http://www.fmpwizard.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To unsubscribe from this group, send email to
>> liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<liftweb%2Bunsubscribe <at> googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to liftweb <at> googlegroups.com.
> To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>

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

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



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

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


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
David Pollak | 1 Feb 01:39 2011
Picon

Re: [Lift] Re: User questions



On Mon, Jan 31, 2011 at 2:14 PM, opyate <opyate-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Please post example code so we're all talking about the same thing. Posting
> example code | Lift Space |
> Assembla<https://www.assembla.com/wiki/show/liftweb/Posting_example_code>
>

Here you go, David:

git clone git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:opyate/example-lift-loginredirect.git
cd example-lift-loginredirect
git checkout 6d22
sbt update package jetty-run

Okay... even if we could get the interstitial login page to work, the form submission wouldn't work because the POST data is lost.  That's why you're getting the redirect to the login page and then the redirect to the home page with the "Already logged in" message.

I did identify the issue where the scope that the place to redirect is wrong and the redirect was going to the home page.  I've pushed a patch that also includes the ability to disable session destruction and also to capture session information before the session destruction.
 

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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Diego Medina | 1 Feb 01:52 2011

Re: [Lift] Using the new WebSpec

Thanks!

Diego Medina

On Jan 31, 2011 7:28 PM, "Derek Chen-Becker" <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> OK, I'm going to move the MockWeb and WebSpec stuff to net.liftweb.mockweb
> tonight and update the Wiki. I'll update when it's all done. Sorry for the
> confusion/mess with the packaging.
>
> Derek
>
> On Mon, Jan 31, 2011 at 5:17 PM, Derek Chen-Becker <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:
>
>> Hmmm, I had actually tried that same approach earlier and it pulls classes
>> under net.liftweb.mocks in lift-testkit into the JAR file:
>>
>> 888 Mon Jan 31 15:55:16 MST 2011
>> net/liftweb/mocks/DoNothingFilterChain$$anonfun$doFilter$1.class
>> 6154 Mon Jan 31 15:55:16 MST 2011
>> net/liftweb/mocks/DoNothingFilterChain.class
>> 1708 Mon Jan 31 15:55:16 MST 2011
>> net/liftweb/mocks/MockFilterConfig.class
>> 1123 Mon Jan 31 15:55:16 MST 2011
>> net/liftweb/mocks/MockHttpServletRequest$$anonfun$1.class
>> 17177 Mon Jan 31 15:55:16 MST 2011
>> net/liftweb/mocks/MockHttpServletRequest$$anonfun$2.class
>> etc...
>>
>> If having it in the net.liftweb.mocks package will make it difficult to use
>> I could refactor it tonight to sit in net.liftweb.webmock/mockweb or
>> something else.
>>
>> Derek
>>
>>
>> On Mon, Jan 31, 2011 at 4:50 PM, David Pollak <
>> feeder.of.the.bears-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>>
>>>
>>> On Mon, Jan 31, 2011 at 2:24 PM, Derek Chen-Becker <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>> > wrote:
>>>
>>>> Playing daddy daycare until this evening, but it's my #1 priority as soon
>>>> as I can get to it.
>>>>
>>>
>>> Fixed:
>>> https://github.com/lift/lift/commit/27c519538424ddf6576be59ffc040ed77d915f53
>>>
>>>
>>>>
>>>> Derek
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> On Jan 31, 2011 2:38 PM, David Pollak <feeder.of.the.bears-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> wrote:
>>>>
>>>> Feel encouraged to skip review board and just get this into master asap.
>>>> On Jan 31, 2011 1:29 PM, "Derek Chen-Becker" <dchenbecker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>> wrote:
>>>> > Hmm, just checking the JAR on scala-tools.org, it appears that neither
>>>> > MockWeb nor WebSpec are there, although they show up in my
>>>> target/classes
>>>> > directory when I build webkit. It looks like I need to fix the
>>>> configuration
>>>> > of the maven-bundle-plugin, but I'm not really familiar with that
>>>> enough to
>>>> > tinker with it. Let me see if one of the Maven Wizards here can tune it
>>>> so
>>>> > that it's actually included prior to 2.3-M1
>>>> >
>>>> > Derek
>>>> >
>>>> > On Mon, Jan 31, 2011 at 12:32 PM, Diego Medina <diego-1zcwdi0lS4z2eFz/2MeuCQ@public.gmane.org>
>>>> wrote:
>>>> >
>>>> >> Hi
>>>> >>
>>>> >> I'm trying to use the new WebSpec mocks do write some unit tests and I
>>>> >> get this error:
>>>> >>
>>>> >>
>>>> >> WebSpec is not a member of net.liftweb.mocks
>>>> >>
>>>> >> This is the relevant sections on my sbt projecgt file:
>>>> >>
>>>> >> ===================
>>>> >>
>>>> >> val liftVersion = "2.3-SNAPSHOT"
>>>> >> val scalaToolsSnapshots = "Scala-Tools Maven2 Snapshots Repository"
>>>> >> at "http://scala-tools.org/repo-snapshots"
>>>> >>
>>>> >>
>>>> >> override def libraryDependencies = Set(
>>>> >> "net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
>>>> >> "net.liftweb" %% "lift-testkit" % liftVersion % "compile->default",
>>>> >> "net.liftweb" %% "lift-widgets" % liftVersion % "compile->default",
>>>> >> "net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
>>>> >> "net.liftweb" %% "lift-ldap" % liftVersion % "compile->default",
>>>> >> "net.liftweb" %% "lift-json" % liftVersion % "compile->default",
>>>> >> "org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
>>>> >> "junit" % "junit" % "4.5" % "test->default",
>>>> >> "org.mockito" % "mockito-core" % "1.8.5" % "test->default",
>>>> >> "org.scala-tools.testing" %% "specs" % "1.6.6" % "test->default",
>>>> >> "mysql" % "mysql-connector-java" % "5.1.14" % "compile->default",
>>>> >> "ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default",
>>>> >> "commons-dbcp" % "commons-dbcp" % "1.4" % "compile->default"
>>>> >> ) ++ super.libraryDependencies
>>>> >>
>>>> >> ===============
>>>> >>
>>>> >> Inside sbt I run:
>>>> >>
>>>> >> clean
>>>> >> clean-lib
>>>> >> update
>>>> >> test
>>>> >>
>>>> >> and here I get the error.
>>>> >>
>>>> >> Thanks
>>>> >>
>>>> >> Diego
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Diego Medina
>>>> >> Web Developer
>>>> >> http://www.fmpwizard.com
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> Groups
>>>> >> "Lift" group.
>>>> >> To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>>>> >> To unsubscribe from this group, send email to
>>>> >> liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<liftweb%2Bunsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm>
>>>> <liftweb%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<liftweb%252Bunsubscribe <at> googlegroups.com>
>>>> >
>>>> >> .
>>>> >> For more options, visit this group at
>>>> >> http://groups.google.com/group/liftweb?hl=en.
>>>> >>
>>>> >>
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google
>>>> Groups "Lift" group.
>>>> > To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>>>> > To unsubscribe from this group, send email to
>>>> liftweb+unsubscribe <at> googlegroups.com<liftweb%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
>>>> .
>>>> > For more options, visit this group at
>>>> http://groups.google.com/group/liftweb?hl=en.
>>>> >
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "Lift" group.
>>>> To post to this group, send email to liftweb <at> googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<liftweb%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/liftweb?hl=en.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "Lift" group.
>>>> To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>>>> To unsubscribe from this group, send email to
>>>> liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<liftweb%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/liftweb?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> Lift, the simply functional web framework http://liftweb.net
>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>> Follow me: http://twitter.com/dpp
>>> Blog: http://goodstuff.im
>>> Surf the harmonics
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Lift" group.
>>> To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>>> To unsubscribe from this group, send email to
>>> liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<liftweb%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/liftweb?hl=en.
>>>
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To unsubscribe from this group, send email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
David Pollak | 1 Feb 02:00 2011
Picon

Re: [Lift] Ajax Listener For Google Maps

Lift renders all pages correctly.  That means if you have a Text Node, the Text will be HTML escaped.

If you want to properly include a Script tag on a page, us:

import net.liftweb.http._
import js.JsCmds._
import JE._

Script(JsRaw("""
your JavaScript Goes Here
"""))

That will emit a properly escaped <script> tag and script body.

On Mon, Jan 31, 2011 at 10:21 AM, hkropp <henning.kropp-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
Hi,
I am new to scala and lift. I am trying to add an ajax listener to a
google maps and cant get my head around it. I did the following

def ajaxFunc31() : JsCmd = JsRaw("alert('DID MAP')")

def script =
 <script type="text/javascript">
      var listener = google.maps.event.addListener(map,
'zoom_changed', {SHtml.ajaxInvoke(ajaxFunc31 _)._2} );
      listener;
      // I am unsure if the script part gets executed, therefor I do
it this way. Can I leave the var listener part?
 </script>

 bind("ajax", xhtml,  // --> xhtml I dont like but html not working.
This might cause the problem?
...
        "mapListener" -> script,
...)

And view:

<ajax:mapListner></ajax:mapListener>


I believe this should work. But my problem ist that the following get
rendert:

... liftAjax.lift_ajaxHandler( & q u o t ;F1229901265088LQ2=true & q u
o t ;, ....

If the & q u o t ; would get rendered as ', it should be fine, I
suppose?

AND yes, I already set LiftRules.useXhtmlMimeType = false and set in
the snippet S.setHeader("Content-Type", "text/html; charset=utf-8")

I also noted, that when I change ist to

SHtml.ajaxCall(Str("Button-2"), ajaxFunc2 _)._2}

it get rendered  liftAjax.lift_ajaxHandler( ' F1229901265088LQ2 ' +
something= & q u o t ;  Button-2 & q u o t ;....

And wont work either.

Do you know what I am doing wrong? And maybe you know of a better way
to add a Ajax Listener to a google maps?

Thank you and kind regards

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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
David Pollak | 1 Feb 02:01 2011
Picon

Re: [Lift] ajaxSelect and select hybrid



2011/1/31 Ján Raska <raskaj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Thanks, that's a nice feature. Is it possible to get 2.3-SNAPSHOT ScalaDoc?

No, but 2.3-M1 should be out on Wednesday morning and we should have ScalaDoc with that.
 

On Jan 31, 2011, at 14:05 , David Pollak wrote:



On Mon, Jan 31, 2011 at 4:47 AM, Ján Raska <raskaj-Re5JQEeQqe8@public.gmane.orgm> wrote:
Hi folks,
I'm looking for some kind of hybrid of ajaxSelect and select. I have a select box, that I'd like to do some ajax stuff after user selects value (e.g. prefill some other form controls), but I'd like it submitted as well. With ajaxSelect, I can do ajax stuff, with select I can get it submitted, but I can't do both, like I can with textAjaxTest. I know, I can call ajax method manually using JS, but it'd be cool if Lift can provide that too

If there isn't such option yet, I'd suggest it as a feature for most SHtml form controls (I can see similar usage for radios, checkboxes etc...)

No longer a need for the cross-product of generating the form elements for you.

SHtml.onEvents("onchange", "onblur")(s => println("Woo hoo,,, got "+s_)(SHtml.select(...))

The SHtml.onEvents takes of a list of HTML events to bind to and a function to execute when any of those events takes place and return a NodeSeq => NodeSeq that can be applied to any input Element.
 

Rusho



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
David Pollak | 1 Feb 02:02 2011
Picon

Re: [Lift] Re: Comet + progresslistener per tab

Maarten,

I've got the Ajax upload on my plate for 2.3-RC1.  I'll add a mechanism to add server-side actions to the upload stream and some example code demonstrating server-push of an update bar so we can get this issue nailed down once and for all.

Thanks,

David

On Mon, Jan 31, 2011 at 2:07 PM, Maarten Koopmans <maarten.koopmans-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Tim,

The post is to a hidden iframe, so the actual form is plain html -
with a comet component.The problem is that I can't tie a
progressListener to a particular upload, so uploading multiple files
concurrently results in multiple states and the sessionvars get mixed
up. This happens with tabs mostly - they are concurrent pages. But the
progress listeners seem to miss any form of uuid in their callback, or
something you can inject and query.

It's an IE thing onlly, I sure hope they sneaked in some File API
support in the coming RC.

--Maarten



On Monday, January 31, 2011, Timothy Perrett <timothy-0nUveC4DNz0XzJSMcliFkw@public.gmane.org> wrote:
> Can the comet actor not render the form in the first instance? I'm not following your code (not had time to look) but it seems your issues arise from having snippet / comet interaction?
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To unsubscribe from this group, send email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>

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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Derek Chen-Becker | 1 Feb 03:47 2011
Picon

Re: [Lift] Adding Suffix and XML Schema for Lift ResourceBundle

I don't have an opinion on the extension, but I do think it would be nice to have a proper schema. Even outside an IDE, you could use the schema to validate your files.

Derek

On Mon, Jan 31, 2011 at 8:49 AM, Timothy Perrett <timothy-0nUveC4DNz0XzJSMcliFkw@public.gmane.org> wrote:
All,

I've been doing some work with the upgraded XML resource bundles and whilst functionality its all working splendidly, I cant help but think the semantic of putting resources in a .html file is a little wrong? What would people say to adding another suffix to TemplateFinder especially for these xml resources? Perhaps .lres or something (whatever people think would be good). It would be nice to just explicitly qualify these files as different, non-presentation files. A while back we removed .xml from being a valid template suffix so the only options today for resources are .html, .htm and .xhtml - none of which feel quite right.

In addition, it would be good if this XML micro-format has a proper schema hosted on liftweb.net. I've taken the liberty of creating the appropriate XSD:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <xs:element name="resources" type="resourcesType"/>
 <xs:complexType name="resourcesType">
   <xs:sequence>
     <xs:element type="resType" name="res" maxOccurs="unbounded" minOccurs="0"/>
   </xs:sequence>
 </xs:complexType>
 <xs:complexType name="resType">
   <xs:simpleContent>
     <xs:extension base="xs:string">
       <xs:attribute type="xs:string" name="name" use="required" />
       <xs:attribute type="xs:string" name="lang" use="required"/>
       <xs:attribute type="xs:string" name="country" use="optional"/>
       <xs:attribute type="xs:string" name="default" use="optional"/>
     </xs:extension>
   </xs:simpleContent>
 </xs:complexType>
</xs:schema>

This would then make the resource file (optionally) look like the following if you wanted to implement the schema:

<?xml version="1.0"?>
<resources
 xmlns="http://liftweb.net/xmlres/1.0.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://liftweb.net/xmlres/1.0.0 http://liftweb.net/lift_resources-1.0.0.xsd">
 <res name="greeting" lang="en" country="GB" default="true">Welcome!</res>
 <res name="greeting" lang="en" country="US">Howdy!</res>
 <res name="greeting" lang="fr" country="FR">Bienvenue!</res>
 <res name="greeting" lang="de" country="DE">Willkommen!</res>
 <res name="greeting" lang="it" country="IT">Benvenuti!</res>
</resources>

What do people think? Whilst im not an IDE user, it would be cool to have autocompletion of elements etc :-)

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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To unsubscribe from this group, send email to liftweb+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
David Pollak | 1 Feb 03:52 2011
Picon

Re: [Lift] Problems with JsCmds.RedirectTo + StreamingResponse on chrome



On Mon, Jan 31, 2011 at 6:22 AM, Bruna Colnago <brunacolnago-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I'm trying to download a txt file with an ajaxBoutton using
JsCmds.RedirectTo.

bind("form","download" -> bDownload)

def bDownload:NodeSeq = ajaxButton("Download",downloadForm _)

private def downloadForm : JsCmd = {
 JsCmds.RedirectTo("/result)
}

At my boot.scala I've add:

class Boot {
 def boot {
   LiftRules.dispatch.prepend {
     case Req("result" :: _, _ , _) => () => {
       val str="Hello world\n"
       val headers:List[(String, String)] =
           List(("ContentType","application/vnd.text"),
           ("Content-Length",str.length.toString),
           ("Content-Disposition","attachment;filename=\"hello.txt
\""))
       val data = str.getBytes("UTF-8")
       Full(StreamingResponse(new java.io.ByteArrayInputStream(data),
() => {},data.length, headers, Nil, 200))
     }
   }

 It works fine on Firefox, but the file won't download on chrome.
Could anyone help'me finding where is the problem?

Please put together an example that demonstrates the issue Posting example code | Lift Space | Assembla
 

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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to liftweb+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
inigmas | 1 Feb 04:27 2011
Picon

[Lift] Designer Friendly Templates

Hi all,

Recently, I've been trying out the new Designer Friendly Templates
feature along with HTML5 support.  So, starting with the
blank_2.8.1:2.2 archetype; I changed the default.html template to look
like this:

...
  <body>
    <div class="lift:bind?name=content">
      Your content here.
    </div>
    <div class="lift:menu.builder">
      Menu Here
    </div>
    <div class="lift:msgs">
      Messages Here.
    </div>
  </body>
...

The last two items work, but I can't seem to create a bind point no
matter how I try to "word" the div's class.  I keep getting Class Not
Found.  I'm also having difficulty finding any examples that do this.
The closest seems to be "<body class="lift:content_id=real_content">"
from http://www.assembla.com/wiki/show/liftweb/Designer_Friendly_Templates.

But when I put that in a div, I still get the Class Not Found error.

Any help appreciated,
Thanks.

--

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


Gmane