Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.1.6
-
None
-
None
-
Tomahawk 1.1.6
JSF Sun RI 1.1_01
JSP (unknown if it affects Facelets)
Description
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 render.
Email conversation from myfaces mailing list follows:
dataScroller onclick with Sun RI
7 messages
Stewart Cambridge 2 November 2007 13:19
To: users@myfaces.apache.org
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?
Thanks,
Stewart
rlubke 2 November 2007 16:33
Reply-To: MyFaces Discussion <users@myfaces.apache.org>
To: users@myfaces.apache.org
What version of the RI and what version of Tomahawk?
–
View this message in context: http://www.nabble.com/dataScroller-onclick-with-Sun-RI-tf4737384.html#a13551129
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Stewart Cambridge 2 November 2007 16:51
To: MyFaces Discussion <users@myfaces.apache.org>
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 <users@myfaces.apache.org>
To: MyFaces Discussion <users@myfaces.apache.org>
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 <users@myfaces.apache.org>
No, I'm not very sure. However, my reasons for thinking so are:
(1) The CommandLink is created using:
HtmlCommandLink link = (HtmlCommandLink) application
.createComponent(HtmlCommandLink.COMPONENT_TYPE);
where the application object is a Sun RI object,
and
(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
javax.faces.component.html.HtmlCommandLink.
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 <users@myfaces.apache.org>
To: MyFaces Discussion <users@myfaces.apache.org>
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 <users@myfaces.apache.org>
Ok. Should I file a bug report then?
Attachments
Issue Links
- duplicates
-
TOMAHAWK-117 dataScroller bug when using ADF - navigation icons not clickable
- Closed