seam 框架 出现浏览器后退按钮问题
2013-02-21 18:30
381 查看
页面
<td>
<h:selectOneRadio
value="#{gmRecoverGPGoods.isGood}">
<f:selectItem
itemLabel="#{messages['page.select.pet.pet']}" itemValue="0"
/>
<f:selectItem
itemLabel="#{messages['page.table.tableheader.mail.goodsString']}"
itemValue="1" />
<a:support
event="onclick" action="#{gmRecoverGPGoods.choose}"
reRender="recover"></a:support>
</h:selectOneRadio>
</td>
<table>
<tr>
<td>
<h:inputText
id = "searchName" value="#{gmRecoverGPGoods.inputName}"
></h:inputText>
</td>
<td><a:commandButton
id="searchGoods"
value="#{messages['page.button.searchGoodOrPet']}"
reRender="recover"
action="#{gmRecoverGPGoods.goodSearch()}"></a:commandButton> </td>
</tr>
</table>
action代码
public void goodSearch() {
if (isGood == 1) {
list = new
ArrayList<SelectItem>();
for
(SelectItem goods : allGoodsName) {
if
(goods.getLabel().contains(inputName)) {
list.add(goods);
}
}
} else {
list = new
ArrayList<SelectItem>();
for
(SelectItem pets : allPetsName) {
if
(pets.getLabel().contains(inputName)) {
list.add(pets);
}
}
}
}
而不能用
public String goodSearch() {
if (isGood == 1) {
list = new
ArrayList<SelectItem>();
for
(SelectItem goods : allGoodsName) {
if
(goods.getLabel().contains(inputName)) {
list.add(goods);
}
}
} else {
list = new
ArrayList<SelectItem>();
for
(SelectItem pets : allPetsName) {
if
(pets.getLabel().contains(inputName)) {
list.add(pets);
}
}
}
return “/test.xhtml”;
}
因为ajax异步标签 后退时只认识 return 如果没有return就返回最开始那个页面 就很好 !!
<td>
<h:selectOneRadio
value="#{gmRecoverGPGoods.isGood}">
<f:selectItem
itemLabel="#{messages['page.select.pet.pet']}" itemValue="0"
/>
<f:selectItem
itemLabel="#{messages['page.table.tableheader.mail.goodsString']}"
itemValue="1" />
<a:support
event="onclick" action="#{gmRecoverGPGoods.choose}"
reRender="recover"></a:support>
</h:selectOneRadio>
</td>
<table>
<tr>
<td>
<h:inputText
id = "searchName" value="#{gmRecoverGPGoods.inputName}"
></h:inputText>
</td>
<td><a:commandButton
id="searchGoods"
value="#{messages['page.button.searchGoodOrPet']}"
reRender="recover"
action="#{gmRecoverGPGoods.goodSearch()}"></a:commandButton> </td>
</tr>
</table>
action代码
public void goodSearch() {
if (isGood == 1) {
list = new
ArrayList<SelectItem>();
for
(SelectItem goods : allGoodsName) {
if
(goods.getLabel().contains(inputName)) {
list.add(goods);
}
}
} else {
list = new
ArrayList<SelectItem>();
for
(SelectItem pets : allPetsName) {
if
(pets.getLabel().contains(inputName)) {
list.add(pets);
}
}
}
}
而不能用
public String goodSearch() {
if (isGood == 1) {
list = new
ArrayList<SelectItem>();
for
(SelectItem goods : allGoodsName) {
if
(goods.getLabel().contains(inputName)) {
list.add(goods);
}
}
} else {
list = new
ArrayList<SelectItem>();
for
(SelectItem pets : allPetsName) {
if
(pets.getLabel().contains(inputName)) {
list.add(pets);
}
}
}
return “/test.xhtml”;
}
因为ajax异步标签 后退时只认识 return 如果没有return就返回最开始那个页面 就很好 !!
相关文章推荐
- 避免用户按浏览器中的后退按钮出现的问题
- 空格&nbsp在不同浏览器中显示距离不一致问题解决方法
- 空格&nbsp在不同浏览器中显示距离不一致问题解决方法
- 空格 在不同浏览器中显示距离不一致问题解决方法
- Jsoup解析HTML中 出现乱码问题解决办法
- 点浏览器"后退"按钮后强制刷新页面
- 空格 在不同浏览器中显示距离不一致问题解决方法
- 禁用页面缓存。目的:用户登录后退出。点击浏览器后退按钮造成的问题
- Qt&nbsp;编译过程,出现的问题和解决方…
- 空格 在不同浏览器中显示距离不一致问题解决方法
- 解决点击浏览器后退按钮页面过期的问题
- 空格 在不同浏览器中显示距离不一致问题解决方法
- 空格&nbsp在不同浏览器中显示距离不一致问题解决方法
- Chrome firefox ie等浏览器空格( )兼容问题
- 空格&nbsp在不同浏览器中显示距离不一致问题解决方法
- 浏览器后退按钮问题
- 解决html中 在不同浏览器中占位大小不统一的问题
- 图书管理系统&nbsp;出现的问题
- 禁用页面缓存。目的:用户登录后退出。点击浏览器后退按钮造成的问题
- 关于&nbsp;空格实体在最新的IE、Firefox和Google Chrome浏览器中解析宽度不一致问题的解决