[Lift] Re: error while SHtml.ajaxInvoke call
hi, its former method i am using in my app(u mentioned it in last reply). i have one text box and submit button. when i click on submit button - i have to show employee info on my GUI page. (in text box i will enter emp Id)) This info have to table one table have information with ajax and other have info with normal call. how can i populate these two table when i click on submit button... hope this will help u to understand my problem. Thanks... waiting for u reply On Aug 21, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: I still don't understand. Does the user do anything to get the faster table updated or do you want the faster table pushed from the server when something changes on the server? If it's the former (the user does something to get the faster table updated), you want to use ajaxButton... the user clicks on the button and the server-responds with JavaScript that updates the browser. If it's the latter (the user does nothing, but the server pushes changes to the client), see CometActor. You can see an example in the Clock.scala code in the Lift sites/example project. On Fri, Aug 21, 2009 at 1:25 AM, pravin pravinka...@gmail.com wrote: Hi, Thanks for u r quick reply. Now I am explain my problem in details : I have normal form with one text box and one submit button. Also i have 2 table components(these are dynamic tables )..but these table are out of the from tag.These table only displays information. Flow of the application: When i click on submit button. i am population two Lists . One list get populated from DB.( Slower) second list get populated from hard code values (faster) Now i am populate above 2 tables with these two lists when i click on submit button. With the above flow i am able to populate above tables(synchronously). But now i want to configure Ajax into this so i can get faster results...(as one List get faster) while other list can get populated asynchronously. So when i click on Submit button i will populate one list ..but how can i populate other list with Ajax... i tried for following: i was planning when other table getting render make ajax call with ajaxInvokebut i wont work... Please help ... Thanks in advance -Pravin On Aug 20, 6:56 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Aug 19, 2009 at 10:50 PM, pravin pravinka...@gmail.com wrote: yes i have submit button. on click event of this i am doing other tasks. What is the user interface (HTML) element that causes the Ajax update to happen? What does the user do in order to get the Ajax thing to happen? ajaxInvoke is a very low level call. If you want to have an Ajax button, use SHtml.ajaxButton. If you want to have an Ajax form, use SHtml.ajaxForm. If you can describe what the user interaction should be, I'll write up some example code for you. above data population for text is not on click submit button. On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for given html code : def showFeeds(xhtml:NodeSeq):NodeSeq ={ println(Inside showFeeds); bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke (updateStartDate)._2) } def updateStartDate () : JsCmd= { JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz))) } def displayResult(rList:List[Object]):NodeSeq={ trtd table trtdrList(0).toString()}/ td /tr trtd{rList(1).toString()}/a / td /tr /table /td/tr } But its not working- Giving out put on html page like- lift_ajaxHandler('F966737512075R2E' + '=true', null, null) What is this How can i use Ajax in my application.I want to give asynchronous call (Ajax) for my above html component so it can get show list that i get from Db call . This all happening on submit button click Appreciate any pointer regarding this -Pravin -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp
[Lift] Re: error while SHtml.ajaxInvoke call
I've provided sample code on a separate thread. On Sun, Aug 23, 2009 at 10:29 PM, pravin pravinka...@gmail.com wrote: hi, its former method i am using in my app(u mentioned it in last reply). i have one text box and submit button. when i click on submit button - i have to show employee info on my GUI page. (in text box i will enter emp Id)) This info have to table one table have information with ajax and other have info with normal call. how can i populate these two table when i click on submit button... hope this will help u to understand my problem. Thanks... waiting for u reply On Aug 21, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: I still don't understand. Does the user do anything to get the faster table updated or do you want the faster table pushed from the server when something changes on the server? If it's the former (the user does something to get the faster table updated), you want to use ajaxButton... the user clicks on the button and the server-responds with JavaScript that updates the browser. If it's the latter (the user does nothing, but the server pushes changes to the client), see CometActor. You can see an example in the Clock.scala code in the Lift sites/example project. On Fri, Aug 21, 2009 at 1:25 AM, pravin pravinka...@gmail.com wrote: Hi, Thanks for u r quick reply. Now I am explain my problem in details : I have normal form with one text box and one submit button. Also i have 2 table components(these are dynamic tables )..but these table are out of the from tag.These table only displays information. Flow of the application: When i click on submit button. i am population two Lists . One list get populated from DB.( Slower) second list get populated from hard code values (faster) Now i am populate above 2 tables with these two lists when i click on submit button. With the above flow i am able to populate above tables(synchronously). But now i want to configure Ajax into this so i can get faster results...(as one List get faster) while other list can get populated asynchronously. So when i click on Submit button i will populate one list ..but how can i populate other list with Ajax... i tried for following: i was planning when other table getting render make ajax call with ajaxInvokebut i wont work... Please help ... Thanks in advance -Pravin On Aug 20, 6:56 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Aug 19, 2009 at 10:50 PM, pravin pravinka...@gmail.com wrote: yes i have submit button. on click event of this i am doing other tasks. What is the user interface (HTML) element that causes the Ajax update to happen? What does the user do in order to get the Ajax thing to happen? ajaxInvoke is a very low level call. If you want to have an Ajax button, use SHtml.ajaxButton. If you want to have an Ajax form, use SHtml.ajaxForm. If you can describe what the user interaction should be, I'll write up some example code for you. above data population for text is not on click submit button. On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for given html code : def showFeeds(xhtml:NodeSeq):NodeSeq ={ println(Inside showFeeds); bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke (updateStartDate)._2) } def updateStartDate () : JsCmd= { JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz))) } def displayResult(rList:List[Object]):NodeSeq={ trtd table trtdrList(0).toString()}/ td /tr trtd{rList(1).toString()}/a / td /tr /table /td/tr } But its not working- Giving out put on html page like- lift_ajaxHandler('F966737512075R2E' + '=true', null, null) What is this How can i use Ajax in my application.I want to give asynchronous call (Ajax) for my above html component so it can get show list that i get from Db call .
[Lift] Re: error while SHtml.ajaxInvoke call
Hi, Thanks for u r quick reply. Now I am explain my problem in details : I have normal form with one text box and one submit button. Also i have 2 table components(these are dynamic tables )..but these table are out of the from tag.These table only displays information. Flow of the application: When i click on submit button. i am population two Lists . One list get populated from DB.( Slower) second list get populated from hard code values (faster) Now i am populate above 2 tables with these two lists when i click on submit button. With the above flow i am able to populate above tables(synchronously). But now i want to configure Ajax into this so i can get faster results...(as one List get faster) while other list can get populated asynchronously. So when i click on Submit button i will populate one list ..but how can i populate other list with Ajax... i tried for following: i was planning when other table getting render make ajax call with ajaxInvokebut i wont work... Please help ... Thanks in advance -Pravin On Aug 20, 6:56 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Aug 19, 2009 at 10:50 PM, pravin pravinka...@gmail.com wrote: yes i have submit button. on click event of this i am doing other tasks. What is the user interface (HTML) element that causes the Ajax update to happen? What does the user do in order to get the Ajax thing to happen? ajaxInvoke is a very low level call. If you want to have an Ajax button, use SHtml.ajaxButton. If you want to have an Ajax form, use SHtml.ajaxForm. If you can describe what the user interaction should be, I'll write up some example code for you. above data population for text is not on click submit button. On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for given html code : def showFeeds(xhtml:NodeSeq):NodeSeq ={ println(Inside showFeeds); bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke (updateStartDate)._2) } def updateStartDate () : JsCmd= { JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz))) } def displayResult(rList:List[Object]):NodeSeq={ trtd table trtdrList(0).toString()}/ td /tr trtd{rList(1).toString()}/a / td /tr /table /td/tr } But its not working- Giving out put on html page like- lift_ajaxHandler('F966737512075R2E' + '=true', null, null) What is this How can i use Ajax in my application.I want to give asynchronous call (Ajax) for my above html component so it can get show list that i get from Db call . This all happening on submit button click Appreciate any pointer regarding this -Pravin -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://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: error while SHtml.ajaxInvoke call
I still don't understand. Does the user do anything to get the faster table updated or do you want the faster table pushed from the server when something changes on the server? If it's the former (the user does something to get the faster table updated), you want to use ajaxButton... the user clicks on the button and the server-responds with JavaScript that updates the browser. If it's the latter (the user does nothing, but the server pushes changes to the client), see CometActor. You can see an example in the Clock.scala code in the Lift sites/example project. On Fri, Aug 21, 2009 at 1:25 AM, pravin pravinka...@gmail.com wrote: Hi, Thanks for u r quick reply. Now I am explain my problem in details : I have normal form with one text box and one submit button. Also i have 2 table components(these are dynamic tables )..but these table are out of the from tag.These table only displays information. Flow of the application: When i click on submit button. i am population two Lists . One list get populated from DB.( Slower) second list get populated from hard code values (faster) Now i am populate above 2 tables with these two lists when i click on submit button. With the above flow i am able to populate above tables(synchronously). But now i want to configure Ajax into this so i can get faster results...(as one List get faster) while other list can get populated asynchronously. So when i click on Submit button i will populate one list ..but how can i populate other list with Ajax... i tried for following: i was planning when other table getting render make ajax call with ajaxInvokebut i wont work... Please help ... Thanks in advance -Pravin On Aug 20, 6:56 pm, David Pollak feeder.of.the.be...@gmail.com wrote: On Wed, Aug 19, 2009 at 10:50 PM, pravin pravinka...@gmail.com wrote: yes i have submit button. on click event of this i am doing other tasks. What is the user interface (HTML) element that causes the Ajax update to happen? What does the user do in order to get the Ajax thing to happen? ajaxInvoke is a very low level call. If you want to have an Ajax button, use SHtml.ajaxButton. If you want to have an Ajax form, use SHtml.ajaxForm. If you can describe what the user interaction should be, I'll write up some example code for you. above data population for text is not on click submit button. On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for given html code : def showFeeds(xhtml:NodeSeq):NodeSeq ={ println(Inside showFeeds); bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke (updateStartDate)._2) } def updateStartDate () : JsCmd= { JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz))) } def displayResult(rList:List[Object]):NodeSeq={ trtd table trtdrList(0).toString()}/ td /tr trtd{rList(1).toString()}/a / td /tr /table /td/tr } But its not working- Giving out put on html page like- lift_ajaxHandler('F966737512075R2E' + '=true', null, null) What is this How can i use Ajax in my application.I want to give asynchronous call (Ajax) for my above html component so it can get show list that i get from Db call . This all happening on submit button click Appreciate any pointer regarding this -Pravin -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- 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
[Lift] Re: error while SHtml.ajaxInvoke call
On Wed, Aug 19, 2009 at 10:50 PM, pravin pravinka...@gmail.com wrote: yes i have submit button. on click event of this i am doing other tasks. What is the user interface (HTML) element that causes the Ajax update to happen? What does the user do in order to get the Ajax thing to happen? ajaxInvoke is a very low level call. If you want to have an Ajax button, use SHtml.ajaxButton. If you want to have an Ajax form, use SHtml.ajaxForm. If you can describe what the user interaction should be, I'll write up some example code for you. above data population for text is not on click submit button. On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for given html code : def showFeeds(xhtml:NodeSeq):NodeSeq ={ println(Inside showFeeds); bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke (updateStartDate)._2) } def updateStartDate () : JsCmd= { JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz))) } def displayResult(rList:List[Object]):NodeSeq={ trtd table trtdrList(0).toString()}/ td /tr trtd{rList(1).toString()}/a / td /tr /table /td/tr } But its not working- Giving out put on html page like- lift_ajaxHandler('F966737512075R2E' + '=true', null, null) What is this How can i use Ajax in my application.I want to give asynchronous call (Ajax) for my above html component so it can get show list that i get from Db call . This all happening on submit button click Appreciate any pointer regarding this -Pravin -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Git some:http://github.com/dpp -- 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: error while SHtml.ajaxInvoke call
Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for given html code : def showFeeds(xhtml:NodeSeq):NodeSeq ={ println(Inside showFeeds); bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke (updateStartDate)._2) } def updateStartDate () : JsCmd= { JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz))) } def displayResult(rList:List[Object]):NodeSeq={ trtd table trtdrList(0).toString()}/ td /tr trtd{rList(1).toString()}/a / td /tr /table /td/tr } But its not working- Giving out put on html page like- lift_ajaxHandler('F966737512075R2E' + '=true', null, null) What is this How can i use Ajax in my application.I want to give asynchronous call (Ajax) for my above html component so it can get show list that i get from Db call . This all happening on submit button click Appreciate any pointer regarding this -Pravin -- 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: error while SHtml.ajaxInvoke call
yes i have submit button. on click event of this i am doing other tasks. above data population for text is not on click submit button. On Aug 20, 2:56 am, David Pollak feeder.of.the.be...@gmail.com wrote: Are you trying to create a link/button that someone clicks on to cause the Ajax call to be made? On Wed, Aug 19, 2009 at 8:43 AM, pravin pravinka...@gmail.com wrote: Hi , i am trying to configure Ajax in my application using lift. I have : lift:DisplayResults.showFeeds table border=0 width=100% class = resultheader cellpadding=10 t:feedsResultRows/ /table /lift:DisplayResults.showFeeds snippet for given html code : def showFeeds(xhtml:NodeSeq):NodeSeq ={ println(Inside showFeeds); bind(t, xhtml,feedsResultRows - SHtml.ajaxInvoke (updateStartDate)._2) } def updateStartDate () : JsCmd= { JsCmds.SetHtml(resultsRow, displayResult(List(abc,xyz))) } def displayResult(rList:List[Object]):NodeSeq={ trtd table trtdrList(0).toString()}/ td /tr trtd{rList(1).toString()}/a / td /tr /table /td/tr } But its not working- Giving out put on html page like- lift_ajaxHandler('F966737512075R2E' + '=true', null, null) What is this How can i use Ajax in my application.I want to give asynchronous call (Ajax) for my above html component so it can get show list that i get from Db call . This all happening on submit button click Appreciate any pointer regarding this -Pravin -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://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 -~--~~~~--~~--~--~---