调用Js函数以设置Composite Component属性

时间:2014-04-22 15:39:21

标签: javascript html composite-component

我有一个复合组件,为了设置其中一个属性,我必须调用一个进行计算的Js函数。我怎么能这样做?

JS功能

function getContWidth() {
             var width = ($("#content_container_wide").css("width"));
             return width;
        };

Comp Component

<comp:carouselComponent id="carousel" title="Carousel images" 
                        images="#{carouselBean.imageList}"
                        height="170" numToDisplay="3" 
                        width="#{document.write(getContWidth())}" />

0 个答案:

没有答案
相关问题