Package org.apache.shale.dialog

Examples of org.apache.shale.dialog.DialogContextManager


     * @return The newly created {@link DialogContext}, may be null
     */
    private DialogContext create(FacesContext context, String dialogName,
                                 String parentId) {

        DialogContextManager manager = (DialogContextManager)
          context.getApplication().getVariableResolver().
                resolveVariable(context, Constants.MANAGER_BEAN);
        if (manager == null) {
            return null;
        }
        DialogContext parent = null;
        if (parentId != null) {
            parent = manager.get(parentId);
        }
        DialogContext dcontext = manager.create(context, dialogName, parent);
        return dcontext;

    }
View Full Code Here


     * @param dialogId Dialog identifier of the {@link DialogContext}
     *  to be restored
     */
    private void restore(FacesContext context, String dialogId) {

        DialogContextManager manager = (DialogContextManager)
          context.getApplication().getVariableResolver().
                resolveVariable(context, Constants.MANAGER_BEAN);
        if (manager == null) {
            return;
        }
        DialogContext dcontext = manager.get(dialogId);
        if (dcontext == null) {
            return;
        }
        if (log.isDebugEnabled()) {
            log.debug("afterPhase() restoring dialog context with id '"
View Full Code Here

          context.getExternalContext().getRequestMap().get(Constants.CONTEXT_BEAN);
        String prefix = prefix(context);
        if (dcontext == null) {
            if ((outcome != null) && outcome.startsWith(prefix)) {
                // Create and start a new DialogContext instance
                DialogContextManager manager = (DialogContextManager)
                  context.getApplication().getVariableResolver().
                  resolveVariable(context, Constants.MANAGER_BEAN);
                dcontext =
                  manager.create(context, outcome.substring(prefix.length()));
                dcontext.start(context);
                if (log.isDebugEnabled()) {
                    log.debug("Starting dialog '"
                              + outcome.substring(prefix.length())
                              + "' for FacesContext instance '"
View Full Code Here

TOP

Related Classes of org.apache.shale.dialog.DialogContextManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.