[Lift] Re: clue for the clueless?
Everybody, Thanks for the replies. The browser source is the same as from the chat example, but i've included it below. The element in which the name space is not bound is the first element with the chat name space. Best wishes, --greg lift:surround with=default at=content div class=widget sidebar centerbGroup Chat/b/centerbr / lift:comet type=Chat name=Other chat:body Hello chat:name/ ul chat:id=na chat:list lilist:when/ list:who/: ilist:msg//i/li /chat:list /ul /chat:body chat:input chat:input/ input type=submit value=Post It / /chat:input /lift:comet /div p The total chat app, including the ask/answer component for soliciting a name comments, etc. is listed on this page. There is no special code to support AJAX/Comet (all the wrapping is done automatically by iLift/i). /p p When the Chat comet widget is added to the page, it needs to solict the user for a chat name. It asks the AskName comet widget for the name. Until the AskName comet widget provides a name, all rendering messages are forwarded to AskName. Here's the code for the AskName:/p style type=text/css /* ![CDATA[ */ .comment { /* font-lock-comment-face */ color: #b2; } .comment-delimiter { /* font-lock-comment-delimiter-face */ color: #b2; } .constant { /* font-lock-constant-face */ color: #5f9ea0; } .function-name { /* font-lock-function-name-face */ color: #ff; } .keyword { /* font-lock-keyword-face */ color: #a020f0; } .string { /* font-lock-string-face */ color: #bc8f8f; } .type { /* font-lock-type-face */ color: #228b22; } .variable-name { /* font-lock-variable-name-face */ color: #b8860b; } /* ]] */ /style pre span class=keywordclass/span span class=typeAskName/span span class=keywordextends/span span class=typeCometActor/span { span class=keyworddef/span span class=function-namerender/span = ajaxForm(lt;divgt;What is your username?lt;/divgt; ++ text(span class=string/span,name =gt; answer(name.trim)) ++ lt;input span class=keywordtype/span=span class=stringsubmit/span value=span class=stringEnter/span/gt;) } /pre p When the user submits the form, the question asked by the Chat comet widget is answered with the value the user submitted. This is similar to the ask/answer paradigm in Seaside, except that there's no need for continuations. /p pNow, onto the heart of the chat app:/p pre span class=keywordclass/span span class=typeChat/span span class=keywordextends/span span class=typeCometActor/span span class=keywordwith/span span class=typeCometListener/span { span class=keywordprivate/span span class=keywordvar/span span class=variable-nameuserName/span = span class=string/span span class=keywordprivate/span span class=keywordvar/span span class=variable-namechats/span: span class=typeList[ChatLine]/span = Nil span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoId/span = uniqueId + span class=string_info/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoIn/span = uniqueId + span class=string_in/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinputArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringinput/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namebodyArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringbody/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namesingleLine/span = deepFindKids(bodyArea, span class=stringchat/span, span class=stringlist/span) span class=comment-delimiter// /spanspan class=commenthandle an update to the chat lists /span span class=comment-delimiter// /spanspan class=commentby diffing the lists and then sending a partial update /span span class=comment-delimiter// /spanspan class=commentto the browser /span span class=keywordoverride/span span class=keyworddef/span span class=function-namelowPriority/span = { span class=keywordcase/span span class=typeChatServerUpdate/span(span class=variable-namevalue/span) =gt; span class=keywordval/span span class=variable-nameupdate/span = (value -- chats).reverse.map(b =gt; AppendHtml(infoId, line(b))) partialUpdate(update) chats = value } span class=comment-delimiter// /spanspan class=commentrender the input area by binding the /span span class=comment-delimiter// /spanspan class=commentappropriate
[Lift] Re: clue for the clueless?
On Thu, Aug 20, 2009 at 11:13 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Everybody, Thanks for the replies. The browser source is the same as from the chat example, but i've included it below. The element in which the name space is not bound is the first element with the chat name space. Greg, This means that none of the page was processed by Lift. What URL are you using to get to this page? Thanks, David Best wishes, --greg lift:surround with=default at=content div class=widget sidebar centerbGroup Chat/b/centerbr / lift:comet type=Chat name=Other chat:body Hello chat:name/ ul chat:id=na chat:list lilist:when/ list:who/: ilist:msg//i/li /chat:list /ul /chat:body chat:input chat:input/ input type=submit value=Post It / /chat:input /lift:comet /div p The total chat app, including the ask/answer component for soliciting a name comments, etc. is listed on this page. There is no special code to support AJAX/Comet (all the wrapping is done automatically by iLift/i). /p p When the Chat comet widget is added to the page, it needs to solict the user for a chat name. It asks the AskName comet widget for the name. Until the AskName comet widget provides a name, all rendering messages are forwarded to AskName. Here's the code for the AskName:/p style type=text/css /* ![CDATA[ */ .comment { /* font-lock-comment-face */ color: #b2; } .comment-delimiter { /* font-lock-comment-delimiter-face */ color: #b2; } .constant { /* font-lock-constant-face */ color: #5f9ea0; } .function-name { /* font-lock-function-name-face */ color: #ff; } .keyword { /* font-lock-keyword-face */ color: #a020f0; } .string { /* font-lock-string-face */ color: #bc8f8f; } .type { /* font-lock-type-face */ color: #228b22; } .variable-name { /* font-lock-variable-name-face */ color: #b8860b; } /* ]] */ /style pre span class=keywordclass/span span class=typeAskName/span span class=keywordextends/span span class=typeCometActor/span { span class=keyworddef/span span class=function-namerender/span = ajaxForm(lt;divgt;What is your username?lt;/divgt; ++ text(span class=string/span,name =gt; answer(name.trim)) ++ lt;input span class=keywordtype/span=span class=stringsubmit/span value=span class=stringEnter/span/gt;) } /pre p When the user submits the form, the question asked by the Chat comet widget is answered with the value the user submitted. This is similar to the ask/answer paradigm in Seaside, except that there's no need for continuations. /p pNow, onto the heart of the chat app:/p pre span class=keywordclass/span span class=typeChat/span span class=keywordextends/span span class=typeCometActor/span span class=keywordwith/span span class=typeCometListener/span { span class=keywordprivate/span span class=keywordvar/span span class=variable-nameuserName/span = span class=string/span span class=keywordprivate/span span class=keywordvar/span span class=variable-namechats/span: span class=typeList[ChatLine]/span = Nil span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoId/span = uniqueId + span class=string_info/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoIn/span = uniqueId + span class=string_in/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinputArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringinput/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namebodyArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringbody/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namesingleLine/span = deepFindKids(bodyArea, span class=stringchat/span, span class=stringlist/span) span class=comment-delimiter// /spanspan class=commenthandle an update to the chat lists /span span class=comment-delimiter// /spanspan class=commentby diffing the lists and then sending a partial update /span span class=comment-delimiter// /spanspan class=commentto the browser /span span class=keywordoverride/span span class=keyworddef/span span class=function-namelowPriority/span = { span class=keywordcase/span span class=typeChatServerUpdate/span(span class=variable-namevalue/span) =gt; span
[Lift] Re: clue for the clueless?
David, Thanks. i'll pop the recent changes up to github in a bit. i think it might be easier to look at this as a whole. Best wishes, --greg On Thu, Aug 20, 2009 at 11:19 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Aug 20, 2009 at 11:13 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Everybody, Thanks for the replies. The browser source is the same as from the chat example, but i've included it below. The element in which the name space is not bound is the first element with the chat name space. Greg, This means that none of the page was processed by Lift. What URL are you using to get to this page? Thanks, David Best wishes, --greg lift:surround with=default at=content div class=widget sidebar centerbGroup Chat/b/centerbr / lift:comet type=Chat name=Other chat:body Hello chat:name/ ul chat:id=na chat:list lilist:when/ list:who/: ilist:msg//i/li /chat:list /ul /chat:body chat:input chat:input/ input type=submit value=Post It / /chat:input /lift:comet /div p The total chat app, including the ask/answer component for soliciting a name comments, etc. is listed on this page. There is no special code to support AJAX/Comet (all the wrapping is done automatically by iLift/i). /p p When the Chat comet widget is added to the page, it needs to solict the user for a chat name. It asks the AskName comet widget for the name. Until the AskName comet widget provides a name, all rendering messages are forwarded to AskName. Here's the code for the AskName:/p style type=text/css /* ![CDATA[ */ .comment { /* font-lock-comment-face */ color: #b2; } .comment-delimiter { /* font-lock-comment-delimiter-face */ color: #b2; } .constant { /* font-lock-constant-face */ color: #5f9ea0; } .function-name { /* font-lock-function-name-face */ color: #ff; } .keyword { /* font-lock-keyword-face */ color: #a020f0; } .string { /* font-lock-string-face */ color: #bc8f8f; } .type { /* font-lock-type-face */ color: #228b22; } .variable-name { /* font-lock-variable-name-face */ color: #b8860b; } /* ]] */ /style pre span class=keywordclass/span span class=typeAskName/span span class=keywordextends/span span class=typeCometActor/span { span class=keyworddef/span span class=function-namerender/span = ajaxForm(lt;divgt;What is your username?lt;/divgt; ++ text(span class=string/span,name =gt; answer(name.trim)) ++ lt;input span class=keywordtype/span=span class=stringsubmit/span value=span class=stringEnter/span/gt;) } /pre p When the user submits the form, the question asked by the Chat comet widget is answered with the value the user submitted. This is similar to the ask/answer paradigm in Seaside, except that there's no need for continuations. /p pNow, onto the heart of the chat app:/p pre span class=keywordclass/span span class=typeChat/span span class=keywordextends/span span class=typeCometActor/span span class=keywordwith/span span class=typeCometListener/span { span class=keywordprivate/span span class=keywordvar/span span class=variable-nameuserName/span = span class=string/span span class=keywordprivate/span span class=keywordvar/span span class=variable-namechats/span: span class=typeList[ChatLine]/span = Nil span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoId/span = uniqueId + span class=string_info/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoIn/span = uniqueId + span class=string_in/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinputArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringinput/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namebodyArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringbody/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namesingleLine/span = deepFindKids(bodyArea, span class=stringchat/span, span class=stringlist/span) span class=comment-delimiter// /spanspan class=commenthandle an update to the chat lists /span span class=comment-delimiter// /spanspan class=commentby diffing the lists and then sending a partial update /span span class=comment-delimiter// /spanspan class=commentto the
[Lift] Re: clue for the clueless?
David, et al, i pushed my little experiments back up to githubhttp://github.com/leithaus/pixillion/tree/master. Any thoughts or suggestions would be greatly appreciated. Best wishes, --greg On Thu, Aug 20, 2009 at 11:23 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: David, Thanks. i'll pop the recent changes up to github in a bit. i think it might be easier to look at this as a whole. Best wishes, --greg On Thu, Aug 20, 2009 at 11:19 AM, David Pollak feeder.of.the.be...@gmail.com wrote: On Thu, Aug 20, 2009 at 11:13 AM, Meredith Gregory lgreg.mered...@gmail.com wrote: Everybody, Thanks for the replies. The browser source is the same as from the chat example, but i've included it below. The element in which the name space is not bound is the first element with the chat name space. Greg, This means that none of the page was processed by Lift. What URL are you using to get to this page? Thanks, David Best wishes, --greg lift:surround with=default at=content div class=widget sidebar centerbGroup Chat/b/centerbr / lift:comet type=Chat name=Other chat:body Hello chat:name/ ul chat:id=na chat:list lilist:when/ list:who/: ilist:msg//i/li /chat:list /ul /chat:body chat:input chat:input/ input type=submit value=Post It / /chat:input /lift:comet /div p The total chat app, including the ask/answer component for soliciting a name comments, etc. is listed on this page. There is no special code to support AJAX/Comet (all the wrapping is done automatically by iLift/i). /p p When the Chat comet widget is added to the page, it needs to solict the user for a chat name. It asks the AskName comet widget for the name. Until the AskName comet widget provides a name, all rendering messages are forwarded to AskName. Here's the code for the AskName:/p style type=text/css /* ![CDATA[ */ .comment { /* font-lock-comment-face */ color: #b2; } .comment-delimiter { /* font-lock-comment-delimiter-face */ color: #b2; } .constant { /* font-lock-constant-face */ color: #5f9ea0; } .function-name { /* font-lock-function-name-face */ color: #ff; } .keyword { /* font-lock-keyword-face */ color: #a020f0; } .string { /* font-lock-string-face */ color: #bc8f8f; } .type { /* font-lock-type-face */ color: #228b22; } .variable-name { /* font-lock-variable-name-face */ color: #b8860b; } /* ]] */ /style pre span class=keywordclass/span span class=typeAskName/span span class=keywordextends/span span class=typeCometActor/span { span class=keyworddef/span span class=function-namerender/span = ajaxForm(lt;divgt;What is your username?lt;/divgt; ++ text(span class=string/span,name =gt; answer(name.trim)) ++ lt;input span class=keywordtype/span=span class=stringsubmit/span value=span class=stringEnter/span/gt;) } /pre p When the user submits the form, the question asked by the Chat comet widget is answered with the value the user submitted. This is similar to the ask/answer paradigm in Seaside, except that there's no need for continuations. /p pNow, onto the heart of the chat app:/p pre span class=keywordclass/span span class=typeChat/span span class=keywordextends/span span class=typeCometActor/span span class=keywordwith/span span class=typeCometListener/span { span class=keywordprivate/span span class=keywordvar/span span class=variable-nameuserName/span = span class=string/span span class=keywordprivate/span span class=keywordvar/span span class=variable-namechats/span: span class=typeList[ChatLine]/span = Nil span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoId/span = uniqueId + span class=string_info/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinfoIn/span = uniqueId + span class=string_in/span span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-nameinputArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringinput/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namebodyArea/span = findKids(defaultXml, span class=stringchat/span, span class=stringbody/span) span class=keywordprivate/span span class=keywordlazy/span span class=keywordval/span span class=variable-namesingleLine/span = deepFindKids(bodyArea, span class=stringchat/span, span class=stringlist/span)
[Lift] Re: clue for the clueless?
What does your template look like? I don't think that the error you're getting has anything to do with SiteMap (problems there would result in a 403 or 404 HTTP error). Derek On Wed, Aug 19, 2009 at 5:47 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Lifted, i readily confess to being a total idiot. i'm always running into this problem of not knowing when the namespace binding is in effect. i've cribbed Chat.scala and other files from liftweb/site/example and added it whole sale to my project.When i add val entries = ( Menu(Loc(Home, List(index), Home)) ... :: Menu(Loc(Chat.1, List(chat), Chat, If(User.loggedIn_? _, x))) ... :: User.sitemap ) to my site menu and fire things up i get 'namespace chat undefined'. This is despite override def render = bind(chat, bodyArea, name - userName, AttrBindParam(id, Text(infoId), id), list - displayList _) being defined in the chat class. Any body have a clue for the clueless? Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ 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: clue for the clueless?
what URL are you using? Can you include the full browser source? On Wed, Aug 19, 2009 at 4:47 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Lifted, i readily confess to being a total idiot. i'm always running into this problem of not knowing when the namespace binding is in effect. i've cribbed Chat.scala and other files from liftweb/site/example and added it whole sale to my project.When i add val entries = ( Menu(Loc(Home, List(index), Home)) ... :: Menu(Loc(Chat.1, List(chat), Chat, If(User.loggedIn_? _, x))) ... :: User.sitemap ) to my site menu and fire things up i get 'namespace chat undefined'. This is despite override def render = bind(chat, bodyArea, name - userName, AttrBindParam(id, Text(infoId), id), list - displayList _) being defined in the chat class. Any body have a clue for the clueless? Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: clue for the clueless?
That's probably a Firefox XML error - look at view source and see what the Elem label is that's not being bound. - Meredith Gregorylgreg.mered...@gmail.com wrote: Lifted, i readily confess to being a total idiot. i'm always running into this problem of not knowing when the namespace binding is in effect. i've cribbed Chat.scala and other files from liftweb/site/example and added it whole sale to my project.When i add val entries = ( Menu(Loc(Home, List(index), Home)) ... :: Menu(Loc(Chat.1, List(chat), Chat, If(User.loggedIn_? _, x))) ... :: User.sitemap ) to my site menu and fire things up i get 'namespace chat undefined'. This is despite override def render = bind(chat, bodyArea, name - userName, AttrBindParam(id, Text(infoId), id), list - displayList _) being defined in the chat class. Any body have a clue for the clueless? Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 1219 NW 83rd St Seattle, WA 98117 +1 206.650.3740 http://biosimilarity.blogspot.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---