FireFox 3.5缓存的JSF问题,wyciwyg://前缀 [英] JSF problem with FireFox 3.5 caching, wyciwyg:// prefix

查看:97
本文介绍了FireFox 3.5缓存的JSF问题,wyciwyg://前缀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是JSF的新手,我的简单JSF应用程序有问题.我在WebLogic 10.3.2(11g)上使用Facelets和Richfaces.该应用程序实际上是3页:

A<-> B<-> C

其中中间箭头表示导航规则.导航是通过 a4j:commandButtons 执行的.问题出在Firefox 3.5中,当我从B单击到C时,我得到的URL是从 wyciwig://开始的.更详细地,起始网址为:

http://localhost:7001/myapp/index.faces

从B导航到C时获得的网址是:

wyciwyg://20/ http://localhost:7001/myapp/index.faces

在Google搜索中,我看到wyciwig是WhatYouCacheIsWhatYouGet,因此问题可能与缓存有关.在这个方向上,我做了两件事:

A.我添加了以下元标记:

<meta http-equiv="Pragma" content="No-cache"/>
<meta http-equiv="Cache-Control" content="no-store,No-cache,must-revalidate,post-check=0,pre-check=0,max-age=0"/>
<meta http-equiv="Expires" content="-1"/>

B.按照建议这里.

不幸的是,问题仍然存在.

另一件事可能是相关的,由于某种原因,我的导航不会更改浏览器地址栏中显示的网址.当我将鼠标悬停在a4j:commandButtons上时,状态栏中显示的链接始终是

http://localhost:7001/myapp/index.faces#

问题如下:

  1. 为什么会出现此 wyciwyg://20/前缀,我该如何克服?
  2. 在页面之间导航时如何更改URL?这会使后退按钮"起作用吗?

干杯!

更新1:这些人此处(葡萄牙语文字)表示,将所有a4j:commandLink替换为a4j:htmlCommandLink即可解决此问题.我做到了,他们是对的.我一直不明白原因.

解决方案

实际上,答案很简单,并在RichFaces FAQ中进行了解释,建议您仔细阅读!

Ajax组件不是为页面导航而设计的,以这种方式使用时将不起作用.

请参见 http://community.jboss.org/wiki/CommonAjaxRequestsProblems#navigation

a4j:htmlCommandLink起作用的原因是它实际上不是ajax组件,而是普通的旧HTML链接标记.

希望可以帮助您解释事情.

I am new to JSF and have a problem with my simple JSF application. I use Facelets and Richfaces on WebLogic 10.3.2 (11g). The application is essentially 3 pages:

A <--> B <--> C

where the intermediate arrows denote navigation rules. The navigation is performed through a4j:commandButtons The problem is in Firefox 3.5, when I click from B to C, I get a url starting from wyciwig://. In more detail, the starting url is:

http://localhost:7001/myapp/index.faces

and the url I get when I navigate from B to C is this:

wyciwyg://20/http://localhost:7001/myapp/index.faces

From a Google search I saw that wyciwig is WhatYouCacheIsWhatYouGet, so the issue is probably related to caching. In that direction, I did two things:

A. I added the following meta tags:

<meta http-equiv="Pragma" content="No-cache"/>
<meta http-equiv="Cache-Control" content="no-store,No-cache,must-revalidate,post-check=0,pre-check=0,max-age=0"/>
<meta http-equiv="Expires" content="-1"/>

B. I added a PhaseListener to add HTML header tags, as suggested here.

Unfortunately, the problem persists.

Another thing that could be related is that for some reason my navigation does not change the url that appears in the address bar of the browser. The links that appear in the status bar when I hover the mouse over the a4j:commandButtons is always

http://localhost:7001/myapp/index.faces#

So the questions are the following:

  1. Why does this wyciwyg://20/ prefix appear, and how can I overcome this?
  2. What can I do to change the url when navigating from page to page? Will this make the "Back button work"?

Cheers!

UPDATE 1: These guys here (text in Portuguese) say that replacing all a4j:commandLink with a4j:htmlCommandLink fixes the problem. I did, and they are right. I don't understand the reason, through.

解决方案

Actually the answer is fairly simple and explained in the RichFaces FAQ which I suggest you read thoroughly!

The ajax components are not designed for page navigation and will not work when used this way.

See http://community.jboss.org/wiki/CommonAjaxRequestsProblems#navigation

The reason a4j:htmlCommandLink works is that it is not really an ajax component but a plain old HTML link tag.

Hope that helps explain things.

这篇关于FireFox 3.5缓存的JSF问题,wyciwyg://前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆