Author: craigmcc Date: Tue Jan 23 22:21:43 2007 New Revision: 499277 URL: http://svn.apache.org/viewvc?view=rev&rev=499277 Log: Update the examples to reflect the convenience methods that are available from 1.1 onwards, while still documenting (for now) the 1.0.x approach.
SHALE-397 Modified: shale/framework/trunk/shale-dialog/src/site/xdoc/index.xml Modified: shale/framework/trunk/shale-dialog/src/site/xdoc/index.xml URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-dialog/src/site/xdoc/index.xml?view=diff&rev=499277&r1=499276&r2=499277 ============================================================================== --- shale/framework/trunk/shale-dialog/src/site/xdoc/index.xml (original) +++ shale/framework/trunk/shale-dialog/src/site/xdoc/index.xml Tue Jan 23 22:21:43 2007 @@ -280,6 +280,17 @@ <source> FacesContext context = FacesContext.getCurrentInstance(); + DialogContextManager manager = + DialogHelper.getDialogContextManager(context); + DialogContext dcontext = manager.create(context, "foo"); + dcontext.start(); +</source> + + <p>(If you are using a version of Shale before 1.1, you have to work + slightly harder to achieve the same effect:)</p> + +<source> + FacesContext context = FacesContext.getCurrentInstance(); DialogContextManager manager = (DialogContextManager) context.getApplication().getVariableResolver(). resolveVariable(context, Constants.MANAGER_BEAN); @@ -359,15 +370,14 @@ that name, like this:</p> <source> - <h:inputText id="name" ... value="#{dialog.data.name}"/> + <h:inputText id="name" ... value="#{dialogScope.name}"/> </source> - <p>(As of version 1.1, the preferred approach will be this:)</p> + <p>(Prior to version 1.1, use this approach instead:)</p> <source> - <h:inputText id="name" ... value="#{dialogScope.name}"/> + <h:inputText id="name" ... value="#{dialog.data.name}"/> </source> - <p>As an extra value-added feature, if the object you store as the <code>data</code> property is of a class that implements the