You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov> on 2006/11/03 23:31:18 UTC

h:commandClick and a confirmation prompt

Hi,

 

How could I add a confirmation JavaScript dialog box to a h:commandLink?
The onclick event is taken by the renderer....

 

Thanks,

Bolerio


Re: h:commandClick and a confirmation prompt

Posted by Werner Punz <we...@gmx.at>.
Iordanov, Borislav (GIC) schrieb:
> Hi,
> 
>  
> 
> How could I add a confirmation JavaScript dialog box to a h:commandLink? 
> The onclick event is taken by the renderer….
> 
> 
Well theoretically you can chain events, so that you
basically just add another handler and wrap it
around the existing event infrastructure or a
form submit.

Practically there is something in the sandbox which is somewhat
broken but might work out for you check out the state
changed notifier, which does exactly that for command links
if something in a a form has changed its value!




Re: h:commandClick and a confirmation prompt

Posted by Veit Guna <ve...@gmx.de>.
What do you mean with "taken by the renderer"? I use myfaces, and this
works like a charm for me:

<h:commandLink value="#{msg.my_gallery_delete_link_label}" onclick="if
(!confirm('#{msg.my_gallery_msg_confirm_delete_gallery}')) return false"
action="#{galleryAction.deleteMyGallery}" />

This won't for you?

regards,
Veit

Iordanov, Borislav (GIC) schrieb:
> Hi,
> 
>  
> 
> How could I add a confirmation JavaScript dialog box to a h:commandLink?
> The onclick event is taken by the renderer….
> 
>  
> 
> Thanks,
> 
> Bolerio
> 

Re: h:panelGroup or a4j:outputPanel ?

Posted by Jeff Bischoff <jb...@klkurz.com>.
Stephen Osella wrote:
> Should one always use a4j:outputPanel rather than h:panelGroup when 
> using ajax4jsf?  Does it make a difference?
> 

No, these do different things.

P.S. When you start a new thread by replying to someone else's, it 
confuses threaded mail readers. (like Thunderbird or Nabble)



h:panelGroup or a4j:outputPanel ?

Posted by Stephen Osella <so...@austin.rr.com>.
Should one always use a4j:outputPanel rather than h:panelGroup when using 
ajax4jsf?  Does it make a difference? 


Re: h:commandClick and a confirmation prompt

Posted by Veit Guna <ve...@gmx.de>.
What do you mean with "taken by the renderer"? I use myfaces, and this
works like a charm for me:

<h:commandLink value="#{msg.my_gallery_delete_link_label}" onclick="if
(!confirm('#{msg.my_gallery_msg_confirm_delete_gallery}')) return false"
action="#{galleryAction.deleteMyGallery}" />

This won't for you?

regards,
Veit

Iordanov, Borislav (GIC) schrieb:
> Hi,
> 
>  
> 
> How could I add a confirmation JavaScript dialog box to a h:commandLink?
> The onclick event is taken by the renderer….
> 
>  
> 
> Thanks,
> 
> Bolerio
>