[Lift] Unable to use the YAHOO/Prototype libraries with Lift
Hi All, I was starting out with lift and am working with Dan on a project. The application I am working on has a prototype/Yahoo javascript requirement. Now Lift as I understand gives a content type of application/xhtml+xml. I am having problems with executing javascript (statements like element.innerHTML = 'dasdasdasd'). This is inside the prototype and Yahoo libraries and therefore cant be changed by me. The issues have been refernced here as well. http://www.webdeveloper.com/forum/showthread.php?t=178347 http://www.quirksmode.org/bugreports/archives/2004/11/innerhtml_in_xh.html http://www.schillmania.com/content/entries/2004/10/24/application-xhtml+xml/ https://developer.mozilla.org/En/Writing_JavaScript_for_XHTML The creating a text node and inserting wont work for me as the content inside (as inserted into the innerHTML) needs to be displayed as html and not only as text. Thanks and Regards. Dinesh --~--~-~--~~~---~--~~ 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: Unable to use the YAHOO/Prototype libraries with Lift
The problem came from the Yahoo inclusion. When I took the tree thing off (all the javascripts and initialization) the app started working. Thanks for all the support !!! Kudos ! On Dec 24, 1:46 pm, Marius marius.dan...@gmail.com wrote: Hi, Please seehttp://liftweb.net/index.php/HowTo_use_Lift_with_YUIfor using Lift with YUI. Mixing YUI and JQuery is not something I would recommend but if you know what you're doing go ahead. Do you have a concrete example of your code? P.S. - The default DOC type in lift is !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd - I find it weird that content type with you innerHTML not working. I'm using it for a while and have no problems. I bet many other people do. - You can change the content type to whatever you want but your templates on server side still must be XML well formed. In Boot call LiftRules.useXhtmlMimeType = false; .. hence Lift will use text/html. Br's, Marius On Dec 24, 10:17 am, dineshvasudevan dinesh.vasude...@gmail.com wrote: Hi All, I was starting out with lift and am working with Dan on a project. The application I am working on has a prototype/Yahoo javascript requirement. Now Lift as I understand gives a content type of application/xhtml+xml. I am having problems with executing javascript (statements like element.innerHTML = 'dasdasdasd'). This is inside the prototype and Yahoo libraries and therefore cant be changed by me. The issues have been refernced here as well.http://www.webdeveloper.com/forum/showthread.php?t=178347http://www.q... The creating a text node and inserting wont work for me as the content inside (as inserted into the innerHTML) needs to be displayed as html and not only as text. Thanks and Regards. Dinesh --~--~-~--~~~---~--~~ 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: Unable to use the YAHOO/Prototype libraries with Lift
Dinesh, .innerHTML works just fine in Lift apps. I use it all over the place. In fact, every Comet update is done with an .innerHTML. To make sure it works, I put this line in a template: span id=replace_me/span script // ![CDATA[ document.getElementById('replace_me').innerHTML = 'b.innerHTML works just fine, thank you./b'; // ]] /script In the past, I've tried to integrate Prototype into a jQuery-based app. It's a very, very tough thing to do. It took me a day to get the import order absolutely right. I would strongly recommend against it. At this point, jQuery plugins have the same range of functionality as do Prototype-based plugins. It may also be that Prototype is conflicting with YUI. You may want to look into using the jQuery Treeview: http://jquery.bassistance.de/treeview/demo/ To figure out why the error is happening (it's not happening because .innerHTML doesn't work... it does it fact work just fine), I'd suggest using Firebug to set a breakpoint just before the offending line in YUI. Inspect the value what is about to be put in the innerHTML. Is it valid XML? Is it valid XHTML? It may very well be that YUI is generating invalid XHTML. If you go with the approach of setting the mime type of the page to text/html, you'll ruin most of the layout and cause a fair number of other issues because quirks mode does not deal well with certain tags being well formed XML (e.g., the script/ tag has to be script/script). So, to summerize: - .innerHTML works just fine in strict XML mode - The problem with YUI tree is coming from something else and Firebug can help you debug it - Mixing Prototype and jQuery is a challenge and I'd strongly recommend against it - Moving to quirks mode by setting the mime type text/html with destroy the layout of the existing style and cause a lot of problems in Buy a Feature Thanks, David On Tue, Dec 23, 2008 at 10:26 PM, dineshvasudevan dinesh.vasude...@gmail.com wrote: Hi, I am pretty new to lift and am working with Dan getting some things done. The system is currently setup to insert the lift comet javascript (which is in jQuery) inside the layout file. I needed to use the prototype library along with this and so added the 'jQuery.noConflict()' code call so that the conflict is resolved. I am also using the Yahoo library to display a tree. The Doctype was Xhtml Strict as set by scala. It immediately gave me errors like 'uncaught exception: [Exception... Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML] nsresult: 0x80004003 (NS_ERROR_INVALID_POINTER) '. It was not allowing the script to execute statements like 'element.innerHTML =dasd'. This I read is an issue with the content-type of the rendered page which is 'application/xhtml+xml'.(references - http://www.quirksmode.org/bugreports/archives/2004/11/innerhtml_in_xh.html , http://www.456bereastreet.com/archive/200501/the_perils_of_using_xhtml_properly/ ). I also saw some work arounds (https://developer.mozilla.org/En/ Writing_JavaScript_for_XHTML) but they do not work as the changes would affect the library rendering. How could I solve this problem? Thanks and Regards, Dinesh -- 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 liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Problems with MappedStringIndex
Hi, I'm sorry that I have another problem report. Recently I wanted to have a Mapper with a String uuid as primary key. I found out that MappedStringIndex does that. It didn't work though. Using it with with a derby driver threw this exception: Caused by: java.sql.SQLException: 'ID' cannot be a column of a primary key or unique key because it can contain null values. The create table looked here like it generated the id itself, so the lift generated id isn't saved in the db. The H2 driver did this: CREATE TABLE myuuidmapper (id VARCHAR(64)) INSERT INTO myuuidmapper () VALUES () This means the generated id was not saved in the database. I attached an example project. Boot.scala is configured for H2 as default, the derby configuration is commented out. Regards, Joachim --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~--- liftbug-db.tar.gz Description: application/compressed-tar
[Lift] Re: Can or Box or something else
Can isn't bad. On the one hand, it's a container, on the other hand it's can I do something, and in fact both work, barring the name of Full and Empty. It still feels weird. In my opinion it's trying to concretize something abstract. Honestly, the best name for it might be something like 'Maybe', it's not all that concrete, even in language. Full, Empty, might be 'Yes', and 'No' respectively? On Dec 22, 1:38 pm, Alex Cruise acru...@gmail.com wrote: Josh Suereth wrote: In the spirit of LOLCode, I make the following proposal: Can becomes Bukkit Just think though, a bit of pimping and... object Can { ... def has[T](t: T) = Full(t) } val gotz = Can has cheezburger ... which constitutes my vote for keep Can -- it's a comedic noun and also a semantically relevant verb. :) -0xe1a --~--~-~--~~~---~--~~ 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] Why is hudson hanging?
David (or Josh), Hudson seems to be hanging here: [INFO] Lift PayPal ... SUCCESS [34.263s] [INFO] Lift TestKit .. SUCCESS [38.955s] [INFO] Lift Core (full lift) . SUCCESS [10.850s] [INFO] Lift Sites SUCCESS [12.291s] [INFO] Lift Example .. SUCCESS [1:40.914s] [INFO] Skittr Example SUCCESS [56.504s] [INFO] HelloLift example application . SUCCESS [44.841s] [INFO] HelloDarwin tutorial application .. SUCCESS [40.550s] [INFO] JPA Demo Master ... SUCCESS [11.855s] [INFO] JPADemo-spa ... SUCCESS [48.571s] [INFO] JPADemo-web ... SUCCESS [1:05.503s] [INFO] lift-archetype-blank .. SUCCESS [18.674s] [INFO] lift-archetype-basic .. SUCCESS [26.129s] [INFO] [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 22 minutes 48 seconds [INFO] Finished at: Wed Dec 24 10:25:35 UTC 2008 [INFO] Final Memory: 103M/323M [INFO] Sending e-mails to: feeder.of.the.bears In the build process. Any idea of why? Thanks, David -- 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 liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: error message tag
Ah, you spoiled youngsters! My first experience on anything resembling the net was dialing up to a local BBS on a 300 baud hotel terminal that used my TV for output. I think my family got our Atari 800 PC in '86! Derek On Tue, Dec 23, 2008 at 4:42 PM, Tim Perrett he...@timperrett.com wrote: Ha! Well I remember IE on mac, that truly was awful... I also remember dialing up to the internet from a 14.4k modem with windows 3.1, and browsing on some ancient version of netscape! As for my age, I was born in 86' :-D Cheers, Tim On 23 Dec 2008, at 20:41, Charles F. Munat wrote: You must be too young to remember Netscape 4. And IE on the Mac? --~--~-~--~~~---~--~~ 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 message tag
Ah, you spoiled youngsters! My first experience was on a $1600 electric calculator that could not only do + and -, but also * and /! Unheard of in 1975 when mechanical adding machines were the rule. You had to get special permission from the teacher to touch it. Chas. Derek Chen-Becker wrote: Ah, you spoiled youngsters! My first experience on anything resembling the net was dialing up to a local BBS on a 300 baud hotel terminal that used my TV for output. I think my family got our Atari 800 PC in '86! Derek On Tue, Dec 23, 2008 at 4:42 PM, Tim Perrett he...@timperrett.com mailto:he...@timperrett.com wrote: Ha! Well I remember IE on mac, that truly was awful... I also remember dialing up to the internet from a 14.4k modem with windows 3.1, and browsing on some ancient version of netscape! As for my age, I was born in 86' :-D Cheers, Tim On 23 Dec 2008, at 20:41, Charles F. Munat wrote: You must be too young to remember Netscape 4. And IE on the Mac? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---