Re: [Lift] Re: Binding a snippet in a comet actor?
The problem was using Google Chrome to see this page. On firefox it shows up normally. Alex Boisvert wrote: Yes. The issue is here: http://github.com/dpp/liftweb/issues/closed/#issue/93 It was fixed in 1.1M7 and later. alex On Tue, Jan 12, 2010 at 1:47 PM, Felipe Rodrigues felipero.maill...@gmail.com wrote: I have a similar problem here. I didn't find this issue on github. Is this issue solved? Thanks, Felipe On Oct 9 2009, 5:17 pm, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect. I've opened a ticket:http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example athttp://174.129.214.150:8080/ The code is athttp://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Openhttp://174.129.214.150:8080/in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Openhttp://174.129.214.150:8080/testdriverin another browser window. Juxtapose these two windows. 3. Click on the "Click here" button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info("GOT A SUBMIT IN INVITE") net.liftweb.http.js.JsCmds.Run("alert('Hey')") } ajaxForm( bind("elem", xhtml, "submit" - submit("Click", () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type="RCActor" Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form="post" elem:submit / /lift:Discuss.invite The Discuss snippet's "invite" method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info("GOT A SUBMIT IN INVITE") } bind("elem", xhtml, "submit" - submit("Click", () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the "submit" button are rendered properly. However, when I click on the submit button, the "handleSubmit" method is not called. Instead, the browser displays a page with the text "window.location=/". If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach "legal"? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the
[Lift] Re: Binding a snippet in a comet actor?
I have a similar problem here. I didn't find this issue on github. Is this issue solved? Thanks, Felipe On Oct 9 2009, 5:17 pm, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect. I've opened a ticket:http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example athttp://174.129.214.150:8080/ The code is athttp://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Openhttp://174.129.214.150:8080/in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Openhttp://174.129.214.150:8080/testdriverin another browser window. Juxtapose these two windows. 3. Click on the "Click here" button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info("GOT A SUBMIT IN INVITE") net.liftweb.http.js.JsCmds.Run("alert('Hey')") } ajaxForm( bind("elem", xhtml, "submit" - submit("Click", () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type="RCActor" Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form="post" elem:submit / /lift:Discuss.invite The Discuss snippet's "invite" method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info("GOT A SUBMIT IN INVITE") } bind("elem", xhtml, "submit" - submit("Click", () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the "submit" button are rendered properly. However, when I click on the submit button, the "handleSubmit" method is not called. Instead, the browser displays a page with the text "window.location=/". If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach "legal"? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google
Re: [Lift] Re: Binding a snippet in a comet actor?
Yes. The issue is here: http://github.com/dpp/liftweb/issues/closed/#issue/93 It was fixed in 1.1M7 and later. alex On Tue, Jan 12, 2010 at 1:47 PM, Felipe Rodrigues felipero.maill...@gmail.com wrote: I have a similar problem here. I didn't find this issue on github. Is this issue solved? Thanks, Felipe On Oct 9 2009, 5:17 pm, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect. I've opened a ticket: http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example athttp://174.129.214.150:8080/ The code is athttp://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Openhttp://174.129.214.150:8080/in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Openhttp://174.129.214.150:8080/testdriverin another browser window. Juxtapose these two windows. 3. Click on the Click here button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning
[Lift] Re: Binding a snippet in a comet actor?
On Fri, Oct 9, 2009 at 7:31 PM, Somindra Bhattacharya somind...@gmail.comwrote: Thanks David! You are welcome and thanks for taking the time to put together the sample! On Oct 10, 12:17 am, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect. I've opened a ticket: http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example athttp://174.129.214.150:8080/ The code is athttp://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Openhttp://174.129.214.150:8080/in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Openhttp://174.129.214.150:8080/testdriverin another browser window. Juxtapose these two windows. 3. Click on the Click here button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning
[Lift] Re: Binding a snippet in a comet actor?
David, Thanks for responding. I have hosted the example at http://174.129.214.150:8080/ The code is at http://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Open http://174.129.214.150:8080/ in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Open http://174.129.214.150:8080/testdriver in another browser window. Juxtapose these two windows. 3. Click on the Click here button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp 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@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: Binding a snippet in a comet actor?
This is a defect. I've opened a ticket: http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example at http://174.129.214.150:8080/ The code is at http://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Open http://174.129.214.150:8080/ in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Open http://174.129.214.150:8080/testdriver in another browser window. Juxtapose these two windows. 3. Click on the Click here button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp 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@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: Binding a snippet in a comet actor?
Thanks David! On Oct 10, 12:17 am, David Pollak feeder.of.the.be...@gmail.com wrote: This is a defect. I've opened a ticket:http://github.com/dpp/liftweb/issues#issue/93 I'll have a fix checked in later today On Fri, Oct 9, 2009 at 1:02 AM, Somindra Bhattacharya somind...@gmail.comwrote: David, Thanks for responding. I have hosted the example athttp://174.129.214.150:8080/ The code is athttp://174.129.214.150:8080/dynamicForm.tar.gz Here are the steps to reproduce the issue: 1. Openhttp://174.129.214.150:8080/in a browser window. This starts a comet actor which listens for messages. There is no form present on this page. 2. Openhttp://174.129.214.150:8080/testdriverin another browser window. Juxtapose these two windows. 3. Click on the Click here button in the window opened in (2). Submitting this form results into a lift:Snippet block being sent to the actor on the index page. This makes the index page show a form that was not previously present. 4. Click on the button that has appeared on the index page. This does not result into calling the handler at the server end. Please let me know if you need more information. Thanks again... Regards, Som On Oct 8, 9:40 pm, David Pollak feeder.of.the.be...@gmail.com wrote: The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp Surf the harmonics -- Lift, the simply functional web frameworkhttp://liftweb.net Beginning Scalahttp://www.apress.com/book/view/1430219890 Follow me:http://twitter.com/dpp 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@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: Binding a snippet in a comet actor?
The chat example in demo.liftweb.net (source in examples/example) has a form that is presented after the initial form is rendered. It works just fine. Please put together a small example of the failure so I can see the running code. On Wed, Oct 7, 2009 at 9:13 PM, Somindra Bhattacharya somind...@gmail.comwrote: Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp 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@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: Binding a snippet in a comet actor?
Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som --~--~-~--~~~---~--~~ 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: Binding a snippet in a comet actor?
Apologies for bumping this. Is there a way to get the submit button (or an ajaxButton) to work if the snippet which was not originally part of the page is bound by a comet actor? Thanks, Som On Oct 7, 12:32 pm, Somindra Bhattacharya somind...@gmail.com wrote: Thanks for responding, Naftoli. I tried changing the code to: def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) net.liftweb.http.js.JsCmds.Run(alert('Hey')) } ajaxForm( bind(elem, xhtml, submit - submit(Click, () = handleSubmit() ), ) ++ hidden(() = handleSubmit()) ) The handleSubmit method is still not called. I tried using ajaxButton instead of submit but that did not help either. What am I doing wrong? On Oct 7, 5:06 am, Naftoli Gugenheim naftoli...@gmail.com wrote: What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som --~--~-~--~~~---~--~~ 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: Binding a snippet in a comet actor?
What about an Ajax form? On Tue, Oct 6, 2009 at 9:52 AM, Somindra Bhattacharya somind...@gmail.com wrote: Hi Everyone, I have a comet actor that binds XHTML. The XHTML corresponds to a snippet: XHTML for comet actor - lift:comet type=RCActor Act:act / /lift:comet When the comet actor receives a certain message, the render method of the comet actor binds the following XHTML - lift:Discuss.invite form=post elem:submit / /lift:Discuss.invite The Discuss snippet's invite method definition is: def invite(xhtml: NodeSeq): NodeSeq = { def handleSubmit() = { Log.info(GOT A SUBMIT IN INVITE) } bind(elem, xhtml, submit - submit(Click, () = handleSubmit())) } The page does not contain this form when it is first loaded. When the actor receives a certain message, it binds the XHTML (Discuss.invite) to the page and the form and the submit button are rendered properly. However, when I click on the submit button, the handleSubmit method is not called. Instead, the browser displays a page with the text window.location=/. If I use the browser back button and re-visit the page with the comet actor, the submit button works (i.e., handleSubmit() is called and I can see the info log). Is this approach legal? Is there a way to make a form submit if it was not originally part of the page? Thanks, Som --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---