Hi, Emily

I didn’t said use always false;”

 

I only said about something like that:

 

<h:commandLink binding=”#{bean.linkAdd}”  action="">

 

…………. Java code

…………………….

public void onAdd() {

…………………

 // no need to execute onAdd

 linkAdd.setStyleClass(“disableLinkClass”); // apply style to disable link

 linkAdd.setOnClick(“return false;”); // break server-side action for this link

…………………….

}

 

Or you can implement another scenario for this.

 

Best wishes,

Yura.

 


From: Emily Gu [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 25, 2006 11:50 PM
To: MyFaces Discussion
Subject: Re: How to disable commandLink button after it is clicked once?

 

Hi,

 

  Thanks for your reply. After I did this, the form is never submitted.

 

   >this.disabled=true; document.myForm.submit(); return false;"

 

Thanks,

Emily



 

On 3/25/06, Yura.Tkachenko <[EMAIL PROTECTED]> wrote:

Hi,

Try to setup onclick handler after you clicked on the link like this:

 

<h:commandLink …. false;" />

 

In this case by onclick won't be submit.

 

Thanks,

Yura.

 


From: Emily Gu [mailto: [EMAIL PROTECTED]]
Sent: Saturday, March 25, 2006 10:43 PM
To: users@myfaces.apache.org
Subject: How to disable commandLink button after it is clicked once?

 

Hi,

 

Any recommend way to disable the commandLink button after a user click it once? _javascript_ this.disabled=true, it seems only giving the visual effect as the the button is disabled but it still submits twice if I click it twice. Any help is greatly appreciated.

 

Thanks,

Emily

 

Reply via email to