Ok, I understand your point of view. I have two more questions Craig: - Is there a way to know the current dialog name?
- In my version of shale, when I call an outcome not present in the dialog, I receive an Exception (generic). Is there the possibility to receive a specific Exception? (in this way I have the possibility to send a manage the error). Thanks in advance Mario -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig McClanahan Sent: 12 dicembre 2006 19.54 To: [email protected] Subject: Re: How know current State? On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks Craig.... > Is there a way to know the list of transictions name I have configured, > in the dialog, at the current state? (I need this information because if > an outcome is not possible in the current state I want disable the item > of the panelNavigation...otherwise the user receive an Exception If he > click on the item) No, you only know the names of the states. As we have discussed before, I think it's a really bad idea to code your application in terms of the internal details of the dialog engine (i.e. the names of the transitions themselves). You should instead be creating boolean functions that allow you to enable or disable things in terms of the application's structures, not the dialog manager's structures. As a concrete example, assume you have a "details" button that should be enabled only for a user who is a manager. The button itself could be coded something like this: <h:commandButton id="details" ... disabled="#{dialog.data.notManager}"/> and in your data bean class you'd have a method: public boolean isNotManager() { ... } Note that you need not have any knowledge at all that dialogs are being used to manage the conversation ... it's all about thinking in terms of the concepts of your application. For your use case about enabling a link only if a certain page has been reached, I previously responded with an example of how to do that based solely on the fact that you have reached a certain state. It's the same general idea. Regards > Mario Craig 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.
