p : treenode를 사용하여 xhtml 페이지로 리디렉션하려고하고 있으며 onNodeSelect 메소드에서 externalContext.redirect를 사용하고있어 Firefox 및 Chrome에서는 완벽하지만 IE에서는 작동하지 않습니다. 9, 11 및 가장자리는 내가 시도한 것입니다).IE window.open의 JSF ExternalContext.redirect 무한 루프
IE에서 트리 노드를 클릭하면 페이지가 계속 동일한 페이지로 리디렉션됩니다.
내 응용 프로그램이 window.open에서 열립니다. 응용 프로그램에 직접 URL을 사용하면이 리디렉션 루핑 문제가 나타나지 않습니다.이 문제는 IE에서만 window.open에서 내 응용 프로그램을 열 때 발생합니다. . 여기
는<script type="text/javascript">
var wnd
function launch(url, app){
if(!wnd || wnd.closed){
wnd = window.open(url, app, 'height=700,width=1350,toolbar=no,location=no,menubar=no,status=no,titlebar=no,resizable=yes,scrollbars=yes');
}
wnd.focus();
return false;
}
</script>
이 에서, NavigationBean 그냥 콩 NavigationTree를 백업
<p:tree id="navTree" name="navTree" value="#{navTree.root}" var="node" selectionMode="single"
selection="#{navTree.selectedNode}" >
<p:treeNode expandedIcon="fa fa-folder-open" collapsedIcon="fa fa-folder" styleClass="navTree">
<h:outputText value="#{node.name}" title="#{node.name}"/>
</p:treeNode>
<p:treeNode type="document" icon="fa fa-file-text-o fileColor" styleClass="navTree">
<h:outputText value="#{node.name}" title="#{node.name}"/>
</p:treeNode>
<p:ajax event="select" listener="#{navTree.onNodeSelect}" />
</p:tree>
내 탐색을 인쇄 내 XHTML이다
자바 스크립트은 window.open 로직
<div class="floatLeft" style="padding: 0 5px; width: 75px;">
<div class="autoCenter center">
<a href="javascript:void(0)" onClick="launch('http://pc055265.my.search.app:8080/UpgradeParis/faces/login/ssologin.xhtml?app=IHW', 'PARIS-IHW')">
<img id="j_idt18:2:j_idt20" src="/cta-landing/javax.faces.resource/paris_IHW_50x46.png.jsf?ln=images" alt="PARISIHW" title="PARIS - IHW" />
</a>
PARIS-IHW
</div>
</div>
출시입니다 문자열 속성 인 name과 link를 가진 pojo. onNodeSelect 방법 내부 디버그 문을 추가, 제어 번만 방법에
@Named("navTree")
@SessionScoped
public class NavigationTree implements Serializable {
private TreeNode root;
private TreeNode selectedNode;
@Inject
private NavigationService service;
@PostConstruct
public void init() {
root = service.createParisTree();
}
public void setService(NavigationService service) {
this.service = service;
}
public TreeNode getRoot() {
return root;
}
public TreeNode getSelectedNode() {
return selectedNode;
}
public void setSelectedNode(TreeNode selectedNode) {
this.selectedNode = selectedNode;
}
public void onNodeSelect(NodeSelectEvent event) throws IOException{
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
StringBuffer url = new StringBuffer(ec.getRequestContextPath()+ "/");
TreeNode currentNode = event.getTreeNode();
NavigationBean node = (NavigationBean) currentNode.getData();
if(node !=null){
url.append(node.getLink());
}else{
url.append("faces/ui/home.xhtml");
}
ec.redirect(url.toString());
}
}
간다 그리고 내가 탐색을 구축 곳 NavigationService는
public class NavigationService implements Serializable {
public TreeNode createParisTree() {
TreeNode root = new DefaultTreeNode(new NavigationBean("Menu", "root"), null);
TreeNode home = new DefaultTreeNode(new NavigationBean("Home", "faces/ui/home.xhtml"), root);
TreeNode ihw = new DefaultTreeNode(new NavigationBean("IHW", "faces/ui/home.xhtml"), home);
TreeNode nor = new DefaultTreeNode("document",new NavigationBean("RE Search", "faces/ui/ihw/common/facility-search.xhtml"), ihw);
...
}
}
이 내가 함께 재 인쇄 로그에서입니다 deltaspike windowContext.getCurrentWindowId는(), 내가 Mojarr를 사용하여 개발자 도구
00:35:16,932 INFO [stdout] (default task-38) redirectd to :RE Search Page:/ui/ihw/common/facility-search.xhtml?faces-redirect=true CID:-8766
00:35:17,057 INFO [stdout] (default task-39) redirected to :RE Search Page:/ui/ihw/common/facility-search.xhtml?faces-redirect=true CID:382
00:35:17,214 INFO [stdout] (default task-79) redirected to :RE Search Page:/ui/ihw/common/facility-search.xhtml?faces-redirect=true CID:-5368
00:35:17,546 INFO [stdout] (default task-94) redirected to :RE Search Page:/ui/ihw/common/facility-search.xhtml?faces-redirect=true CID:4879
00:35:17,679 INFO [stdout] (default task-103) redirected to :RE Search Page:/ui/ihw/common/facility-search.xhtml?faces-redirect=true CID:-9278
00:35:17,873 INFO [stdout] (default task-124) redirected to :RE Search Page:/ui/ihw/common/facility-search.xhtml?faces-redirect=true CID:9899
00:35:18,004 INFO [stdout] (default task-111) redirected to :RE Search Page:/ui/ihw/common/facility-search.xhtml?faces-redirect=true CID:714
의 모든 자바 스크립트 오류가 표시되지 않습니다 PrimeFaces 6.1, deltaspike 1.7.2, CDI 1.2, Windows 7 & 10, Internet Explorer 9, 11 및 edge가있는 2.2.12-jbossorg-2입니다.
도움을 주시면 대단히 감사하겠습니다. 당신이 결함을보고 싶은 경우