r5272 - in branches/bmas-staging/ui/gwt: src/org/freemedsoftware/gwt/client/widget www/resources/interface

0 views
Skip to first unread message

subve...@svn.freemedsoftware.org

unread,
Mar 11, 2010, 11:50:01 AM3/11/10
to freemed-d...@googlegroups.com
Author: sadnan
Date: 2010-03-11 11:50:01 -0500 (Thu, 11 Mar 2010)
New Revision: 5272

Added:
branches/bmas-staging/ui/gwt/www/resources/interface/Holiday.module.xml
Modified:
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SimpleUIBuilder.java
Log:
Resolved Bug #99.

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SimpleUIBuilder.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SimpleUIBuilder.java 2010-03-11 16:36:59 UTC (rev 5271)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SimpleUIBuilder.java 2010-03-11 16:50:01 UTC (rev 5272)
@@ -54,7 +54,7 @@
protected static String helpprefix = "Help for";

public enum WidgetType {
- MODULE, MODULE_MULTIPLE, USER_MULTIPLE, TEXT, SELECT, PATIENT, COLOR, DELIMITER, DRUG, MULTILIST,SINGLELIST
+ MODULE, MODULE_MULTIPLE, USER_MULTIPLE, TEXT, SELECT, PATIENT, COLOR, DELIMITER, DRUG, MULTILIST,SINGLELIST,DATE
};

/**
@@ -187,7 +187,9 @@
}
} else if (type.equals(WidgetType.PATIENT)) {
w = new PatientWidget();
- } else if (type.equals(WidgetType.COLOR)) {
+ }else if (type.equals(WidgetType.DATE)) {
+ w = new CustomDatePicker();
+ }else if (type.equals(WidgetType.COLOR)) {
w = new CustomColorPicker();
} else if (type.equals(WidgetType.DRUG)) {
w = new DrugWidget();
@@ -297,6 +299,9 @@
if (widget.compareToIgnoreCase("SINGLELIST") == 0) {
return WidgetType.SINGLELIST;
}
+ if (widget.compareToIgnoreCase("DATE") == 0) {
+ return WidgetType.DATE;
+ }
// By default, return text

JsonUtil.debug("SimpleUIBuilder: Unimplemented type '" + widget
@@ -374,6 +379,9 @@
if (w instanceof CustomMulltiSelectListBox) {
return ((CustomMulltiSelectListBox) w).getWidgetValue();
}
+ if (w instanceof CustomDatePicker) {
+ return ((CustomDatePicker) w).getTextBox().getText();
+ }
return null;
}

@@ -418,6 +426,9 @@
if (w instanceof CustomMulltiSelectListBox) {
((CustomMulltiSelectListBox) w).populateMultiList(value);
}
+ if (w instanceof CustomDatePicker) {
+ ((CustomDatePicker) w).getTextBox().setText(value);
+ }
}
}

Added: branches/bmas-staging/ui/gwt/www/resources/interface/Holiday.module.xml
===================================================================
--- branches/bmas-staging/ui/gwt/www/resources/interface/Holiday.module.xml (rev 0)
+++ branches/bmas-staging/ui/gwt/www/resources/interface/Holiday.module.xml 2010-03-11 16:50:01 UTC (rev 5272)
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+ $Id$
+
+ Authors:
+ Jeff Buchbinder <je...@freemedsoftware.org>
+
+ FreeMED Electronic Medical Record and Practice Management System
+ Copyright (C) 1999-2010 FreeMED Software Foundation
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ -->
+<SimpleUIBuilder module="Holiday">
+ <Elements>
+ <Element field="hol_date" title="Date" type="DATE" options="20" display="1" />
+ <Element field="hol_descrip" title="Description" type="TEXT" options="20" display="1" />
+ </Elements>
+</SimpleUIBuilder>


Property changes on: branches/bmas-staging/ui/gwt/www/resources/interface/Holiday.module.xml
___________________________________________________________________
Added: svn:keywords
+ Id Author Date Revision
Added: svn:eol-style
+ native

Reply all
Reply to author
Forward
0 new messages