myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stewart Cambridge (JIRA)" <>
Subject [jira] Created: (TOMAHAWK-1140) Tomahawk DataScroller component should use only Tomahawk CommandLink children because of onclick attribute
Date Fri, 02 Nov 2007 18:01:03 GMT
Tomahawk DataScroller component should use only Tomahawk CommandLink children because of onclick

                 Key: TOMAHAWK-1140
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Data Scroller
    Affects Versions: 1.1.6
         Environment: Tomahawk 1.1.6
JSF Sun RI 1.1_01
JSP (unknown if it affects Facelets)
            Reporter: Stewart Cambridge

Using Tomahawk's DataScroller component with JSF Sun RI 1.1 means that you can't use the onclick
attribute on the <t:dataScroller/> because the Sun RI 1.1 <h:commandLink/> does
not support the onclick attribute.
The Sun RI 1.1 CommandLink component class does have a setOnclick() method, but it does not

Email conversation from myfaces mailing list follows:

dataScroller onclick with Sun RI
7 messages
Stewart Cambridge 	2 November 2007 13:19
Hi Myfaces Users,

I'm using a Tomahawk dataScroller component with a Tomahawk dataTable on a page.
I have the onclick attribute set on the dataScroller, with the idea
that each rendered link for first, last, previous, next, etc would
have its onclick attribute set.

Unfortunately, the onclick is not being rendered and I wondered if (a)
it was because I was using the Sun RI rather than MyFaces, and Sun's
CommandLink doesn't support onclick, or if (b) I was just using it
incorrectly. Could someone enlighten me please?

Tracing through in a debugger seems to show the DataScroller setting
onclick on the CommandLink each facet (link.setOnclick()), so I
thought that it was using Tomahawk's CommandLink quite happily. But
it's rendering as though it were a Sun RI CommandLink.

Any advise please?



rlubke  	2 November 2007 16:33
Reply-To: MyFaces Discussion <>

What version of the RI and what version of Tomahawk?

View this message in context:
Sent from the MyFaces - Users mailing list archive at

Stewart Cambridge 	2 November 2007 16:51
To: MyFaces Discussion <>
tomahawk 1.1.6
Sun RI 1.1_01

I realise that both MyFaces CommandLInk and Sun RI 1.2 CommandLink can
handle the onclick attribute nicely, and I'll be upgrading ASAP, but
meanwhile I need to workaround it.

What I've done is augmented the Tomahawk DataScroller to pass through
onkeypress and onmousedown and I'm using these attributes instead.

Mike Kienenberger 	2 November 2007 16:55
Reply-To: MyFaces Discussion <>
To: MyFaces Discussion <>
If t:dataScroller is trying to use a nonstandard attribute with
h:commandLink rather than t:commandLink, that would be a bug.

Are you sure that it's using the core commandLink component rather
than the Tomahawk commandLink component?

Stewart Cambridge 	2 November 2007 17:26
To: MyFaces Discussion <>
No, I'm not very sure. However, my reasons for thinking so are:
(1) The CommandLink is created using:
HtmlCommandLink link = (HtmlCommandLink) application
where the application object is a Sun RI object,
(2) the HTML rendered to the browser looks like a Sun RI rendering and
looks different from a MyFaces rendering of CommandLink.

In my debugger the class of the link is simply reported as a

What's interesting is that the Sun RI v1.1 CommandLink component has a
setOnclick() method, even though the <h:commandLink/> tag does not.
Otherwise I'm sure it would be throwing some kind of exception...

Mike Kienenberger 	2 November 2007 17:31
Reply-To: MyFaces Discussion <>
To: MyFaces Discussion <>
That seems pretty likely, then.

The patch would be to change the kind of link created to specifically
be a Tomahawk command link.

Also, depending on how the onClick value is being set, there may not
be explicit support for it in Sun RI.   It may be that dataScroller is
setting it as a generic attribute.

Stewart Cambridge 	2 November 2007 17:35
To: MyFaces Discussion <>
Ok. Should I file a bug report then?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message