On 5/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I'll open the RFE as soon as possible. At the moment to solve the
problem I have done:
1) Created a my DialogContextManagerListener overriding the onCreate
method to add my DialogContextListener to the DialogContext:

    public class DialogContextManagerListener extends
                AbstractDialogContextManagerListener {

            public void onCreate(DialogContext context) {
                context.addDialogContextListener(new
MyDialogContextListener());
                super.onCreate(context);
            }
    }
2)Created a my DialogLifecycleListener overriding the onInit method to
add my previous DialogContextManagerListener to the
DialogContextManager:

    public class DialogLifecycleListener extends
    AbstractDialogLifecycleListener {


        public void onInit(DialogContextManager manager) {
                manager.addDialogContextManagerListener(
                         new DialogContextManagerListener());

                super.onInit(manager);
        }
    }

3) Configured, in my faces-config.xml the previous
DialogLifecycleListener:
        <managed-bean>
                <managed-bean-name>
                 org.apache.shale.dialog.LIFECYCLE_LISTENER
            </managed-bean-name>
                <managed-bean-class>
                 prova.DialogLifecycleListener
            </managed-bean-class>
                <managed-bean-scope>application</managed-bean-scope>
        </managed-bean>

Is it correct?

Thanks in advance
Mario


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: 29 maggio 2007 03.19
To: user@shale.apache.org
Subject: Re: How configure DialogContextListener?

On 5/28/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Thanks, but there is no way to configure a listener statically (for
> example using a configuration file)?  I need to configure the same
> listener for each dialog started, but I understand that both solution
> need to be done by the programmer.
>

At the moment, there is no mechanism to declaratively register a
listener.  That would make a useful RFE if you wanted to file an issue
for it.


I can't actually try it at the moment, but this sure looks like it is
on the right track.

Craig

Reply via email to