|
发表于 2016-12-1 09:49:00
|
显示全部楼层
1.carousel组件的定义
- <div component="$UI/system/components/bootstrap/carousel/carousel"
- class="x-carousel" xid="carousel1" auto="true">
- <ol class="carousel-indicators" xid="ol1"/>
- <div class="x-contents carousel-inner" role="listbox" component="$UI/system/components/justep/contents/contents"
- active="0" slidable="true" wrap="true" swipe="true" routable="false"
- xid="contents1" style="height:300px;"></div>
- </div>
复制代码
2.数据处理
- Model.prototype.wReceiverReceive = function(event) {
- var data = this.comp("bizData1");
- data.setFilter("filter1", data.idColumn + "='" + event.data.row.getID() + "'");
- data.refreshData();
- var carousel = this.comp("carousel1");
- var sphoto = data.getValue("fFJ2");
- if (sphoto != null && sphoto != "" && sphoto != "[]") {
- var imageJson = eval("(" + sphoto + ")");
- if (imageJson.length > 0) {
- for (var i = 0; i < imageJson.length; i++) {
- var fileID = imageJson[i]["fileID"];
- var docPath = imageJson[i]["docPath"];
- var url = DocUtils.InnerUtils.getdocServerAction({
- "docPath" : docPath,
- urlPattern : "/repository/file/view/" + fileID + "/last/content",
- isFormAction : false,
- context : this.getContext()
- });
- carousel.add('<img src="' + url + '"/>');
- }
- }
- }
- };
复制代码
测试没问题,每次打开都会显示多张这条数据的图片
windowDialog的forceRefreshOnOpen设置的是true |
|