You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Martin Grotzke <ma...@javakaffee.de> on 2006/07/27 23:48:17 UTC

How to display confirmation dialog

Hello,

for actions like "Delete" or something like that i want to display
a confirmation dialog, but it should not be a javascript
confirmation box. The dialog could span the whole page or be
some model browser window, in each case other navigation items
or buttons should not be visible or accessible.

Has anybody a solution for this?

Thanx for your help,
cheers,
Martin



Re: How to display confirmation dialog (with stateChangedNotifier?)

Posted by Martin Grotzke <ma...@javakaffee.de>.
On Fri, 2006-07-28 at 11:58 +0200, ::SammyRulez:: wrote:
> I use to put in onclick atribute of the widget triggering the action
> something like this
> 
> onclick="#{labels.js_confirm}"
> 
> labels is a message bundle with the source code of a js call like
> 
> js_confirm = if (!confirm('Are you sure?')) return
> 
> this ensures internationalization also
okay, but you can also do s.th. like onclick='if (!
confirm("#{labels.confirm}") ...

so you do not need to i18n javascript :)

cheers,
martin


> 
> 2006/7/28, Martin Marinschek <ma...@gmail.com>:
> > You won't be able to use the stateChangedNotifier out of the box.
> >
> > But underlying the stateChangedNotifier is the dojo-dialog, and it
> > should not be hard to apply this to your needs.
> >
> > regards,
> >
> > Martin
> >
> > On 7/28/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> > > On Fri, 2006-07-28 at 09:02 +0200, Martin Marinschek wrote:
> > > > There is something like a javascript dialog solution in the sandbox
> > > > which blocks underlying fields and commands.
> > > Probably you mean the stateChangedNotifier. I had a look at this
> > > and it really looks nice.
> > > But it seems as if it would handle only changes of form elememts, but
> > > that's not what i have. I'd like to specify that the
> > > stateChangedNotifier behaviour is applied whena certain button is
> > > clicked...
> > >
> > > Has anybody done anything like this with the stateChangedNotifier?
> > >
> > > Thanx && cheers,
> > > Martin
> > >
> > >
> > > >
> > > > Maybe you can go from there?
> > > >
> > > > regards,
> > > >
> > > > Martin
> > > >
> > > > On 7/27/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> > > > > Hello,
> > > > >
> > > > > for actions like "Delete" or something like that i want to display
> > > > > a confirmation dialog, but it should not be a javascript
> > > > > confirmation box. The dialog could span the whole page or be
> > > > > some model browser window, in each case other navigation items
> > > > > or buttons should not be visible or accessible.
> > > > >
> > > > > Has anybody a solution for this?
> > > > >
> > > > > Thanx for your help,
> > > > > cheers,
> > > > > Martin
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > -----BEGIN PGP SIGNATURE-----
> > > > > Version: GnuPG v1.4.4 (GNU/Linux)
> > > > >
> > > > > iD4DBQBEyTSh7FvOl7Te+pYRAmNjAKCxo6Rs+X9DNzW1Drg8bAcMCTQcggCYoVto
> > > > > Uj0aikVi5T8B49zxikAbFA==
> > > > > =oOUs
> > > > > -----END PGP SIGNATURE-----
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > --
> > > Martin Grotzke
> > > Bernstorffstr. 17, 22767 Hamburg
> > > Tel.      +49 (0) 40.98239888
> > > Mobil     +49 (0) 170.9365656
> > > E-Mail    martin.grotzke@javakaffee.de
> > > Online    http://www.javakaffee.de
> > >
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.4 (GNU/Linux)
> > >
> > > iD8DBQBEybtf7FvOl7Te+pYRAr6ZAJ49u6y6hxSC/zruJbIVhFpS4+eCagCaA3+y
> > > 9AZGzSJ56Tpxk+In1VqU2Pg=
> > > =HjxX
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> 
> 
-- 
Martin Grotzke
Bernstorffstr. 17, 22767 Hamburg
Tel.      +49 (0) 40.98239888
Mobil     +49 (0) 170.9365656
E-Mail    martin.grotzke@javakaffee.de
Online    http://www.javakaffee.de

Re: How to display confirmation dialog (with stateChangedNotifier?)

Posted by "::SammyRulez::" <sa...@gmail.com>.
I use to put in onclick atribute of the widget triggering the action
something like this

onclick="#{labels.js_confirm}"

labels is a message bundle with the source code of a js call like

js_confirm = if (!confirm('Are you sure?')) return

this ensures internationalization also

2006/7/28, Martin Marinschek <ma...@gmail.com>:
> You won't be able to use the stateChangedNotifier out of the box.
>
> But underlying the stateChangedNotifier is the dojo-dialog, and it
> should not be hard to apply this to your needs.
>
> regards,
>
> Martin
>
> On 7/28/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> > On Fri, 2006-07-28 at 09:02 +0200, Martin Marinschek wrote:
> > > There is something like a javascript dialog solution in the sandbox
> > > which blocks underlying fields and commands.
> > Probably you mean the stateChangedNotifier. I had a look at this
> > and it really looks nice.
> > But it seems as if it would handle only changes of form elememts, but
> > that's not what i have. I'd like to specify that the
> > stateChangedNotifier behaviour is applied whena certain button is
> > clicked...
> >
> > Has anybody done anything like this with the stateChangedNotifier?
> >
> > Thanx && cheers,
> > Martin
> >
> >
> > >
> > > Maybe you can go from there?
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 7/27/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> > > > Hello,
> > > >
> > > > for actions like "Delete" or something like that i want to display
> > > > a confirmation dialog, but it should not be a javascript
> > > > confirmation box. The dialog could span the whole page or be
> > > > some model browser window, in each case other navigation items
> > > > or buttons should not be visible or accessible.
> > > >
> > > > Has anybody a solution for this?
> > > >
> > > > Thanx for your help,
> > > > cheers,
> > > > Martin
> > > >
> > > >
> > > >
> > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v1.4.4 (GNU/Linux)
> > > >
> > > > iD4DBQBEyTSh7FvOl7Te+pYRAmNjAKCxo6Rs+X9DNzW1Drg8bAcMCTQcggCYoVto
> > > > Uj0aikVi5T8B49zxikAbFA==
> > > > =oOUs
> > > > -----END PGP SIGNATURE-----
> > > >
> > > >
> > > >
> > >
> > >
> > --
> > Martin Grotzke
> > Bernstorffstr. 17, 22767 Hamburg
> > Tel.      +49 (0) 40.98239888
> > Mobil     +49 (0) 170.9365656
> > E-Mail    martin.grotzke@javakaffee.de
> > Online    http://www.javakaffee.de
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.4 (GNU/Linux)
> >
> > iD8DBQBEybtf7FvOl7Te+pYRAr6ZAJ49u6y6hxSC/zruJbIVhFpS4+eCagCaA3+y
> > 9AZGzSJ56Tpxk+In1VqU2Pg=
> > =HjxX
> > -----END PGP SIGNATURE-----
> >
> >
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>


-- 
::SammyRulez::
http://www.kyub.com/blojsom/blog/sam/

Re: How to display confirmation dialog (with stateChangedNotifier?)

Posted by Martin Marinschek <ma...@gmail.com>.
You won't be able to use the stateChangedNotifier out of the box.

But underlying the stateChangedNotifier is the dojo-dialog, and it
should not be hard to apply this to your needs.

regards,

Martin

On 7/28/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> On Fri, 2006-07-28 at 09:02 +0200, Martin Marinschek wrote:
> > There is something like a javascript dialog solution in the sandbox
> > which blocks underlying fields and commands.
> Probably you mean the stateChangedNotifier. I had a look at this
> and it really looks nice.
> But it seems as if it would handle only changes of form elememts, but
> that's not what i have. I'd like to specify that the
> stateChangedNotifier behaviour is applied whena certain button is
> clicked...
>
> Has anybody done anything like this with the stateChangedNotifier?
>
> Thanx && cheers,
> Martin
>
>
> >
> > Maybe you can go from there?
> >
> > regards,
> >
> > Martin
> >
> > On 7/27/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> > > Hello,
> > >
> > > for actions like "Delete" or something like that i want to display
> > > a confirmation dialog, but it should not be a javascript
> > > confirmation box. The dialog could span the whole page or be
> > > some model browser window, in each case other navigation items
> > > or buttons should not be visible or accessible.
> > >
> > > Has anybody a solution for this?
> > >
> > > Thanx for your help,
> > > cheers,
> > > Martin
> > >
> > >
> > >
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.4 (GNU/Linux)
> > >
> > > iD4DBQBEyTSh7FvOl7Te+pYRAmNjAKCxo6Rs+X9DNzW1Drg8bAcMCTQcggCYoVto
> > > Uj0aikVi5T8B49zxikAbFA==
> > > =oOUs
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > >
> >
> >
> --
> Martin Grotzke
> Bernstorffstr. 17, 22767 Hamburg
> Tel.      +49 (0) 40.98239888
> Mobil     +49 (0) 170.9365656
> E-Mail    martin.grotzke@javakaffee.de
> Online    http://www.javakaffee.de
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.4 (GNU/Linux)
>
> iD8DBQBEybtf7FvOl7Te+pYRAr6ZAJ49u6y6hxSC/zruJbIVhFpS4+eCagCaA3+y
> 9AZGzSJ56Tpxk+In1VqU2Pg=
> =HjxX
> -----END PGP SIGNATURE-----
>
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: How to display confirmation dialog (with stateChangedNotifier?)

Posted by Martin Grotzke <ma...@javakaffee.de>.
On Fri, 2006-07-28 at 09:02 +0200, Martin Marinschek wrote:
> There is something like a javascript dialog solution in the sandbox
> which blocks underlying fields and commands.
Probably you mean the stateChangedNotifier. I had a look at this
and it really looks nice.
But it seems as if it would handle only changes of form elememts, but
that's not what i have. I'd like to specify that the
stateChangedNotifier behaviour is applied whena certain button is
clicked...

Has anybody done anything like this with the stateChangedNotifier?

Thanx && cheers,
Martin


> 
> Maybe you can go from there?
> 
> regards,
> 
> Martin
> 
> On 7/27/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> > Hello,
> >
> > for actions like "Delete" or something like that i want to display
> > a confirmation dialog, but it should not be a javascript
> > confirmation box. The dialog could span the whole page or be
> > some model browser window, in each case other navigation items
> > or buttons should not be visible or accessible.
> >
> > Has anybody a solution for this?
> >
> > Thanx for your help,
> > cheers,
> > Martin
> >
> >
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.4 (GNU/Linux)
> >
> > iD4DBQBEyTSh7FvOl7Te+pYRAmNjAKCxo6Rs+X9DNzW1Drg8bAcMCTQcggCYoVto
> > Uj0aikVi5T8B49zxikAbFA==
> > =oOUs
> > -----END PGP SIGNATURE-----
> >
> >
> >
> 
> 
-- 
Martin Grotzke
Bernstorffstr. 17, 22767 Hamburg
Tel.      +49 (0) 40.98239888
Mobil     +49 (0) 170.9365656
E-Mail    martin.grotzke@javakaffee.de
Online    http://www.javakaffee.de

Re: How to display confirmation dialog

Posted by Martin Marinschek <ma...@gmail.com>.
There is something like a javascript dialog solution in the sandbox
which blocks underlying fields and commands.

Maybe you can go from there?

regards,

Martin

On 7/27/06, Martin Grotzke <ma...@javakaffee.de> wrote:
> Hello,
>
> for actions like "Delete" or something like that i want to display
> a confirmation dialog, but it should not be a javascript
> confirmation box. The dialog could span the whole page or be
> some model browser window, in each case other navigation items
> or buttons should not be visible or accessible.
>
> Has anybody a solution for this?
>
> Thanx for your help,
> cheers,
> Martin
>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.4 (GNU/Linux)
>
> iD4DBQBEyTSh7FvOl7Te+pYRAmNjAKCxo6Rs+X9DNzW1Drg8bAcMCTQcggCYoVto
> Uj0aikVi5T8B49zxikAbFA==
> =oOUs
> -----END PGP SIGNATURE-----
>
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces