JSF 杂项

h:comandButton action执行之后刷新整个页面。

a4j:commandButton action执行之后,只刷新reRender中指明的。

commandLink 也是这样的。如果不想刷新整个页面,就应该用a4j:commandXXX

 

 

h:commandButton 在localhost 测试用到 a4j:support 时, 需要多点击一次(点击页面任何位置)才可以提交订单。

而发布到服务器,没有这个问题。

 

=========================================

用于再h:table 中得到行号

 

在Bean中:

private UIData table;

    public UIData getTable() {
        return table;
    }

    public void setTable(UIData table) {
        this.table = table;
    }

 

JSP中:

<rich:dataTable id="id_searchResultTable" value="#{SearchHandler.resultList}" var="service" binding="#{SearchHandler.table}"
            rows="#{SearchHandler.rows}" first="#{SearchHandler.first}"
            style="width : 600px; border-style: none ; ">

    <rich:column colspan="2" style="border-style: none ;">

             <span class="sn"><h:outputText value="#{SearchHandler.table.rowIndex +1}"/></span>

             ......

 

 

==============================================

 慎用binding在rich:datatable中  binding="#{OrderHandler.table}"

 

    private UIDataTable table;
    public UIDataTable getTable() {
        return table;
    }
    public void setTable(UIDataTable table) {
        this.table = table;
    }

 

    这样会引起当F5刷新一次页面后,数据发生变化、而页面呈现不更新的问题。

  (本来这句话也没有用处。不刷新,工作正常,原因还不知道。)

 

 

JSF 标签中的rendered 如果为false。 这次标签不会被生产view的tree中,这样当rendered为true后,对该标签的改动也不会被更新于ManagedBean中。  解决的办法: 控制标签的style,style="#{workerItem.editable?'':'display:none'}"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值