首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用rich:modalPanel编辑rich:extendedDataTable

使用rich:modalPanel编辑rich:extendedDataTable
EN

Stack Overflow用户
提问于 2011-09-23 18:12:18
回答 1查看 566关注 0票数 0
代码语言:javascript
复制
I have a <code>rich:extendedDataTable</code>.  Each row has a a4j:commandLink  as below.

Table Page:

     <a4j:commandLink     
      id="editlink" oncomplete="#{rich:component('editPanel')}.show()" 
      reRender="editPanel">

    <f:setPropertyActionListener value="#{archive}" 
      target="#{archiveOrderBean.currentOrder}" />

    <f:setPropertyActionListener value="#{row}" 
       target="#{archiveOrderBean.currentRow}" />

    <h:graphicImage value="/images/edit.png" 
       style="border:0;vertical-align: top;" />

    </a4j:commandLink>

单击该链接后,将用所选行的值填充rich:modalPanel。所选行的内容被正确获取,但是当modalpanel中的数据被编辑时,该值不会反映在bean中。

代码语言:javascript
复制
Bean Getter and Setter: 

    <code>public ArchiveOrderModel getCurrentOrder() {
        return currentOrder;
    }

    public void setCurrentOrder(ArchiveOrderModel currentOrder) {
        this.currentOrder = currentOrder;
    }
    </code>

ModalPanel Page : below contents are included in the  <code>rich:modalPanel</code>     and       <code>h:form</code>

    <h:panelGrid columns="1">
                <a4j:outputPanel>
                    <h:panelGrid columns="2">
                        <h:outputText value="Name" />
                        <h:outputLabel value="SL_#{archiveOrderBean.currentOrder.structureId}" />
                        <h:outputText value="Client" />
                        <h:inputText value="#{archiveOrderBean.currentOrder.customer}"  style="width:200px"/>
                        <h:outputText value="DateCreated" />
                        <h:outputText value="#{archiveOrderBean.currentOrder.date}" style="width:200px" />
                        <h:outputText value="Description" />
                        <h:inputText value="#{archiveOrderBean.currentOrder.version}" style="width:200px" />
                         <h:outputText value="Order Desription" />
                        <h:inputText value="#{archiveOrderBean.currentOrder.orderType}" style="width:200px" />
                    </h:panelGrid>
                    <rich:message showSummary="true" showDetail="false" for="price" />
                </a4j:outputPanel>
                <a4j:commandButton value="Update" 
                    action="#{archiveOrderBean.updateStruct}"
                    reRender="auftragListNew"
                    oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" >
                    </a4j:commandButton>
            </h:panelGrid>

有人能帮我解决这个问题吗?我只需要知道如何将modalPanel值更新回bean。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-09-26 18:30:35

问题是a4j:commandButton没有正确地放在h:form中。我现在可以找到更新后的值

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7527407

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档