Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8
-
Fix Version/s: 1.8.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:FF 3.0.8, IE7
Description
<ice:inputText id="idWhereLocationTextBox" styleClass="inputTextBox width90"
value="#{myBean.whereLocation}"
onfocus="javascript:clearTxt(this.id);"
onblur="javascript:getTxt(this.id);"/>
</ice:form
and
<script>
function clearTxt(varI){
alert('onFocus:' + varI);
}
function getTxt(varI) {
alert('onBlur:' + varI);
}
</script>
In Firefox 3.0.8, the alert will return "onFocus:undefined" and in IE7 "onFocus j_id11" which is the ID of the form tag.
-
Hide
- SC8209.war
- 5.34 MB
- Tyler Johnson
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/BackingBean.class 0.5 kB
- WEB-INF/faces-config.xml 0.5 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/backport-util-concurrent.jar 343 kB
- WEB-INF/lib/commons-beanutils.jar 113 kB
- WEB-INF/lib/commons-collections.jar 162 kB
- WEB-INF/lib/commons-digester.jar 104 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/commons-logging.jar 30 kB
- WEB-INF/lib/icefaces-comps.jar 1.91 MB
- WEB-INF/lib/icefaces.jar 1.05 MB
- WEB-INF/lib/jsf-api.jar 350 kB
- WEB-INF/lib/jsf-impl.jar 816 kB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/web.xml 3 kB
- main.jspx 1 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
This issue seems to be started from a commit related to the issue ICE-4102 "Capture focus for any element that can receive it" (rev. 18359).
You are correct Arturo.
Ty
In a plain HTML test, using 'this' in the onfocus attribute refers to the <input> (or <a>, or any focusable) element that just received focus. Under ICEfaces, 'this' refers to the window object in FF and to the containing <form> element in IE. This applies to both: elements rendered as part of ICEfaces components and to stand-alone elements hard-coded in the page. I guess the intention of the test app is to get a reference to the <input> element.
Yes, so in this case 'this' would refer to the calling inputText component.
Ty
Are you wanting the event target?
Sample app intended for deployment on Tomcat 6.
Execute previously registered listeners so that 'this' variable points to the right element instance.