Author: rahul
Date: Fri Jan 26 11:57:51 2007
New Revision: 500318
URL: http://svn.apache.org/viewvc?view=rev&rev=500318
Log:
DialogHelper.getDialogData() convenience methods
SHALE-401
Modified:
shale/framework/trunk/shale-dialog/src/main/java/org/apache/shale/dialog/DialogHelper.java
Modified:
shale/framework/trunk/shale-dialog/src/main/java/org/apache/shale/dialog/DialogHelper.java
URL:
http://svn.apache.org/viewvc/shale/framework/trunk/shale-dialog/src/main/java/org/apache/shale/dialog/DialogHelper.java?view=diff&rev=500318&r1=500317&r2=500318
==============================================================================
---
shale/framework/trunk/shale-dialog/src/main/java/org/apache/shale/dialog/DialogHelper.java
(original)
+++
shale/framework/trunk/shale-dialog/src/main/java/org/apache/shale/dialog/DialogHelper.java
Fri Jan 26 11:57:51 2007
@@ -35,6 +35,35 @@
;
}
+ /**
+ * <p>Return the <code>data</code> property of the active
+ * [EMAIL PROTECTED] DialogContext} instance for the current request, if
any;
+ * otherwise, return <code>null</code>.</p>
+ */
+ public static Object getDialogData() {
+
+ return getDialogData(FacesContext.getCurrentInstance());
+
+ }
+
+
+ /**
+ * <p>Return the <code>data</code> property of the active
+ * [EMAIL PROTECTED] DialogContext} instance for the current request, if
any;
+ * otherwise, return <code>null</code>.</p>
+ *
+ * @param context <code>FacesContext</code> for the current request
+ */
+ public static Object getDialogData(FacesContext context) {
+
+ DialogContext dcontext = getDialogContext(context);
+ if (dcontext != null) {
+ return dcontext.getData();
+ } else {
+ return null;
+ }
+
+ }
/**
* <p>Return the active [EMAIL PROTECTED] DialogContext} instance for the
current