You might want to be careful what you put in your commandLink onclick method.

For instance, it always needs to return false, so that the underlying
link is not followed.


On Wed, 16 Feb 2005 14:52:46 +0100, Michael Wiedmann
<[EMAIL PROTECTED]> wrote:
> Sean Schofield <[EMAIL PROTECTED]> wrote:
> ..
> > I just quickly checked <x:commandLink> for you (the myfaces "extended"
> > version) and it has an onclick attribute.  I am willing to bet that
> > whatever code you supply there will be called before the regular
> > onclick stuff you can expect from commandLink.
> 
> Thanks Sean,
> 
> in the meantime I used something like:
> 
> <h:form onsubmit="return someJScriptFunction();" >
>  <h:commandButton action="#{bean.method}"
>                   image="/path/to/icon.gif" />
> </h:form>
> 
> which works great!
> It took a while though to find this solution, because the attribute "image" 
> was
> not obvious (at least not for me).
> 
> Michael
> --
> 


-- 
-Heath Borders-Wing
[EMAIL PROTECTED]

Reply via email to