source: EDIS/trunk/java/tracking-ui-core/src/main/flex/gov/va/med/edp/business/config/SaveConfigColorsDelegate.as@ 1227

Last change on this file since 1227 was 1227, checked in by George Lilly, 13 years ago

initial load of EDIS 1.0

File size: 1.1 KB
Line 
1/* SaveConfigColorsDelegate.as */
2
3package gov.va.med.edp.business.config
4{
5 import gov.va.med.edp.business.ResponderChainingDelegate;
6
7 import mx.rpc.IResponder;
8
9 public class SaveConfigColorsDelegate extends ResponderChainingDelegate
10 {
11 public function SaveConfigColorsDelegate(responder:IResponder)
12 {
13 super(responder, "saveColorConfig");
14 }
15
16 public function saveConfigColors(area: int, colorXML: XML, colorToken: String): void
17 {
18 var params:Object = new Object();
19 var i: int = 0;
20 params.area = area;
21 params.colorToken = colorToken;
22 for each (var elem: XML in colorXML.children()) {
23 if (elem.@type == "bed") continue; // bed colors saved from room/bed screen
24 if (elem.@type == "staff") continue; // staff colors saved from staff screen
25 i++;
26 params["xml-"+i] = '<colors id="' + elem.@id + '" type="' + elem.@type + '" >';
27 for each (var match: XML in elem.children()) {
28 i++;
29 params["xml-"+i] = match.toXMLString();
30 }
31 i++;
32 params["xml-"+i] = '</colors>';
33 }
34
35 send(params);
36 }
37 }
38}
Note: See TracBrowser for help on using the repository browser.