Hi there,
i know this is not the right place, but i wanted your opinions first.
I'm trying to run XML.loadString onto this:
body
div id=wrapper
div id=header
lift:Content.headline /
lift:Content.subheadline /
The Problem seems to be the newlines. when i do .replace(\n, )
before XML.loadString() it works.. strange, any explaination?
On Aug 9, 6:34 pm, fbettag fr...@bett.ag wrote:
Hi there,
i know this is not the right place, but i wanted your opinions first.
I'm trying to run XML.loadString onto
/div
...
scala
On Sun, Aug 9, 2009 at 9:34 AM, fbettag fr...@bett.ag wrote:
Hi there,
i know this is not the right place, but i wanted your opinions first.
I'm trying to run XML.loadString onto this:
body
div id=wrapper
div id=header
remember that Lift snippets are recursive and lazily evaluated.
This means that the XML returned by a snippet is run through Lift's
transformation process so if your snippet returns lift:foo/, the foo
snippet will be invoked.
On Thu, Aug 6, 2009 at 2:31 PM, fbettag fr...@bett.ag wrote
hm, sorry, that one i can't figure out.
Is there anything unsafe about my way?
On Aug 7, 2:27 pm, fbettag fr...@bett.ag wrote:
Do you mean the Template example? (shortened)
LiftRules.snippetDispatch.append(NamedPF(Template) (Map(Template -
Template))
object Template extends
I still don't understand how and where it loads its template.. i'll
guess i'll stick with my comet-approach.
On Aug 7, 5:28 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
On Fri, Aug 7, 2009 at 5:27 AM, fbettag fr...@bett.ag wrote:
Do you mean the Template example? (shortened
Hi there,
i was just wondering how one would go about dynamifying templates?
Atm i store them on disk.
Is there any way to parse a template and execute all the lift:MyStuff
in that template?
Like Xml.load but the way lift does it to render stuff in it.
I tried to find it in code but didn't
PartialFunction[(List[String],String),Box[NodeSeq]]
One possible use would be for something like a CMS, with the template stored
in a database. Thoughts?
Derek
where List[String] is the template path and the second String is the ISO
Language code.
On Thu, Aug 6, 2009 at 2:12 PM, fbettag fr
marius, do you have any idea what i could pass lift:surround's with=
attribute?
On Aug 6, 11:31 pm, fbettag fr...@bett.ag wrote:
The CMS is my exactly my usecase. I'll try my luck with
processSurroundAndInclude.
On Aug 6, 11:07 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
It might
{XML.loadString(content.content)}/p
/lift:surround
)
XhtmlResponse(res.first, Empty, Nil, Nil, 200, true)
}
this works very nicely!
On Aug 7, 12:18 am, fbettag fr...@bett.ag wrote:
marius, do you
gnaa, i had a caching problem with this one.. the problem is the first
argument to processSurroundAndInclude.. still.. ;)
On Aug 7, 12:47 am, fbettag fr...@bett.ag wrote:
def render(inContentid: String): LiftResponse = {
val content = Content.find(By(Content.id
,
s)
case _ = atWhat.values.flatMap
(_.elements).toList
}
}
I will post my solution later.
On Aug 7, 12:49 am, fbettag fr...@bett.ag wrote:
gnaa, i had a caching problem with this one.. the problem is the first
argument to processSurroundAndInclude.. still.. ;)
On Aug 7, 12:47 am
:27 am, fbettag fr...@bett.ag wrote:
Ok the problem is in src/main/scala/net/liftweb/bultin/snippet/
Surround.scala line 36:
#36 ctx.findAndMerge(S.attr.~(with), paramsMap)
Here is the function which clearly needs a file to work with. u'll do
the bind by hand.
private[liftweb] def
Thank you very much. It works great now :)
On 30 Jul., 04:43, David Pollak feeder.of.the.be...@gmail.com wrote:
On Wed, Jul 29, 2009 at 5:54 PM, fbettag fr...@bett.ag wrote:
Now the last and final question: how would i go about and add this to
the trait:
object test extends
Yes thanks, it gives me an idea of the issue which i now see.
Could you provide a very simple example on how you would make the Meta-
Mixin?
That would be very good
best regards
On 29 Jul., 21:55, David Pollak feeder.of.the.be...@gmail.com wrote:
On Tue, Jul 28, 2009 at 5:12 PM, fbettag fr
Content extends Content with LongKeyedMetaMapper[Content] with
Stamped[Content] {
^
This is voodoo again :(
On 29 Jul., 22:55, David Pollak feeder.of.the.be...@gmail.com wrote:
trait Foo[A : Mapper[A]] {
self: MetaMapper[A] =
}
On Wed, Jul 29, 2009 at 1:38 PM, fbettag fr
: A with MetaMapper[A] with KeyedMapper[K, A] =
override def afterSave = doSomething _ :: super.afterSave
private def doSomething(in: A) {
println(Got +in)
}
}
On Wed, Jul 29, 2009 at 3:35 PM, fbettag fr...@bett.ag wrote:
Hm. i changed it to this:
trait Stamped[OwnerType : Mapper[OwnerType
[A : KeyedMapper[K, A], K] extends KeyedMetaMapper[K,A] {
self: A with MetaMapper[A] with KeyedMapper[K, A] =
override def afterSave = doSomething _ :: super.afterSave
private def doSomething(in: A) {
println(Got +in)
}
}
On Wed, Jul 29, 2009 at 3:35 PM, fbettag fr...@bett.ag
:
On Wed, Jul 29, 2009 at 4:21 PM, fbettag fr...@bett.ag wrote:
Btw. the docs for KeyedMapper don't work..
http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/Keyed...
when i click on KeyType or OwnerType it gives me a 404..
This is a limitation of vscaladoc... sorry.
On 30
(obj: A, action: String) {
val log = new ActionLog
log.action(action).klass(obj.getClass.toString).record(obj.id).save
println(Got: +obj)
}
}
this works!
On 30 Jul., 02:19, fbettag fr...@bett.ag wrote:
Okay i got this so far, only one tiny
}
}
On 30 Jul., 02:19, fbettag fr...@bett.ag wrote:
Okay i got this so far, only one tiny thing i can't get to work now:
trait Stamped[A : LongKeyedMapper[A]] extends KeyedMetaMapper[Long,
A] {
self: A with MetaMapper[A] with KeyedMapper[Long, A] =
private val
:46, fbettag fr...@bett.ag wrote:
And the final version:
trait Stamped[A : LongKeyedMapper[A] with IdPK] extends
KeyedMetaMapper[Long, A] {
self: A with MetaMapper[A] with KeyedMapper[Long, A] =
override def afterSave = (createLog(_: A, create)) ::
super.afterSave
List(OwnerType)..
how can i find out what the OwnerType class is?
And what is it supposed to return? Simply the unmodified record in my
case?
best regards
On 27 Jul., 05:07, fbettag fr...@bett.ag wrote:
Hey guys,
i#ve gotten this together, to get a log of who's editing what. The
trait will give
Hey guys,
i#ve gotten this together, to get a log of who's editing what. The
trait will give you the idea:
import java.util.Date
import model._
import net.liftweb.mapper._
trait Stamped[OwnerType : Stamped[OwnerType]] extends LongKeyedMapper
[OwnerType] with IdPK {
this: OwnerType =
I still don't understand how JsObj works.. I've tried almost every
combination, it's more like luck that some stuff i do works.
def listLanguages(): LiftResponse = {
def displayLanguage(l: Locale): (String, String) = {
var r = l.getDisplayLanguage
I just noticed i forgot a } after 'baz' ;)
Thanks for your replies
On Jul 14, 6:59 pm, Jeppe Nejsum Madsen je...@ingolfs.dk wrote:
fbettag fr...@bett.ag writes:
Heyho,
any ideas how i can parse data that was posted as JSON?
For example:
{foo: [{bar: 'shiz'}, {bar: 'baz']}
The above
)
}
But it doesn't go through the loop. I guess it has something to do
with the Full() around the Map.
I tried .elements on the returned Full() for an iterable, but it still
doesn't run through the loop.
Any ideas?
On Jul 15, 9:01 am, fbettag fr...@bett.ag wrote:
I just noticed i forgot
On Jul 15, 11:51 am, fbettag fr...@bett.ag wrote:
Args Sorry, the Full(Map(..)) gets returned by the JSON Parser.
for (res - JSONParser.parse(S.params(results).first); (key, value)
- res) {
Log.error(key + - + value)
}
Anyhow it still doesn't run through the loop
The Auto-Reload feature done with jQuery really starts to get on my
nerves, i often find my self going back to the tab in my firefox and
trying to debug the last error i got via ajax in my firebug.. but it's
all gone thanks to the auto-reload.
Is there any way to turn it off?
*Any Lift Project, not Problem. Sorry ;)
On 8 Jul., 10:47, fbettag fr...@bett.ag wrote:
The Problem isn't in Scala nor in Lift nor in jQuery. It's a Firefox
bug when it gets Content-Type application/xhtml+xml. Same for Safari.
Just try $(myobject).load(/some/url/from/lift/with/html/output
platforms. We need a work-around
On Wed, Jul 8, 2009 at 11:19 AM, fbettag fr...@bett.ag wrote:
*Any Lift Project, not Problem. Sorry ;)
On 8 Jul., 10:47, fbettag fr...@bett.ag wrote:
The Problem isn't in Scala nor in Lift nor in jQuery. It's a
Firefox
bug when
Heyho folks,
i've been running into troubles when trying to validate records.
In the liftbook it says the following:
import _root_.java.util.Date
def noFutureDates (time : Date) = {
if (time.getTime System.currentTimeMillis) {
List(FieldError(this, You cannot make
On Safari i get Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
This seems to be a safari 4 specific problem due to content-type text/
html+xml. See
http://groups.google.com/group/jquery-en/browse_thread/thread/de95e8adf9c0ffb7
On Jun 30, 7:39 am, fbettag fr...@bett.ag wrote:
Hey guys
...@gmail.com
wrote:
On Mon, Jun 29, 2009 at 9:05 PM, fbettag fr...@bett.ag wrote:
Hey guys,
i was wondering how one would go about rendering a View from a
Snippet. I guess i could Load the XML, but i am not sure if this is
the best way. Also if it is, what would be the best way to get
using $(..).load('url') on a lift'ed project?
On Jun 30, 11:48 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
What missing doctype?
2009/6/29 fbettag fr...@bett.ag
On Safari i get Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
This seems to be a safari 4 specific
Hey guys,
i was wondering how one would go about rendering a View from a
Snippet. I guess i could Load the XML, but i am not sure if this is
the best way. Also if it is, what would be the best way to get the
path to the view?
best regards
--~--~-~--~~~---~--~~
Argh, i forgot something ;)
The idea is to load several views and return them as one.
On Jun 30, 6:05 am, fbettag fr...@bett.ag wrote:
Hey guys,
i was wondering how one would go about rendering a View from a
Snippet. I guess i could Load the XML, but i am not sure if this is
the best way
Hey guys, i've been having troubles with jQuery and Firefox/Safari due
to the missing Doctype all night long:
Uncaught exception: [Exception... Component returned failure code:
0x80004003 (NS_ERROR_INVALID_POINTER)
[nsIDOMNSHTMLElement.innerHTML]“ nsresult: “0×80004003
Hey guys,
i've been playing around with REST all night, the list, add and delete
is working great so far.
The problem is, that upon update, it returns me an empty page and
doesn't run through the update functionality.
Any ideas what the problem in my update method might be?
This is what i got
?
Cheers, Tim
On Jun 26, 9:01 am, Caoyuan dcaoy...@gmail.com wrote:
On Fri, Jun 26, 2009 at 3:51 PM, Jeppe Nejsum Madsenje...@ingolfs.dk
wrote:
On 26 Jun 2009, fbettag wrote:
Hey guys,
i was wondering how (and where) i have to put jars in my liftweb
project to get them
(if no user exists, create a new one,
otherwise, update the existing one)
This is a fairly pure ROA, if you have url's like /user/add/timperrett
- that is less REST and more RPC action based servicing.
Thoughts?
Cheers, Tim
On Jun 27, 5:15 am, fbettag fr...@bett.ag wrote:
Hey guys
On Jun 27, 6:51 pm, fbettag fr...@bett.ag wrote:
This looks alot cleaner than my try. Anyhow, using the update/create
in one method is only useful if you give your db-objects something
like a unique key identifier in form of a string.
Since mine only consist of an id, name (with spaces
()
} catch {
case e = InternalServerErrorResponse()
}
}
case _ = NotFoundResponse()
}
Does that help?
Cheers, Tim
On Jun 27, 8:34 pm, fbettag fr...@bett.ag wrote:
Thank you! Most of the Stuff now seems to work! :)
The last two things regarding this topic
Hey guys,
i was wondering how (and where) i have to put jars in my liftweb
project to get them included. i know it's a beginners question, but
i've been playing around all night and i couldn't get it to work.
Thanks in advance
--~--~-~--~~~---~--~~
You received
Hey there,
anyone tried MetaMapper and JDBC-LDAP yet? (http://
myvd.sourceforge.net/bridge.html)
Best regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Lift group.
To post to this group, send email to
for record. That would be
awesome.
Cheers, Tim
On 26/05/2009 13:24, fbettag fr...@bett.ag wrote:
Hey there,
anyone tried MetaMapper and JDBC-LDAP yet? (http://
myvd.sourceforge.net/bridge.html)
Best regards
--~--~-~--~~~---~--~~
You received this message
46 matches
Mail list logo