You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shale.apache.org by "mario buonopane (JIRA)" <ji...@apache.org> on 2007/07/02 21:37:26 UTC

[jira] Created: (SHALE-454) extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method

extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method
-----------------------------------------------------------------------------------------------------

                 Key: SHALE-454
                 URL: https://issues.apache.org/struts/browse/SHALE-454
             Project: Shale
          Issue Type: Bug
          Components: Dialog
    Affects Versions: 1.1.0-SNAPSHOT
            Reporter: mario buonopane


i'm using Shale Basic Dialog 1.1.0 and I have a my DialogContextListener extending AbstractDialogContextListener. In onStart() and onStop() methods, getDialogContext().getName() returns null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHALE-454) extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/SHALE-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41329 ] 

Rahul Akolkar commented on SHALE-454:
-------------------------------------

I believe if the positions stack is empty, then the dialog definition this context is currently associated with should be the dialog definition this context was instantiated with (even though it is not "active"). Therefore, I'd like to apply the following patch to the getName() method, but wanted to post it here for comments first.

Index: BasicDialogContext.java
===================================================================
--- BasicDialogContext.java	(revision 544613)
+++ BasicDialogContext.java	(working copy)
@@ -258,7 +258,7 @@
         if (position != null) {
             return position.getDialog().getName();
         } else {
-            return null;
+            return dialog.getName();
         }
 
     }


> extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-454
>                 URL: https://issues.apache.org/struts/browse/SHALE-454
>             Project: Shale
>          Issue Type: Bug
>          Components: Dialog
>    Affects Versions: 1.1.0-SNAPSHOT
>            Reporter: mario buonopane
>
> i'm using Shale Basic Dialog 1.1.0 and I have a my DialogContextListener extending AbstractDialogContextListener. In onStart() and onStop() methods, getDialogContext().getName() returns null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHALE-454) extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/SHALE-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41341 ] 

Rahul Akolkar commented on SHALE-454:
-------------------------------------

The reason is similar. I think you may have posted a simplified snippet, otherwise its possible to set the dialog data in the dialog descriptor itself, rather than using the approach above.

In any case, in the above scenario, I'd recommend using onStart() for making sure all resources are available for the instantiation of dialog data, but actually instantiating (and configuring) it in onActivate().

As an aside, at first glance, I suspect a single onEntry() callback might be escaping out before the onActivate() call, and I intend to take a better look at that later in the week.


> extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-454
>                 URL: https://issues.apache.org/struts/browse/SHALE-454
>             Project: Shale
>          Issue Type: Bug
>          Components: Dialog
>    Affects Versions: 1.1.0-SNAPSHOT
>            Reporter: mario buonopane
>
> i'm using Shale Basic Dialog 1.1.0 and I have a my DialogContextListener extending AbstractDialogContextListener. In onStart() and onStop() methods, getDialogContext().getName() returns null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHALE-454) extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method

Posted by "mario buonopane (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/SHALE-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41336 ] 

mario buonopane commented on SHALE-454:
---------------------------------------

I don't know if is the same problem, but overriding onStart() method in
this way:
	public void onStart() {
		super.onStart();
		DialogContext dialogContext =
DialogHelper.getDialogContext();
		dialogContext.setData(new ContextData());

i receive the following exception:

[03/07/07 9.38.15:310 CEST] 00000028 ActionListene E
it.accenture.web.myfaces.application.ActionListenerImpl processAction
error
                                 java.lang.IllegalStateException: Cannot
set data when no positions are stacked
	at
org.apache.shale.dialog.basic.BasicDialogContext.setData(BasicDialogCont
ext.java:230)








> extending AbstractDialogContextListener getDialogContext().getName() returns null in onStart() method
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SHALE-454
>                 URL: https://issues.apache.org/struts/browse/SHALE-454
>             Project: Shale
>          Issue Type: Bug
>          Components: Dialog
>    Affects Versions: 1.1.0-SNAPSHOT
>            Reporter: mario buonopane
>
> i'm using Shale Basic Dialog 1.1.0 and I have a my DialogContextListener extending AbstractDialogContextListener. In onStart() and onStop() methods, getDialogContext().getName() returns null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.