]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - ria/components/SimpleUserNatureImpl.js
1 qx
.Class
.define("org.argeo.security.ria.components.SimpleUserNatureImpl", {
2 extend
: qx
.ui
.container
.Composite
,
3 implement
: [org
.argeo
.security
.ria
.components
.INaturePane
],
5 "modified" : "qx.event.type.Event"
22 construct : function(){
24 var grid
= new qx
.ui
.layout
.Grid(5,5);
26 grid
.setColumnFlex(0,1);
27 grid
.setColumnAlign(0,"right", "middle");
28 grid
.setColumnFlex(1,3);
30 this.mailField
= new qx
.ui
.form
.TextField();
31 this.fNameField
= new qx
.ui
.form
.TextField();
32 this.nameField
= new qx
.ui
.form
.TextField();
34 var labels
= ["Email", "First Name", "Last Name"];
36 "email" : this.mailField
,
37 "firstName": this.fNameField
,
38 "lastName" : this.nameField
41 for(var i
=0;i
<labels
.length
;i
++){
42 this.add(new qx
.ui
.basic
.Label(labels
[i
]), {row
:i
,column
:0});
45 for(var key
in this.fields
){
46 this.fields
[key
].addListener("changeValue", function(e
){this.fireEvent("modified");}, this);
47 this.add(this.fields
[key
], {row
:j
,column
:1});
54 getContainer : function(){
57 getNatureLabel : function(){
60 setData : function(dataMap
, format
){
61 this.setNatureUuid(dataMap
["uuid"]);
62 this.setNatureType(dataMap
["type"]);
63 for(var key
in this.fields
){
65 this.fields
[key
].setValue(dataMap
[key
]);
68 this.setDataMap(dataMap
);
70 getData : function(format
){
71 var dataMap
= this.getDataMap();
72 for(var key
in dataMap
){
74 dataMap
[key
] = this.fields
[key
].getValue();
77 this.setDataMap(dataMap
);
80 validate : function(){return true;}