struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <>
Subject [Shale] some questions regarding dialogs and subdialogs
Date Tue, 11 Jul 2006 13:14:29 GMT
Hello all,

Recently, i decided to play a bit with shale.  I began to write some 
tests jsp to play with it. I came across various problems/interrogations:

1) considering the following dialog configuration, and the following 
jsps  (see bottom of email), i am supposed to have one main dialog, with 
a button starting a subdialog to edit one specific value.
More precisely, the backing bean of  main dialog is a property bean 
which gets modified by the subdialog. I can start the dialog ok with  
<h:commandLink value="start..." action="dialog:Test Dialog"/>, i enter 
the subdialog when i click the appropriate button in testMain.faces but 
i am stuck in the subdialog. I never return from it. Did i miss 
something in the way a dialog is supposed to end? There is no message in 
console to help and in subdialog i click on an action which's outcome 
should direct to and <exit ...> of subdialog.

2) I plan in an app to have the following structure:
- have a 'main' dialog present some forms to the user to edit a bean X 
containing some properties.
- amongst properties of X there is a collection of element Y, those 
elements are complex beans which will be presented read-only
- i need, next to those elements Y to put a button starting a subdialog 
for edition of Y.
- How do i pass the element Y as a parameter to the subdialog for edition?
- Will the content of my main dialog be preserved during the run of 

3) While testing, i noticed if i start dialog A by clicking on an action 
'dialog:A', enter a subdialog B, redeploy the webapp, click again on 
action 'dialog:A', i get exceptions in console telling me "You have 
requested a transition outcome named "dialog:A" from a state named 
"xxxx" in a dialog named "B", but no transition definition can be 
found.  Double check the spelling of the transition outcome name. To 
circumvent this problem i need to remove my jsessionId cookie, reload 
the page containg the link to action, and the i can start dialog:A. Why 
isn't dialog:xxxx always assumed as an attempt to start a new dialog and 
drop currently running one?

4) is there a way to start a dialog process or create a link to a JSF 
page without ressorting to a <h:form><h:commandLink... construction? 
(like http://........?action=dialog:xxxx or 
http://..../userDetails.faces?username=xxxx), all this to prevent the 
use of javascript when possible and allow the sending of direct link to 
some JSF content by email.

David Delbecq

  "-//Apache Software Foundation//DTD Shale Dialog Configuration 1.0//EN"


    <dialog name="Test Dialog" start="Edit Values">
        <view name="Edit Values" viewId="/rmi/testMain.jsp">
            <transition outcome="main" target="Edit Values"/>
            <transition outcome="sub" target="Edit Subdialog"/>           
        <subdialog name="Edit Subdialog" dialogName="Sub Dialog">
            <transition outcome="done" target="Edit Values"/>
    <dialog name="Sub Dialog" start="Edit Sub">
        <view name="Edit Sub" viewId="/rmi/testSub.jsp">
            <transition outcome="done" target="Exit" />
        <end name="Exit" viewId="/rmi/testMain.jsp"/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<%@ taglib uri="" prefix="f"%>
<%@ taglib uri="" prefix="h"%>
     <h:form id="testForm">
        <h:outputText value="val1:"/>
         <h:inputText value="#{testBean.val1}"/>
         <h:inputText value="#{testBean.val2}"/>
         <h:inputText value="#{testBean.val3}"/>
        <h:commandButton action="main" value="Say Hello"/><br/>
        <h:outputText value="#{}"/>
        <h:commandButton action="sub" value="Edit..."/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<%@ taglib uri="" prefix="f"%>
<%@ taglib uri="" prefix="h"%>
     <h:form id="testForm">
        <h:outputText value="sub value:"/>
         <h:inputText value="#{}"/>
        <h:commandButton action="done" value="finish"/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message