-1

I am facing a strange issue and I am not able to find the cause. I have a dataGrid in which I placed a commandButton.

<p:dataGrid paginator="true"
    value="#{bean.searchedSystem}" var="searchedSystemObj"  
    columns="1" rows="6"
    WidgetVar="CadModel" pageLinks="5" filteredValue="" >

<p:commandButton value="More Details..."
    action="#{bean.viewMoreDetails(searchedSystemObj)}"
    oncompleted="PF('testDialog').show()"/> 

On action the bean is called, but it doesn't seem like the oncomplete is getting invoked.

<p:dialog header="Modal Dialog" widgetVar="testDialog"
    modal="true" height="600" width="900">

All these are in a single form. Any idea why ?

Solved: I have solved this issue. Thank you guys for helping me. The problem was due to the "processing image..."(like a please wait while processing stuff).. It was not processed properly for each action. So i fixed it and then the dialog box started to appear.

Harish Aravind
  • 55
  • 1
  • 11

1 Answers1

0

My first idea is that the attribute is oncomplete and not oncompleted.

Also, you have to take care of lowercase/uppercase problems, as JSF is XML, which is case-sensitive. I see a WidgetVar in your code but the correct attribute is widgetVar.


All these are in a single form.

Then my second idea is to put a <h:form> inside the <p:dialog> and make sure you don't nest forms.

See https://stackoverflow.com/a/10579708/1528942 for a rational.

Community
  • 1
  • 1
Grégoire C
  • 1,361
  • 1
  • 13
  • 32
  • the higher case WidgetVar is for dataGrid, but the problem is onclick commandButton a specified action should be performed and oncomplete the dialog should appear, but in my case the dialog is not appearing – Harish Aravind Mar 06 '15 at 15:48
  • Ok I edited my answer to give you another idea. :) Do you get any error in the browser's console? – Grégoire C Mar 06 '15 at 16:07