Re: Seeking Review jsfri-63: back button and commandLink

From: Ed Burns <Ed.Burns_at_Sun.COM>
Date: Fri, 22 Oct 2004 13:01:59 -0700

>>>>> On Fri, 22 Oct 2004 11:16:02 -0700, Adam Winer <> said:

AW> Ed,
AW> Doesn't this remove support for "onclick" on commandButton?
AW> JSF developers are definitely using that today.

Yes, you are correct.

AW> What happens if there's no CommandLinks on a page? I'd
AW> think that would mean that the commandLink hidden field
AW> wouldn't function, and the commandButton's onclick would
AW> result in a Javascript error.

Actually, in my tests, it does not result in an error, however, you do
have a good point.

AW> Also, getHiddenFieldName() was a reasonable name for
AW> a method on CommandLinkRenderer, but is very confusing
AW> as a name on HtmlBasicRenderer.


AW> FWIW, what we (Oracle UIX) did for this category of problem
AW> was to take *all* the "NeededHiddenFields" and explicitly
AW> null them all out in Javascript before continuing with the
AW> code that sets parameters and then submits.

That's what I want to do. However, where do you hang the javascript?
On the form? If so, how do you make it so the nulling out happens
BEFORE the parameter setting code?

>>>>> On Fri, 22 Oct 2004 14:30:53 -0500, Jacob Hookom <> said:

JH> One thing I could suggest in for areas where we generate Javascript, if
JH> the attribute already has a value, prepend our script to the existing
JH> value. I'm not sure if the renderkits already works that way?

JH> onClick="alert('Developer debugging');"

JH> becomes

JH> onClick="injectedScript(); alert('Developer debugging');"

That's a good idea to address Adam's initial concern, but it seems like
there would be some cases where we would break user code.


|  | {home: 407 294 2468, office: 408 884 9519 OR x31640}
| homepage:         |
| aim: edburns0sunw | iim:
To unsubscribe, e-mail:
For additional commands, e-mail: