You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by ma...@accenture.com on 2007/06/05 14:43:15 UTC

Problem with subdialogs

I have some problem with subdialogs using shale1.1.0-snapshot (22/05). 

The first problem is:

 

I have a dialog B with following this configuration:

  <dialog name="Test dialogo B" start="Pagina A">

                        

    <view name="Pagina A" viewId="/test_dialogo_b/pagina_a.jsp">

      <transition outcome="avanti" target="Pagina B"/>

      <transition outcome="indietro" target="Exit"/>

    </view>

    

    <view name="Pagina B" viewId="/test_dialogo_b/pagina_b.jsp">

      <transition outcome="avanti" target="Pagina C"/>

      <transition outcome="indietro" target="Pagina A"/>

    </view>

 

    <view name="Pagina C" viewId="/test_dialogo_b/pagina_c.jsp">

      <transition outcome="avanti" target="Exit"/>

      <transition outcome="indietro" target="Pagina B"/>

    </view>

 

    <end name="Exit" viewId="/home/home.jsp"/>

                        

  </dialog>

When I run this dialog not how subdialog I need this dialog end showing
"/home/home.jsp". 

I also need to call this dialog like subdialog of the following dialog
C:

  <dialog name="Test dialogo C" start="Pagina A">

                        

    <view name="Pagina A" viewId="/test_dialogo_a/pagina_a.jsp">

      <transition outcome="avanti" target="Invoca dialogo B"/>

      <transition outcome="indietro" target="Exit"/>

    </view>

    

    <view name="Pagina B" viewId="/test_dialogo_a/pagina_b.jsp">

      <transition outcome="avanti" target="Pagina C"/>

      <transition outcome="indietro" target="Pagina A"/>

    </view>

 

    <view name="Pagina C" viewId="/test_dialogo_a/pagina_c.jsp">

      <transition outcome="avanti" target="Exit"/>

      <transition outcome="indietro" target="Pagina B"/>

    </view>

 

    <subdialog name="Invoca dialogo B" dialogName="Test dialogo B">

      <transition     outcome="avanti"

                       target="Pagina B"/>

      <transition     outcome="indietro"

                       target="Pagina A"/>

    </subdialog>

 

    <end name="Exit" viewId="/home/home.jsp"/>

                        

  </dialog>

 

The problem is that when the subdialog B ends, shale does not show
/test_dialogo_a/pagina_b.jsp but show "/home/home.jsp" .

 

When I use old shale 1.0.3 does work correctly.

 

The second problem is that I'm using the "data" property of
DialogContext to store some information but when start subdialog B, the
getData of DialogContext return an HashMap (not my class).

 

Please help me.....

 

Mario 


Re: Problem with subdialogs

Posted by Rahul Akolkar <ra...@gmail.com>.
Comments inline (quite a ways down) ...

On 6/5/07, mario.buonopane@accenture.com <ma...@accenture.com> wrote:
> I have some problem with subdialogs using shale1.1.0-snapshot (22/05).
>
> The first problem is:
>
>
>
> I have a dialog B with following this configuration:
>
>   <dialog name="Test dialogo B" start="Pagina A">
>
>
>
>     <view name="Pagina A" viewId="/test_dialogo_b/pagina_a.jsp">
>
>       <transition outcome="avanti" target="Pagina B"/>
>
>       <transition outcome="indietro" target="Exit"/>
>
>     </view>
>
>
>
>     <view name="Pagina B" viewId="/test_dialogo_b/pagina_b.jsp">
>
>       <transition outcome="avanti" target="Pagina C"/>
>
>       <transition outcome="indietro" target="Pagina A"/>
>
>     </view>
>
>
>
>     <view name="Pagina C" viewId="/test_dialogo_b/pagina_c.jsp">
>
>       <transition outcome="avanti" target="Exit"/>
>
>       <transition outcome="indietro" target="Pagina B"/>
>
>     </view>
>
>
>
>     <end name="Exit" viewId="/home/home.jsp"/>
>
>
>
>   </dialog>
>
> When I run this dialog not how subdialog I need this dialog end showing
> "/home/home.jsp".
>
<snip/>

Which should be happening, correct?


> I also need to call this dialog like subdialog of the following dialog
> C:
>
>   <dialog name="Test dialogo C" start="Pagina A">
>
>
>
>     <view name="Pagina A" viewId="/test_dialogo_a/pagina_a.jsp">
>
>       <transition outcome="avanti" target="Invoca dialogo B"/>
>
>       <transition outcome="indietro" target="Exit"/>
>
>     </view>
>
>
>
>     <view name="Pagina B" viewId="/test_dialogo_a/pagina_b.jsp">
>
>       <transition outcome="avanti" target="Pagina C"/>
>
>       <transition outcome="indietro" target="Pagina A"/>
>
>     </view>
>
>
>
>     <view name="Pagina C" viewId="/test_dialogo_a/pagina_c.jsp">
>
>       <transition outcome="avanti" target="Exit"/>
>
>       <transition outcome="indietro" target="Pagina B"/>
>
>     </view>
>
>
>
>     <subdialog name="Invoca dialogo B" dialogName="Test dialogo B">
>
>       <transition     outcome="avanti"
>
>                        target="Pagina B"/>
>
>       <transition     outcome="indietro"
>
>                        target="Pagina A"/>
>
>     </subdialog>
>
>
>
>     <end name="Exit" viewId="/home/home.jsp"/>
>
>
>
>   </dialog>
>
>
>
> The problem is that when the subdialog B ends, shale does not show
> /test_dialogo_a/pagina_b.jsp but show "/home/home.jsp" .
>
>
>
> When I use old shale 1.0.3 does work correctly.
>
>
<snap/>

Looks like a bug to me, seems related to SHALE-423 [1]. I will take a
look at this, hopefully this weekend.


>
> The second problem is that I'm using the "data" property of
> DialogContext to store some information but when start subdialog B, the
> getData of DialogContext return an HashMap (not my class).
>
<snip/>

I haven't used the basic dialog implementation heavily, but that
matches my understanding of how the basic impl works. A subdialog also
implies a new dialog data being "pushed onto the stack" (and if you
haven't specified a dialog data class, it defaults to a HashMap).

This is different from the Commons SCXML implementation, where the
dialog data will be shared between the parent dialog and any
subdialogs (to whatever "depth" they may exist). I believe you are
looking for something similar, though that is not how the basic impl
behaves (there are pros/cons to either).

-Rahul

[1] http://issues.apache.org/struts/browse/SHALE-423


>
>
> Please help me.....
>
>
>
> Mario
>
>

RE: Problem with subdialogs

Posted by ma...@accenture.com.
Please remove this email.....
THE FIX DOES WORK CORRECTLY, is my brain does not!

Thanks
Mario 

-----Original Message-----
From: mario.buonopane@accenture.com
[mailto:mario.buonopane@accenture.com] 
Sent: 7 giugno 2007 10.49
To: user@shale.apache.org
Subject: RE: Problem with subdialogs

Rahul, I have tried your fix but when I execute the dialog B I receive
the following error:

Cannot find transition 'avanti' for state 'Exit' of dialog 'Test dialogo
B': java.lang.IllegalStateException: Cannot find transition 'avanti' for
state 'Exit' of dialog 'Test dialogo B'

This is the dialog config file:

  <dialog name="Test dialogo B" start="Pagina A">
                        
    <view name="Pagina A" viewId="/test_dialogo_b/pagina_a.jsp">
      <transition outcome="avanti" target="Pagina B"/>
      <transition outcome="indietro" target="Exit"/>
    </view>
    
    <view name="Pagina B" viewId="/test_dialogo_b/pagina_b.jsp">
      <transition outcome="avanti" target="Pagina C"/>
      <transition outcome="indietro" target="Pagina A"/>
    </view>

    <view name="Pagina C" viewId="/test_dialogo_b/pagina_c.jsp">
      <transition outcome="avanti" target="Exit"/>
      <transition outcome="indietro" target="Pagina B"/>
    </view>

    <end name="Exit" viewId="/home/home.jsp"/>
                    
    
  </dialog>


Mario 

-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] 
Sent: 6 giugno 2007 19.07
To: user@shale.apache.org
Subject: Re: Problem with subdialogs

On 6/6/07, mario.buonopane@accenture.com <ma...@accenture.com>
wrote:
> Rahul, I've tried shale-framework-20070606.zip because there isn't
> shale-framework-20070605.zip but seems that the problem is not
resolved.
> what would have to be changed?
>
<snip/>

For whatever reason, the above zip did not pick up the change I
mentioned. If you dig in to the source files in that zip, you will see
that the source does not include r544613 [1].

Building [2] from source is almost always going to be more expeditious
for immediately testing out fixes. If you are unable to build (or
don't want to) for any reason, and the nightly keeps getting stale
source for another couple of days, please let me know.

-Rahul

[1] http://svn.apache.org/viewvc?view=rev&rev=544613
[2] http://shale.apache.org/building.html


> Mario
>
> -----Original Message-----
> From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com]
> Sent: 5 giugno 2007 22.02
> To: user@shale.apache.org
> Subject: Re: Problem with subdialogs
>
> On 6/5/07, mario.buonopane@accenture.com
<ma...@accenture.com>
> wrote:
> > I have some problem with subdialogs using shale1.1.0-snapshot
(22/05).
> >
> <snip/>
>
> Could you try the 20070605 build from here [1] (or try building
> yourself). I've made a change few minutes ago.
>
> -Rahul
>
> [1] http://people.apache.org/builds/shale/nightly/
>


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the original.  Any other use of the email by you is prohibited.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

RE: Problem with subdialogs

Posted by ma...@accenture.com.
Rahul, I have tried your fix but when I execute the dialog B I receive
the following error:

Cannot find transition 'avanti' for state 'Exit' of dialog 'Test dialogo
B': java.lang.IllegalStateException: Cannot find transition 'avanti' for
state 'Exit' of dialog 'Test dialogo B'

This is the dialog config file:

  <dialog name="Test dialogo B" start="Pagina A">
                        
    <view name="Pagina A" viewId="/test_dialogo_b/pagina_a.jsp">
      <transition outcome="avanti" target="Pagina B"/>
      <transition outcome="indietro" target="Exit"/>
    </view>
    
    <view name="Pagina B" viewId="/test_dialogo_b/pagina_b.jsp">
      <transition outcome="avanti" target="Pagina C"/>
      <transition outcome="indietro" target="Pagina A"/>
    </view>

    <view name="Pagina C" viewId="/test_dialogo_b/pagina_c.jsp">
      <transition outcome="avanti" target="Exit"/>
      <transition outcome="indietro" target="Pagina B"/>
    </view>

    <end name="Exit" viewId="/home/home.jsp"/>
                    
    
  </dialog>


Mario 

-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] 
Sent: 6 giugno 2007 19.07
To: user@shale.apache.org
Subject: Re: Problem with subdialogs

On 6/6/07, mario.buonopane@accenture.com <ma...@accenture.com>
wrote:
> Rahul, I've tried shale-framework-20070606.zip because there isn't
> shale-framework-20070605.zip but seems that the problem is not
resolved.
> what would have to be changed?
>
<snip/>

For whatever reason, the above zip did not pick up the change I
mentioned. If you dig in to the source files in that zip, you will see
that the source does not include r544613 [1].

Building [2] from source is almost always going to be more expeditious
for immediately testing out fixes. If you are unable to build (or
don't want to) for any reason, and the nightly keeps getting stale
source for another couple of days, please let me know.

-Rahul

[1] http://svn.apache.org/viewvc?view=rev&rev=544613
[2] http://shale.apache.org/building.html


> Mario
>
> -----Original Message-----
> From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com]
> Sent: 5 giugno 2007 22.02
> To: user@shale.apache.org
> Subject: Re: Problem with subdialogs
>
> On 6/5/07, mario.buonopane@accenture.com
<ma...@accenture.com>
> wrote:
> > I have some problem with subdialogs using shale1.1.0-snapshot
(22/05).
> >
> <snip/>
>
> Could you try the 20070605 build from here [1] (or try building
> yourself). I've made a change few minutes ago.
>
> -Rahul
>
> [1] http://people.apache.org/builds/shale/nightly/
>


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: Problem with subdialogs

Posted by Rahul Akolkar <ra...@gmail.com>.
On 6/6/07, mario.buonopane@accenture.com <ma...@accenture.com> wrote:
> Rahul, I've tried shale-framework-20070606.zip because there isn't
> shale-framework-20070605.zip but seems that the problem is not resolved.
> what would have to be changed?
>
<snip/>

For whatever reason, the above zip did not pick up the change I
mentioned. If you dig in to the source files in that zip, you will see
that the source does not include r544613 [1].

Building [2] from source is almost always going to be more expeditious
for immediately testing out fixes. If you are unable to build (or
don't want to) for any reason, and the nightly keeps getting stale
source for another couple of days, please let me know.

-Rahul

[1] http://svn.apache.org/viewvc?view=rev&rev=544613
[2] http://shale.apache.org/building.html


> Mario
>
> -----Original Message-----
> From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com]
> Sent: 5 giugno 2007 22.02
> To: user@shale.apache.org
> Subject: Re: Problem with subdialogs
>
> On 6/5/07, mario.buonopane@accenture.com <ma...@accenture.com>
> wrote:
> > I have some problem with subdialogs using shale1.1.0-snapshot (22/05).
> >
> <snip/>
>
> Could you try the 20070605 build from here [1] (or try building
> yourself). I've made a change few minutes ago.
>
> -Rahul
>
> [1] http://people.apache.org/builds/shale/nightly/
>

RE: Problem with subdialogs

Posted by ma...@accenture.com.
Rahul, I've tried shale-framework-20070606.zip because there isn't
shale-framework-20070605.zip but seems that the problem is not resolved.
what would have to be changed?

Mario  

-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] 
Sent: 5 giugno 2007 22.02
To: user@shale.apache.org
Subject: Re: Problem with subdialogs

On 6/5/07, mario.buonopane@accenture.com <ma...@accenture.com>
wrote:
> I have some problem with subdialogs using shale1.1.0-snapshot (22/05).
>
<snip/>

Could you try the 20070605 build from here [1] (or try building
yourself). I've made a change few minutes ago.

-Rahul

[1] http://people.apache.org/builds/shale/nightly/


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: Problem with subdialogs

Posted by Rahul Akolkar <ra...@gmail.com>.
On 6/5/07, mario.buonopane@accenture.com <ma...@accenture.com> wrote:
> I have some problem with subdialogs using shale1.1.0-snapshot (22/05).
>
<snip/>

Could you try the 20070605 build from here [1] (or try building
yourself). I've made a change few minutes ago.

-Rahul

[1] http://people.apache.org/builds/shale/nightly/

RE: Problem with subdialogs

Posted by ma...@accenture.com.
I have tried to set end state of dialog B without setting viewId. On
shale internet site there is this sentence:

"If no view identifier was configured (meaning that the parent dialog
will be responsible for rendering the response to the current request),
simply return the logical outcome that caused this EndState to be
selected"

This does not resolve the problem because the application continue to
state to test_dialogo_b/pagina_c.jsp (last view of dialog B). If I call
the dialog B not in subdialog, I expect that at the end of dialog B
shale will call the outcome "avanti" (last transition outcome) but does
not happens! Analyzing the code of
org.apache.shale.dialog.faces.DialogNavigationHandler this is the point
called in end state transition:
            dcontext.advance(context, outcome);
            if (log.isDebugEnabled()) {
                log.debug("Advancing dialog '"
                          + dcontext.getName() + "' for FacesContext '"
                          + context + "' with navigation to viewId '"
                          + context.getViewRoot().getViewId() + "'");
            }

dcontext.advance does not call any view (I did not configure) and does
not call any outcome.... may be, in case of viewId not setted, should
call:
                original.handleNavigation(context, fromAction, outcome);
?
???

Mario



-----Original Message-----
From: mario.buonopane@accenture.com
[mailto:mario.buonopane@accenture.com] 
Sent: 5 giugno 2007 14.43
To: user@shale.apache.org
Subject: Problem with subdialogs

I have some problem with subdialogs using shale1.1.0-snapshot (22/05). 

The first problem is:

 

I have a dialog B with following this configuration:

  <dialog name="Test dialogo B" start="Pagina A">

                        

    <view name="Pagina A" viewId="/test_dialogo_b/pagina_a.jsp">

      <transition outcome="avanti" target="Pagina B"/>

      <transition outcome="indietro" target="Exit"/>

    </view>

    

    <view name="Pagina B" viewId="/test_dialogo_b/pagina_b.jsp">

      <transition outcome="avanti" target="Pagina C"/>

      <transition outcome="indietro" target="Pagina A"/>

    </view>

 

    <view name="Pagina C" viewId="/test_dialogo_b/pagina_c.jsp">

      <transition outcome="avanti" target="Exit"/>

      <transition outcome="indietro" target="Pagina B"/>

    </view>

 

    <end name="Exit" viewId="/home/home.jsp"/>

                        

  </dialog>

When I run this dialog not how subdialog I need this dialog end showing
"/home/home.jsp". 

I also need to call this dialog like subdialog of the following dialog
C:

  <dialog name="Test dialogo C" start="Pagina A">

                        

    <view name="Pagina A" viewId="/test_dialogo_a/pagina_a.jsp">

      <transition outcome="avanti" target="Invoca dialogo B"/>

      <transition outcome="indietro" target="Exit"/>

    </view>

    

    <view name="Pagina B" viewId="/test_dialogo_a/pagina_b.jsp">

      <transition outcome="avanti" target="Pagina C"/>

      <transition outcome="indietro" target="Pagina A"/>

    </view>

 

    <view name="Pagina C" viewId="/test_dialogo_a/pagina_c.jsp">

      <transition outcome="avanti" target="Exit"/>

      <transition outcome="indietro" target="Pagina B"/>

    </view>

 

    <subdialog name="Invoca dialogo B" dialogName="Test dialogo B">

      <transition     outcome="avanti"

                       target="Pagina B"/>

      <transition     outcome="indietro"

                       target="Pagina A"/>

    </subdialog>

 

    <end name="Exit" viewId="/home/home.jsp"/>

                        

  </dialog>

 

The problem is that when the subdialog B ends, shale does not show
/test_dialogo_a/pagina_b.jsp but show "/home/home.jsp" .

 

When I use old shale 1.0.3 does work correctly.

 

The second problem is that I'm using the "data" property of
DialogContext to store some information but when start subdialog B, the
getData of DialogContext return an HashMap (not my class).

 

Please help me.....

 

Mario 



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.