- 浏览: 502486 次
- 性别:
- 来自: 深圳
-
文章分类
- 全部博客 (185)
- job (15)
- linux/windows/unix/bash/shell (31)
- JAVA/J2EE/spring/hibernate/struts (30)
- VC/C++ (48)
- mysql/postgresql (6)
- php/jsp/asp/pear (1)
- FMS/flex/openlaszlo/red5/openmeetings (34)
- apache/tomcat/ftp/svn (6)
- xen/vm/Hadoop/cloudcompute (6)
- visual studio/eclipse/zendstudi/ant (8)
- others (1)
- windows异常处理 __try __except (1)
- (1)
- matlab (4)
- android (0)
最新评论
-
hongzhounlfd:
很透彻,很详细
依赖注入和控制反转 -
jefferyqjy:
谢谢~言简意赅~很明了!
依赖注入和控制反转 -
elderbrother:
太好了,谢谢
依赖注入和控制反转 -
east_zyd_zhao:
终于搞明白了
依赖注入和控制反转 -
Dremeng:
完美,一看就懂理解透彻
依赖注入和控制反转
openlaszlo组件的简单介绍 收藏
在写laszlo程序时,我们会用到很多组件的,官方的组建库lz componets,提供了绝大多数的应用。
这些组件是由一些简单的对象组合而成。
下面就通过几个简单的组建使用来了解下lz components:
<canvas width="100%" height="500">
<silverstyle name="silvercolors"/>
<greenstyle name="greencolors"/>
<bluestyle name="bluecolors"/>
<view id="s1" x="20" y="20">
<view layout="spacing:20">
<text>Choose a style to change colors...</text>
<view name="stylechooser" layout="axis:x; spacing:4">
<text>Style:</text>
<combobox width="120" editable="false">
<handler name="onselect">
var colorchoice = this.getText();
canvas[colorchoice+'colors'].setAttribute("isdefault", true);
</handler>
<!-- handler 为"选择事件"的处理-->
<textlistitem text="silver"/>
<textlistitem text="green"/>
<textlistitem text="blue" selected="true"/>
</combobox>
</view>
<!--
stylechooser视图定义了一个颜色组合框。选择颜色的时候,程序的各个组件颜色改变。
-->
<tabslider width="250" height="200">
<tabelement text="holiday cheer" selected="true">
<radiogroup>
<radiobutton text="peace on earth"/>
<radiobutton text="joy to the world"/>
<radiobutton text="happy new year"/>
</radiogroup>
</tabelement>
<tabelement text="housewares">
<simplelayout axis="y" spacing="10"/>
<checkbox text="stainless steel"/>
<checkbox text="glassware"/>
</tabelement>
<tabelement text="isotope">
<text multiline="true" width="${immediateparent.width}">
Atoms that have the same number of protons but a different number of neutrons. They are atoms of the same element that have different masses. The isotope number is the number of protons plus the number of neutrons.
</text>
</tabelement>
</tabslider>
<tabs>
<tabpane>Insecticides
<simplelayout spacing="10" inset="10"/>
<radiogroup>
<radiobutton>Yes, I want to know more</radiobutton>
<radiobutton>No, I prefer to remain blissfully unaware</radiobutton>
<radiobutton>Please tell my neighbor, who may tell me</radiobutton>
</radiogroup>
</tabpane>
<tabpane text="Subliminal">
<button height="22">Submit</button>
</tabpane>
</tabs>
</view>
</canvas>
以上程序主要写了三个组件,程序的演示效果如下:
openlaszlo组件分为"form components" 和 "general components,它们没有本质的区别。只是对<form>有所区别,比如说<button>可以放在<view>和<windows>里,但是不能包含在<form>中。
在lzx程序中<form>标签很少使用。
下面介绍使用组件的三种方法:
1、使用lzx的标签
<canvas height="100" width="100%">
<simplelayout axis="x" spacing="10" inset="10"/>
<list shownitems="4">
<textlistitem>judy</textlistitem>
<textlistitem>ann</textlistitem>
<textlistitem>betsy</textlistitem>
<textlistitem>sarah</textlistitem>
<textlistitem>carol</textlistitem>
<textlistitem>danah</textlistitem>
</list>
<radiogroup>
<radiobutton text="apple"/>
<radiobutton text="cherry"/>
<radiobutton text="key lime"/>
</radiogroup>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->使用标签的时候,里面没有脚本<script>2、使用脚本函数(script api)实际使用中,我们要动态的生成一些空间,或则处理组件的事件。<canvas height="150" width="100%">
<simplelayout/>
<!--Here is a button created with a tag -->
<button name="framitz" width="50">
hello
</button>
<script>
//And here is a button created with using script
var b = new lz.button();
b.setAttribute("width", 50);
b.setAttribute("height", 50);
</script>
</canvas>
<canvas height="150" width="100%">
<simplelayout spacing="10"/>
<list id="mylist" height="82">
<textlistitem text="something"/>
</list>
<view layout="axis:x;spacing:4">
<edittext id="item" text="new item"/>
<button text="Add" isdefault="true">
<handler name="onclick">
mylist.addItem(item.getText());
</handler>
</button>
</view>
</canvas>
3、使用数据驱动(data-driven componets)或则说数据绑定(databinding)
<canvas height="200" width="100%">
<dataset name="mydata" src="resources/contacts.xml" request="true"/>
<simplelayout axis="x" spacing="10" inset="10"/>
<list id="a">
<textlistitem datapath="mydata:/contacts/person" text="$path{'@firstname'}"/>
</list>
<list id="b" shownitems="4">
<textlistitem datapath="mydata:/contacts/person" text="$path{'@firstname'}"/>
</list>
</canvas>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/zclmoon/archive/2009/11/30/4907557.aspx
发表评论
-
Red5安装和配置
2011-02-24 10:23 4080Red5安装和配置参考网页:http://www.cahblo ... -
基于Moodle平台的网站调查报告
2011-02-24 10:18 2608基于Moodle平台的网站调查报告 网站举例: ² 西南 ... -
moodle插件模块功能汇总
2011-02-24 10:03 5086Moodle官方提供654种插件或者模块moodle.org ... -
moodle 一体包安装手册(window)
2011-02-24 09:55 1310见附件 -
moodle中上传文件大小控制
2011-02-24 09:51 1880第一步:修改在php4下POST文件大小的限制1.编修php. ... -
linux下面安装moodle
2011-02-24 09:50 21111. 安装moodle运行 ... -
OpenMeetings安装文档
2011-02-15 11:09 2622OpenMeetings 是一个多语言可定制的视频会议和协作系 ... -
Compilation and Execution (openlaszlo)
2010-11-22 11:02 10897. Compilation and Exe ... -
Combining Tags and Script in LZX Programs (openlaszlo)
2010-11-22 11:01 13476. Combining Tags and ... -
Data Access, Manipulation, and Binding (openlaszlo)
2010-11-22 10:33 12285. Data Access, Manipu ... -
Constraints(openlaszlo)
2010-11-22 10:18 1153constraint 表示可变的变量赋值形式 In LZX, ... -
Events and Methods (openlaszlo)
2010-11-22 09:35 14003. Events,Methods ,han ... -
Dimdim&Moodle安装配置文档节选
2010-11-09 17:40 2596Dimdim&Moodle安装配置文档节选 ... -
Red5如何响应rmpt的请求,中间涉及哪些关键类?
2010-11-01 15:35 1589Red5如何响应rmpt的请求,中间涉及哪些关键类? 响应请 ... -
red5的eclipse插件和用法
2010-10-30 20:56 1169参见http://www.red5.org/wiki/Red5 ... -
red5集群分析
2010-10-28 19:42 50641. 边(Edge ): 1. 边的主要作用是管理连接,并可以 ... -
red5源代码分析
2010-10-26 08:59 3888Red5如何响应rmpt的请求 ... -
创建第一个red5程序
2010-10-25 15:33 21741.下载最新版本的RED5 http://osflash.or ... -
openlaszlo中多媒体组件介绍
2010-10-14 15:50 1149在openlaszlo中我们可以处理图像,音视频等媒体文件。详 ... -
创建一个简单的openlaszlo程序
2010-10-14 15:49 1107前面说到过openlaszlo程序是一组xml格式和javas ...
相关推荐
对于不想深入学习OpenLaszlo的“懒人”,以下是一些简单的改造步骤,可以帮助快速定制OpenMeetings: 1. **移除邮件注册**:在服务器端的Usermanagement类中,将`this.registerUserInit()`方法的最后一个参数true改...
4. **易用性**:通过简单的API接口,开发者可以轻松地在OpenLaszlo应用中插入和控制MathML元素,无需深入理解MathML的底层细节。 5. **示例与文档**:`LaszloMathML`通常会包含示例代码和详细的使用文档,帮助...
Flex 4还强化了数据绑定机制,使得UI组件与数据源之间的同步变得更加简单直观。数据绑定允许开发者只需定义数据模型和视图之间的关系,而无需编写大量手动更新代码。 此外,本书可能还会涵盖Flex与各种服务器技术...
它可能包括一组自定义的JSF组件,这些组件能够理解和渲染由OpenLaszlo发送的请求,或者是一套API,使得在OpenLaszlo应用中调用JSF服务变得更加简单。 提供的教程文件“tutoriel JSF laszlo part 1.pdf”和...
- **易于部署**: 由于客户端基于Web技术实现,使得系统部署更加简单快捷。 - **高度可定制化**: 开源特性允许开发者根据具体需求对系统进行修改和扩展。 - **低成本**: 作为开源项目,OpenMeetings可以免费使用,...
此外,他们还需要熟悉网络管理概念,如SNMP(简单网络管理协议)和TCP/IP协议栈,以便正确理解和利用拓扑数据。如果项目使用了特定的框架或库,如Apache Flex或OpenLaszlo,那么理解这些库的工作原理也很重要。 ...