我试图让ZeroClipboard API工作,但看起来setText()函数没有任何效果.
提供的简单示例> here <工作正常,但是当我想以编程方式调用setText()时,它不起作用.能帮帮我,这段代码有什么问题?
<html>
<body>
<script type="text/javascript" src="/resources/ZeroClipboard.js"></script>
<button id="my-button">Copy to Clipboard</button>
<script language="JavaScript">
ZeroClipboard.setDefaults({ moviePath: "/resources/ZeroClipboard.swf" });
var clip = new ZeroClipboard( $("button#my-button") );
clip.setText('This will be copied into the clipboard'); //this should be in my clipboard, but it is not...
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
非常感谢
我正在尝试制作一个指令模板多行.这可能吗?
myApp.directive('myDir', function() {
return {
restrict: 'E',
template: '<div>
|Hello,
|{{test}}!
|</div>'
};
});
Run Code Online (Sandbox Code Playgroud)
这是一个小提琴,看看我的意思.
我想在导出表格时将PDF页面大小更改为A4 格局.但无论我做什么,我都无法完成它.
这是我的代码:
<h:commandLink title="Export">
<p:graphicImage value="/resources/theme-main/images/export/pdf.png"
style="border:0"/>
<p:dataExporter target="myTable" type="pdf" fileName="name"
encoding="windows-1250" preProcessor="#{fileExportProcessor.preProcessPDF}"/>
</h:commandLink>
Run Code Online (Sandbox Code Playgroud)
托管bean的方法非常简单:
public void preProcessPDF(Object document) {
Document pdf = (Document) document;
pdf.open();
pdf.setPageSize(PageSize.A4.rotate());
}
Run Code Online (Sandbox Code Playgroud)
我也尝试将尺寸设置为A0或我的自定义尺寸,只是为了看它工作,但没有改变...... PDF导出仅在A4纵向模式下导出.
你能帮我,怎么做这个工作(A4横向模式)?
我想用带有多行标题的标签制作手风琴组件.
是否可以在手风琴组件中制作标题页多行?
我使用的是最新的Primefaces 4.0-rc1.
谢谢