summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorning.zhang2012-07-06 03:52:07 (EDT)
committer dgao2012-07-06 03:52:07 (EDT)
commit33978c3baa469a492715dbe6d0f1414ebea86f47 (patch)
tree337a73139fe0a9cf2c34c8e0da7bb2953b112363
parenta557258dee1775464c94ccbe9ac4ab49673b263e (diff)
downloadorg.eclipse.birt-33978c3baa469a492715dbe6d0f1414ebea86f47.zip
org.eclipse.birt-33978c3baa469a492715dbe6d0f1414ebea86f47.tar.gz
org.eclipse.birt-33978c3baa469a492715dbe6d0f1414ebea86f47.tar.bz2
Need to check the data type when populating the format list.
-rw-r--r--UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatDateTimeAdapter.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatDateTimeAdapter.java b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatDateTimeAdapter.java
index eb169bd..274b91f 100644
--- a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatDateTimeAdapter.java
+++ b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatDateTimeAdapter.java
@@ -143,8 +143,22 @@ public final class FormatDateTimeAdapter extends FormatAdapter
{
if ( categoryChoiceArray == null )
{
- categoryChoiceArray = getChoiceArray( DateTimeFormatValue.FORMAT_VALUE_STRUCT,
- DateTimeFormatValue.CATEGORY_MEMBER );
+ switch (type)
+ {
+ case FormatBuilder.DATETIME:
+ default:
+ categoryChoiceArray = getChoiceArray( DateTimeFormatValue.FORMAT_VALUE_STRUCT,
+ DateTimeFormatValue.CATEGORY_MEMBER );
+ break;
+ case FormatBuilder.DATE:
+ categoryChoiceArray = getChoiceArray( DateFormatValue.FORMAT_VALUE_STRUCT,
+ DateFormatValue.CATEGORY_MEMBER );
+ break;
+ case FormatBuilder.TIME:
+ categoryChoiceArray = getChoiceArray( TimeFormatValue.FORMAT_VALUE_STRUCT,
+ TimeFormatValue.CATEGORY_MEMBER );
+ break;
+ }
}
return categoryChoiceArray;
}