Dmitry,
I guess you are saying that event.type produces incorrect results if
the table navigation bar just happens to be on the page. This is
definitely strange.
I am not really familiar wit the navigation bar code, but I took a quick
look
to see if we are doing any event capturing there. I did not find anything.
The 'event' javascript variable is global to the entire window. I would try
assigning a listener in javascript, so that you get the event passed in
as a parameter:
function handleKeyUp(evt)
{
alert (evt.type);
}
document.getElementById("myClientId").onkeyup = handleKeyUp;
Or (in IE):
document.getElementById("myClientId").attachEvent('onkeyup', handleKeyUp);
Regards,
Max
Dmitry Barsukov wrote:
Rectified form (surely a bug!) :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:trh="http://myfaces.apache.org/trinidad/html">
<trh:html>
<trh:head><title>TABLE BUG TEST CASE</title></trh:head>
<trh:body>
<tr:form id="frm_main">
<tr:inputText id="it_search" onkeyup="alert('onkeyup:
event.type='+event.type);"/>
<tr:commandButton text="placebo"/>
<tr:table id="tbl_result" rows="50"
value="#{tblBugList}" var="row">
<tr:column > <tr:outputText value="#{row}"/>
</tr:column>
</tr:table>
</tr:form>
</trh:body>
</trh:html>
</f:view>
tblBugList bean:
<managed-bean>
<managed-bean-name>tblBugList</managed-bean-name>
<managed-bean-class>java.util.ArrayList</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<list-entries>
<value-class>java.lang.String</value-class>
<value>LINE ONE</value>
<value>LINE TWO</value>
<value>LINE THREE</value>
</list-entries>
</managed-bean>
If <tr:table> attribute "rows" is set to "2" then "event" object passed to
JavaScript onkeyup event is screwed, i.e. it must point to event.type
"onkeyup" but it shows "hidden" instead of "onkeyup".
If "rows" attribute is set to > 3, i.e. table does not display ranges bar,
then event object is correct and it points to event.type "onkeyup". There is
a feeling that all other JS handlers/events are handled similarly.
This does sound like a bug to me. It is also quite critical to our
application.
Regards,
Dmitry