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

Reply via email to