<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="height:100%" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="keywords" content="javascript framework, RIA, SPA, client SOA, linb, jsLinb, RAD, IDE, Web IDE, widgets, javascript OOP, opensource, open-source, Ajax, cross-browser, prototype, web2.0, platform-independent, language-independent" />
<meta name="description" content="Web application created by Visual JS, powered by LINB framework" />
<meta name="copyright" content="hide@address.com" />
<meta http-equiv="imagetoolbar" content="no" />
<style>
.cls1{
border:dashed 2px #0000ff;
}
.cls2{
font-size:14px;
border:solid 1px #444;
margin: 4px;
}
</style>
<title>jsLinb appearance sample -- use getSubNode directly</title>
</head>
<body style="height:100%;overflow:hidden;" scroll="no">
<script type="text/javascript" src="../../../runtime/jsLinb/js/linb-all.js"></script>
<script type="text/javascript">
linb.main(function(){
Class('App', 'linb.Com',{
Instance:{
//Com events
events:{},
iniComponents:function(){
// [[code created by jsLinb UI Builder
var host=this, children=[], append=function(child){children.push(child.get(0))};
append((new linb.UI.List)
.host(host,"list3")
.setItems([{"id":"a", "caption":"itema"}, {"id":"b", "caption":"itemb"}])
.setLeft(40)
.setTop(40)
);
append((new linb.UI.List)
.host(host,"list4")
.setItems([{"id":"a", "caption":"itema"}, {"id":"b", "caption":"itemb"}])
.setLeft(200)
.setTop(40)
);
return children;
// ]]code created by jsLinb UI Builder
}
}
});
(new App).show(function(){
var list=this.list3;
list.getSubNode('ITEMS').css({'border':'dashed 2px #00ff00'});
list.getSubNode('ITEM',true).css({'font-size':'14px', 'border':'solid 1px #ccc','margin':'4px'});
list=this.list4;
list.getSubNode('ITEMS').addClass('cls1');
list.getSubNode('ITEM',true).addClass('cls2');
});
});
</script>
</body>
</html>