I am facing issue with p:dialog box
i am showing dialog box when ever on mouse over the graphic image and also i am calling f:ajax listener to call backing bean method
<h:graphicImage id="red" onmouseover="dialog.show();"
url="/images/icons/redIcon.png">
<f:ajax event="mouseover" execute="@this" update="overNameInfo" rendered="overNameInfo" listener="#{backingbean.setSelectedOverInfo}" />
<f:attribute name="insured" value="#{insured}" />
</h:graphicImage>
"overNameInfo " is the id of dialog box..
but it is showing dialog popup but it is not updating the dialog box..
but i required to update the dialog box values
please help me on this issue...
P:dialog updation issue
Hi,
if i use render in f:ajax i am getting following exception
javax.faces.FacesException: <f:ajax> contains an unknown id 'overNameInfo' - cannot locate it in the context of the component red
<h:graphicImage id="red" onmouseover="dialog.show();"
url="/images/icons/redIcon.png">
<f:ajax event="mouseover" execute="@this" update="overNameInfo" render="overNameInfo" listener="#{backingbean.setSelectedOverInfo}" />
<f:attribute name="insured" value="#{insured}" />
</h:graphicImage>
if i use render in f:ajax i am getting following exception
javax.faces.FacesException: <f:ajax> contains an unknown id 'overNameInfo' - cannot locate it in the context of the component red
<h:graphicImage id="red" onmouseover="dialog.show();"
url="/images/icons/redIcon.png">
<f:ajax event="mouseover" execute="@this" update="overNameInfo" render="overNameInfo" listener="#{backingbean.setSelectedOverInfo}" />
<f:attribute name="insured" value="#{insured}" />
</h:graphicImage>
You may be thinking about p:ajax instead of f:ajax
Remember to update element INSIDE your dialog. Pseudo code :
Scenario:
- user does an action (clicks a button for example)
- dialog.show() is fired
- request/response
- dialog is ubdated and is hidden as default again
Even if update happens before dialog.show(), updating component inside dialog is still a good idea - for me this works better.
Remember to update element INSIDE your dialog. Pseudo code :
Code: Select all
<form>
<dialog>
<panel>
Update this
<panel>
</dialog>
<form>
- user does an action (clicks a button for example)
- dialog.show() is fired
- request/response
- dialog is ubdated and is hidden as default again
Even if update happens before dialog.show(), updating component inside dialog is still a good idea - for me this works better.
-
- Information
-
Who is online
Users browsing this forum: Majestic-12 [Bot] and 32 guests