5

The text with id=txt is inserted outside the commandlink after rerendering.
And therefore the link is broken. A refresh of the page gets it back.
Could somebody please help?

<h:form id="frm">
    <h:selectOneMenu value="#{myBean.currentId}">
        <f:selectItems value="#{myBean.selectListA}" />
        <a4j:support event="onchange" action="#{myBean.changeSomething}" 
            reRender="priceGroup,idLink" />
    </h:selectOneMenu>
    <h:panelGroup id="priceGroup">
        <a4j:commandLink id="idLink">
            <h:outputText id="txt" value="#{myBean.someValue}" />
        </a4j:commandLink>
    </h:panelGroup>
</h:form>
Andrey
  • 6,526
  • 3
  • 39
  • 58
  • Have you tried to reRender only the panelGroup? `reRender="priceGroup"` – jmrodrigg Dec 05 '12 at 08:35
  • @jmrodrigg Yes, I have; with no success. I have made I workaround for my problem. Instead of ajax rerendering, I put a valueChangeListener on the selectOneMenu and a form submit. Then it works. But I'm still interested in a solution for the actual problem. – user1875961 Dec 05 '12 at 09:57
  • Yes, it's a bit strange because I tried your code (without the `action` tag) and it worked for me. Try adding `ajaxSingle="true"` in the `a4j:support` tag. – jmrodrigg Dec 05 '12 at 10:33
  • 1
    do you really need to set the link text by using a nested `h:outputText`? did you try do this: `` – tt_emrah Jul 18 '14 at 12:36

0 Answers0