Posted by
Prameela R on
URL: https://discuss.orbeon.com/xform-setfocus-for-redirecting-the-page-tp42966p42972.html
Thanks Alex,
This solution is ok to some extent.
-----Original Message-----
From: Alessandro Vernet [mailto:
[hidden email]]
Sent: Thursday, March 19, 2009 1:56 PM
To:
[hidden email]
Subject: [ops-users] RE: RE: Re: xform:setfocus for redirecting the page
Prameela,
Prameela R wrote:
>
> Able to get the alert but not xforms:load working under initializing
> events.
>
So in the portlet, xxforms:script works, but xforms:setfocus and xforms:load
don't. As a work-around, you can try this: set an ID on the control on which
you want to set the focus, check in the source of the generated HTML what
that ID is (it will have a prefix and/or suffix added), and run
<xxforms:script>document.getElementById(thatID).focus();</xxforms:script>.
If the element is an input, the getElementById() returns the around the
input, so you need to get the input inside the span before you do the
focus().
Of course, ideally both xforms:setfocus and xforms:load should work in
xforms-model-construct-done for portlets. Issues that happen only in portlet
mode tend to have a lesser priority for us right now, so you might want to
investigate this yourself if you'd like, and of course if you fix this,
please do contribute your change back ;), and we'll make sure to integrate
your contribution in the source tree.
Alex
-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog:
http://www.orbeon.com/blog/Personal Blog:
http://avernet.blogspot.com/Twitter -
http://twitter.com/avernet--
View this message in context:
http://www.nabble.com/xform%3Asetfocus-for-redirecting-the-page-tp22510238p22595083.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
--
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
OW2 mailing lists service home page:
http://www.ow2.org/wws