On 5/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi, I need to know if a dialog exists before starting it. Is there a way
to know it using shale-basic?


If there is a currently active dialog, then you will be able to
retrieve the DialogContext instance for it like this (in 1.0.4):

   FacesContext context = FacesContext.getCurrentInstance();
   DialogContext dcontext = (DialogContext)
     context.getExternalContext().getRequestMap().get("dialog");
   if (dialog == null) {
       ; // there is no currently active dialog
   }

The trunk code (that should eventually become 1.1.x) has a helper
method to make this easier:

   DialogContext dcontext = DialogHelper.getDialogContext();



Thanks in advance

Mario Buonopane


Craig

Reply via email to