1

I have popup window that is used in few tabs and popup uses some params from tabs such as dialogContainerId and dialogId.

I have "select item" menu and "refresh items" button near it. So when user click button i want to get new item list for select menu. Select menu works as expected, but "refresh" button is not. I'm sure that listener on refresh button works well and can see updated item list if new items appear in database. But select menu doesn't update. It seems like render attribute on f:ajax doesn't work or there is id mismatch. I checked page and found nothing. Ids look well. I tried constant ids, and tried to move id to parent tag, but always have got same result - select menu is not re-rendered.

Does any one have ideas or suggestions? Thanks in advance.

Here is source page:

<ui:composition>
    <h:panelGroup id="#{dialogContainerId}">
        <rich:popupPanel id="#{dialogId}" autosized="true" modal="true" domElementAttachment="parent">
            <h:panelGrid id="#{dialogId}commonControls" columns="3">

                <!-- more input tags -->

                <h:outputLabel value="Create dialog" />
                <h:panelGroup>
                    <rich:select id="#{dialogId}expenseItem" value="#{expenseItemInstanceBean.selectedExpenseItemId}"
                                 selectFirst="true" required="true" requiredMessage="Required">
                        <f:selectItems value="#{expenseItemInstanceBean.expenseItemsAsList}"
                                       var="item" itemValue="#{item.id}" itemLabel="#{item.name}" />
                    </rich:select>
                    <h:graphicImage library="icons" name="refresh_16x16.gif" title="Refresh">
                        <f:ajax event="click" execute="@this" render="#{dialogId}expenseItem"
                                listener="#{expenseItemInstanceBean.refreshExpenseItems()}" />
                    </h:graphicImage>
                </h:panelGroup>
                <h:messages for="#{dialogId}expenseItem" />

                <!-- more input tags -->

            </h:panelGrid>

            <!-- button tags tags -->

        </rich:popupPanel>
    </h:panelGroup>
</ui:composition>

And part of rendered html page:

<td>
    <div class="rf-sel" id="idForm:wrkSchedDialogexpenseItem">

        <!-- here is my list and additional autogenerated jsf tags -->

    </div>
    <img id="idForm:j_idt42" src="/logistics-web/javax.faces.resource refresh_16x16.gif.xhtml?ln=icons"
         alt="" style="vertical-align: bottom" title="Refresh"
         onclick="mojarra.ab(this,event,'click','@this','idForm:wrkSchedDialogexpenseItem');return false"
         class="linkLikeCursor" name="idForm:j_idt42"/>ev
</td>
4

0 回答 0