3

I have minimized my code to better show you what is not working.

<h:body>
<f:view>
    <h:form id="wbSelectForm">
        <p:commandButton id="viewWorkbenchButton" icon="ui-icon-show"
            title="View Workbench" update=":wbTestPanel"
            actionListener="#{WorkbenchControllerBean.test}">
        </p:commandButton>
    </h:form>

    <p:panel id="wbTestPanel">
            Test: Active Wb: #{WorkbenchControllerBean.number}
    </p:panel>
</f:view>
</h:body>

When i press the commandButton, i would expect that 'wbTestPanel' is being updated, which does somehow NOT happen. I know that because WorkbenchControllerBean.getNumber() is not called.

I am using primefaces 3.5. I already tried differend values for 'process'-attribute as well as putting RequestContext.getCurrentInstance().update("wbTestPanel")in WorkbenchControllerBean.test()-method.

I think that maybe the code is right, but there are any settings in the project or runtime environment (Java 7 + JBoss 7.1.1) that prevent primefaces from updating the other panel. Could you please give me a hint what to search for?

Thanks in advance!

user3178676
  • 31
  • 2
  • 3
  • Which id is your `wbTestPanel` acquiring at client side? Check it using firebug – Aritz Jan 10 '14 at 13:29
  • Sorry guys, i found out that in the html-tag there was a event that throws an exception which did not show up in the logs but prevented the rendering of the page... so it has nothing to do with the 'normal' update-problems. – user3178676 Jan 10 '14 at 14:03
  • As you are new to stackoverflow just some tips. Try to provide everything which can be affecting the code on your question, being it also the minimal version of the code you need to reproduce the error. The ideal thing is to follow [sscce model](http://sscce.org/). – Aritz Jan 10 '14 at 14:06

2 Answers2

0

Are you sure that test() method is invoked? If yes, can you try with following update expression?

update="@([id$=wbTestPanel])"

Otherwise, it maybe the case that test() method is not called because of a validation error. If that is the case, you can inspect it with debug or firebug.

itasyurt
  • 76
  • 4
0

Use : before id


Remember


  1. If you make a dialog.

  2. Before Dialog old form tag should be closed.

  3. Then dialouge content should be placed into another form.

  4. Use update=":dialougeid, :dialougeFormId"

Bryan P
  • 4,142
  • 5
  • 41
  • 60
Ehsaan Israr
  • 589
  • 1
  • 4
  • 14