I'm having problems using ORBEON.xforms.Document.setValue() ......... If
I have a new window open and then have a javascript function call back into the original window it does not work in Firefox when followed by a window.close() to get rid of the popup window (the page displays "Loading...." but nothing happens). See attached test.xhtml Any thoughts??? Steve -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
I do see funny behavior with Firefox, as you mention. This would warrant
investigating but I don't have an immediate solution. However I will risk an opinionated remark, which is that applications that open new windows as "dialogs" are evil ;-) Take your particular example: with my current Firefox settings ("Force links that open new windows to open in a new tab") a new window never opens, but instead Firefox opens new tabs in the background. Opera by default does the same (except the new tab opens in the foreground). Do you have an alternative to using a separate window? -Erik Steve Lenhart wrote: > I'm having problems using ORBEON.xforms.Document.setValue() ......... If > I have a new window open and then have a javascript function call back > into the original window it does not work in Firefox when followed by a > window.close() to get rid of the popup window (the page displays > "Loading...." but nothing happens). See attached test.xhtml > > Any thoughts??? > > > Steve Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
For that purpose, the use of "container" from the yahoo UI library can bring some cool alternative. HTH, Marc Erik Bruchez a écrit : > I do see funny behavior with Firefox, as you mention. This would > warrant investigating but I don't have an immediate solution. > > However I will risk an opinionated remark, which is that applications > that open new windows as "dialogs" are evil ;-) Take your particular > example: with my current Firefox settings ("Force links that open new > windows to open in a new tab") a new window never opens, but instead > Firefox opens new tabs in the background. Opera by default does the > same (except the new tab opens in the foreground). > > Do you have an alternative to using a separate window? > > -Erik > > Steve Lenhart wrote: > >> I'm having problems using ORBEON.xforms.Document.setValue() ......... >> If I have a new window open and then have a javascript function call >> back into the original window it does not work in Firefox when >> followed by a window.close() to get rid of the popup window (the page >> displays "Loading...." but nothing happens). See attached test.xhtml >> >> Any thoughts??? >> >> >> Steve > > >------------------------------------------------------------------------ > > >-- >You receive this message as a subscriber of the [hidden email] mailing list. >To unsubscribe: mailto:[hidden email] >For general help: mailto:[hidden email]?subject=help >ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
Eric,
I do not believe there is an alternative to the popup window, the reason we are using this is because we have several other JSP utility apps we make use of in OPS apps. Steve Erik Bruchez wrote: I do see funny behavior with Firefox, as you mention. This would warrant investigating but I don't have an immediate solution. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws slenhart.vcf (320 bytes) Download Attachment |
Administrator
|
In reply to this post by marc-62
Absolutely.
This would also probably be a way of implementing the XForms 1.1 xforms:prompt element. -Erik marc wrote: > Erik, > > For that purpose, the use of "container" from the yahoo UI library can > bring some cool alternative. > > HTH, > > Marc > > Erik Bruchez a écrit : > >> I do see funny behavior with Firefox, as you mention. This would >> warrant investigating but I don't have an immediate solution. >> >> However I will risk an opinionated remark, which is that applications >> that open new windows as "dialogs" are evil ;-) Take your particular >> example: with my current Firefox settings ("Force links that open new >> windows to open in a new tab") a new window never opens, but instead >> Firefox opens new tabs in the background. Opera by default does the >> same (except the new tab opens in the foreground). >> >> Do you have an alternative to using a separate window? >> >> -Erik >> >> Steve Lenhart wrote: >> >>> I'm having problems using ORBEON.xforms.Document.setValue() ......... >>> If I have a new window open and then have a javascript function call >>> back into the original window it does not work in Firefox when >>> followed by a window.close() to get rid of the popup window (the page >>> displays "Loading...." but nothing happens). See attached test.xhtml >>> >>> Any thoughts??? >>> >>> >>> Steve Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Steve Lenhart
Hi Steve,
Indeed, this is a very strange problem. Calling ORBEON.xforms.Document.setValue(...) triggers an XHR request to the server, and Firefox reports at the lowest level that this query fails, even if everything seems to be OK looking at what is being exchanged through HTTP between the browser and the server. But even Firebug (a Firefox plug-in which you can use to see what is exchanged between the browser and server) can't show the response sent by the server. A workaround is to modify the function that you call when the window is closed, and instead of calling ORBEON.xforms.Document.setValue() directly, call a function which does this call upon expiration of a very short timeout. This uses window.setTimeout(). The modified version of your code is attached. Alex On 9/18/06, Steve Lenhart <[hidden email]> wrote: > I'm having problems using ORBEON.xforms.Document.setValue() ......... If > I have a new window open and then have a javascript function call back > into the original window it does not work in Firefox when followed by a > window.close() to get rid of the popup window (the page displays > "Loading...." but nothing happens). See attached test.xhtml > > Any thoughts??? > > > Steve > > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws test.xhtml (4K) Download Attachment
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Last update:
I have successfully implemented the fix you described below for my problem. Thanks very much for the help! I may be showing my naivete here, but perhaps it might be useful to implement a setValue() method with a return value, so as to make easier the timing of these kinds of outside calls? In any case, thanks very much again for the help you've given. OPS is a great system! --- A. Soroka On Oct 17, 2006, at 10:49 PM, Alessandro Vernet wrote: > Hi Steve, > > Indeed, this is a very strange problem. Calling > ORBEON.xforms.Document.setValue(...) triggers an XHR request to the > server, and Firefox reports at the lowest level that this query fails, > even if everything seems to be OK looking at what is being exchanged > through HTTP between the browser and the server. But even Firebug (a > Firefox plug-in which you can use to see what is exchanged between the > browser and server) can't show the response sent by the server. > > A workaround is to modify the function that you call when the window > is closed, and instead of calling ORBEON.xforms.Document.setValue() > directly, call a function which does this call upon expiration of a > very short timeout. This uses window.setTimeout(). The modified > version of your code is attached. > > Alex > > On 9/18/06, Steve Lenhart <[hidden email]> wrote: >> I'm having problems using ORBEON.xforms.Document.setValue >> () ......... If >> I have a new window open and then have a javascript function call >> back >> into the original window it does not work in Firefox when followed >> by a >> window.close() to get rid of the popup window (the page displays >> "Loading...." but nothing happens). See attached test.xhtml >> >> Any thoughts??? >> >> >> Steve >> >> >> >> >> -- >> You receive this message as a subscriber of the ops- >> [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http:// >> www.objectweb.org/wws >> >> >> >> > > > -- > Blog (XML, Web apps, Open Source): > http://www.orbeon.com/blog/ > <test.xhtml> > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Alessandro Vernet
Alex,
Thanks, this works perfectly. Steve Alessandro Vernet wrote: Hi Steve, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws slenhart.vcf (314 bytes) Download Attachment |
Administrator
|
In reply to this post by ajs6f@virginia.edu
On 10/18/06, ajs6f <[hidden email]> wrote:
> I may be showing my naivete here, but perhaps it might be useful to > implement a setValue() method with a return value, so as to make > easier the timing of these kinds of outside calls? A setValue() with a return value? I don't quite get what you are suggesting here. What would be the returned value, and how would that help? (Maybe it is instead my turn to show my naivete!) Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
A return value appearingt would act as a signal that the operation is
complete and it is therefore safe to close the window that called the method. It could be something like true for successful value-change, false for anything else. Or perhaps the old value, as a convenience, for successful value-change. Or a JavaScript event might be more appropriate? What I'm getting at is that waiting a constant period of time (for this method to execute) seems to work fine, but that it would be nice to have a concrete signal from the form that the method execution is finished. Two seconds is working well for me right now, but if the server gets hammered and response time go way up, perhaps it might not be... Does that make sense? --- A. Soroka On Oct 19, 2006, at 1:32 PM, Alessandro Vernet wrote: > On 10/18/06, ajs6f <[hidden email]> wrote: >> I may be showing my naivete here, but perhaps it might be useful to >> implement a setValue() method with a return value, so as to make >> easier the timing of these kinds of outside calls? > > A setValue() with a return value? I don't quite get what you are > suggesting here. What would be the returned value, and how would that > help? (Maybe it is instead my turn to show my naivete!) > > Alex > -- > Blog (XML, Web apps, Open Source): > http://www.orbeon.com/blog/ > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 10/19/06, ajs6f <[hidden email]> wrote:
> A return value appearingt would act as a signal that the operation is > complete and it is therefore safe to close the window that called the > method. It could be something like true for successful value-change, > false for anything else. Or perhaps the old value, as a convenience, > for successful value-change. Or a JavaScript event might be more > appropriate? OK, I understand. And yes, using a call-back would be more appropriate in this case as calls to the server are always asynchronous (you don't want freeze the UI while a call is being processed on the server). But once the call is completed, setValue() could invoke your call-back function, which would close the window. However in this case it looks like we don't even need to wait for the response to arrive to close the window. We just have to start the call with a setTimeout() using a ridiculously low delay. This is better for you as a user, as you don't have to wait for the call to the server to be completed for the pop-up window to close. > What I'm getting at is that waiting a constant period of time (for > this method to execute) seems to work fine, but that it would be nice > to have a concrete signal from the form that the method execution is > finished. Two seconds is working well for me right now, but if the > server gets hammered and response time go way up, perhaps it might > not be... In the code I attached to a previous email, I made that 10 ms. Remember, we are waiting for the response to arrive to close the window, but we are closing the window, and running the query to the server a few ms later. Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |