Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F947681
Data.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
Data.js
View Options
/*
Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if
(
!
dojo
.
_hasResource
[
"dojox.wire.ml.Data"
]){
dojo
.
_hasResource
[
"dojox.wire.ml.Data"
]
=
true
;
dojo
.
provide
(
"dojox.wire.ml.Data"
);
dojo
.
provide
(
"dojox.wire.ml.DataProperty"
);
dojo
.
require
(
"dijit._Widget"
);
dojo
.
require
(
"dijit._Container"
);
dojo
.
require
(
"dojox.wire.ml.util"
);
dojo
.
declare
(
"dojox.wire.ml.Data"
,[
dijit
.
_Widget
,
dijit
.
_Container
],{
startup
:
function
(){
this
.
_initializeProperties
();
},
_initializeProperties
:
function
(
_1
){
if
(
!
this
.
_properties
||
_1
){
this
.
_properties
=
{};
}
var
_2
=
this
.
getChildren
();
for
(
var
i
in
_2
){
var
_3
=
_2
[
i
];
if
((
_3
instanceof
dojox
.
wire
.
ml
.
DataProperty
)
&&
_3
.
name
){
this
.
setPropertyValue
(
_3
.
name
,
_3
.
getValue
());
}
}
},
getPropertyValue
:
function
(
_4
){
return
this
.
_properties
[
_4
];
},
setPropertyValue
:
function
(
_5
,
_6
){
this
.
_properties
[
_5
]
=
_6
;
}});
dojo
.
declare
(
"dojox.wire.ml.DataProperty"
,[
dijit
.
_Widget
,
dijit
.
_Container
],{
name
:
""
,
type
:
""
,
value
:
""
,
_getValueAttr
:
function
(){
return
this
.
getValue
();
},
getValue
:
function
(){
var
_7
=
this
.
value
;
if
(
this
.
type
){
if
(
this
.
type
==
"number"
){
_7
=
parseInt
(
_7
);
}
else
{
if
(
this
.
type
==
"boolean"
){
_7
=
(
_7
==
"true"
);
}
else
{
if
(
this
.
type
==
"array"
){
_7
=
[];
var
_8
=
this
.
getChildren
();
for
(
var
i
in
_8
){
var
_9
=
_8
[
i
];
if
(
_9
instanceof
dojox
.
wire
.
ml
.
DataProperty
){
_7
.
push
(
_9
.
getValue
());
}
}
}
else
{
if
(
this
.
type
==
"object"
){
_7
=
{};
var
_8
=
this
.
getChildren
();
for
(
var
i
in
_8
){
var
_9
=
_8
[
i
];
if
((
_9
instanceof
dojox
.
wire
.
ml
.
DataProperty
)
&&
_9
.
name
){
_7
[
_9
.
name
]
=
_9
.
getValue
();
}
}
}
else
{
if
(
this
.
type
==
"element"
){
_7
=
new
dojox
.
wire
.
ml
.
XmlElement
(
_7
);
var
_8
=
this
.
getChildren
();
for
(
var
i
in
_8
){
var
_9
=
_8
[
i
];
if
((
_9
instanceof
dojox
.
wire
.
ml
.
DataProperty
)
&&
_9
.
name
){
_7
.
setPropertyValue
(
_9
.
name
,
_9
.
getValue
());
}
}
}
}
}
}
}
}
return
_7
;
}});
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 12:53 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24242
Default Alt Text
Data.js (1 KB)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment