[英]How access to content of dynamic page in JSF?
I have a xhtml file that i initialized it with ui:repeat tag in realtime.all tags of this page placed under ui:fragment tag. 我有一个xhtml文件,我使用ui:repeat标签实时初始化它。该页面的所有标签都放在ui:fragment标签下。
<edges>
<ui:repeat value="#{graphInfoBean.edges}" var="edge" varStatus="indexVar">
<edge id="#{indexVar.index}" source="#{edge.source}" target="#{edge.target}"
weight="#{edge.weight}">
<attvalues>
<attvalue for="weight" value="#{edge.weight}"></attvalue>
</attvalues>
</edge>
</ui:repeat>
When i access to this page and save it as xml in realtime, the tags in xml file saved are empty while it is initialized and everything is working properly. 当我访问此页面并将其实时保存为xml时,保存的xml文件中的标记在初始化时是空的,一切正常。
<edges>
</edges>
How can i access to content of this xhtml file and save it on disk? 如何访问此xhtml文件的内容并将其保存在磁盘上?
think that we have 2 page (A&B) so we want to download the page B (this page initialized dynamically by ManagedBean)through page A 认为我们有2页(A和B)所以我们要下载页面B(这个页面由ManagedBean动态初始化)到页面A
Thanks in advance, 提前致谢,
function process(){
url = "text.html"
var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4){
alert(xhr.responseText)
}
}
xhr.send();
}
Sorry i cant post comments, maybe you can use this. 对不起,我无法发表评论,也许你可以使用这个。
take a look at this thread: get full html source code of page through ajax request through javascript 看一下这个帖子: 通过javascript获取ajax请求的完整html源代码页面
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.