You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Yixing Ma <yi...@interfacemgmt.net> on 2006/05/26 00:59:23 UTC

tree2 prevent commandlink event reload

Hi,

I have a link in my tree2. When I click on the link, it just calls a
javascript function. I don't want to spawn a server request.

How to do that? I noticed that if I use commandLink or outputLink the page
refreshes once I click on the link. I don't want that. Any suggestions?

Yixing 


Re: tree2 prevent commandlink event reload

Posted by Andrew Robinson <an...@gmail.com>.
Return false:

<f:facet name="treenode">
<t:commandLink onclick="dosomething(); return false;" value="click me" />
</f:facet>

-Andrew

On 5/25/06, Yixing Ma <yi...@interfacemgmt.net> wrote:
>
>
>
>
> Hi,
>
> I have a link in my tree2. When I click on the link, it just calls a
> javascript function. I don't want to spawn a server request.
>
> How to do that? I noticed that if I use commandLink or outputLink the page
> refreshes once I click on the link. I don't want that. Any suggestions?
>
> Yixing