p:dialog + form = footer is not displayed

Locked
pfroy
Posts: 49
Joined: 09 Sep 2015, 18:20

13 Jan 2016, 05:25

Hi,

I'm getting this weird problem when trying to put dialog buttons inside dialog footer. As soon as I put the footer inside the form, the footer is not displayed anymore.

Is this related to Volt template or it is a Primefaces bug?

Best regards,
Pierre

Footer is not displayed

Code: Select all

<p:dialog id="ActivityCreateDlg" widgetVar="ActivityCreateDialog" modal="true" resizable="false" 
		  appendTo="@(body)" header="Nouvelle activité" closeOnEscape="true"
		  width="40%">
	<h:form id="ActivityCreateForm">
		<h:panelGroup id="display">
			<p:focus/>
			<p:messages showSummary="false" showDetail="true" autoUpdate="true" closable="true" />
			<div class="Container100 Responsive100 NoIndent">
				<p:panelGrid columns="1" rendered="#{workActivityMasterController.selected != null}" styleClass="ui-panelgrid-blank" layout="grid">
					<p:outputLabel value="Numéro" for="sequenceNo"/>
					<p:inputText id="sequenceNo" value="#{workActivityMasterController.selected.sequenceNo}" disabled="true" style="width: 98%;"/>
                                        ...
				</p:panelGrid>
			</div>
			<f:facet name="footer">
				<p:link value="#{bundle.CancelAction}" onclick="PF('ActivityCreateDialog').hide()"/>
			</f:facet>
		</h:panelGroup>
	</h:form>
</p:dialog>
Footer is displayed but buttons are outside the form

Code: Select all

<p:dialog id="ActivityCreateDlg" widgetVar="ActivityCreateDialog" modal="true" resizable="false" 
		  appendTo="@(body)" header="Nouvelle activité" closeOnEscape="true"
		  width="40%">
	<h:form id="ActivityCreateForm">
		<h:panelGroup id="display">
			<p:focus/>
			<p:messages showSummary="false" showDetail="true" autoUpdate="true" closable="true" />
			<div class="Container100 Responsive100 NoIndent">
				<p:panelGrid columns="1" rendered="#{workActivityMasterController.selected != null}" styleClass="ui-panelgrid-blank" layout="grid">
					<p:outputLabel value="Numéro" for="sequenceNo"/>
					<p:inputText id="sequenceNo" value="#{workActivityMasterController.selected.sequenceNo}" disabled="true" style="width: 98%;"/>
                                        ...
				</p:panelGrid>
			</div>
		</h:panelGroup>
	</h:form>
	<f:facet name="footer">
		<p:link value="#{bundle.CancelAction}" onclick="PF('ActivityCreateDialog').hide()"/>
	</f:facet>
</p:dialog>
Primefaces 12.0
Jakarta Faces 4.0
Oracle JDK 17
Payara 6.2023.6
Jakarta EE 10.0

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

13 Jan 2016, 10:57

It is an expected behavior. The footer name of f:facet should be within p:dialog(not within form or other compenents or html elements in Dialog)

pfroy
Posts: 49
Joined: 09 Sep 2015, 18:20

14 Jan 2016, 05:47

I'm not sure to understand why it is that. Simple case is to include commandButton (actions) into the form so they can fire actions/listeners. When I put those buttons outside the form it makes the action buttons more complicated to code, right? I had all sorts of bugs with the dialog since. When I have errors in my backing bean, the form freeze, it doesn't close when I'm clicking the hide button.

Here's the buttons code:

Code: Select all

<f:facet name="footer">
	<p:commandButton actionListener="#{workActivityMasterController.saveNew}" update=":WorkActivityMasterCreateForm:display,:WorkOrderMasterListForm:datalist" oncomplete="PF('WorkActivityMasterCreateDialog').hide()" value="#{bundle.SaveAction}" icon="#{icon.SaveAction}" styleClass="GreenButton MarRight10"/>
	<p:commandButton value="#{bundle.CloseAction}" oncomplete="PF('WorkActivityMasterCreateDialog').hide()" update=":WorkActivityMasterCreateForm:display" process="@this" immediate="true" resetValues="true"/>
</f:facet>
Thanks
Primefaces 12.0
Jakarta Faces 4.0
Oracle JDK 17
Payara 6.2023.6
Jakarta EE 10.0

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

18 Jan 2016, 09:49

can you please try this issue without Volt? I think it isn't a Layout or Theme issue. Please use PrimeFaces core forum. If you think it is a bug in Primefaces, please create a github issue.

pfroy
Posts: 49
Joined: 09 Sep 2015, 18:20

22 Jan 2016, 18:19

aragorn wrote:can you please try this issue without Volt? I think it isn't a Layout or Theme issue. Please use PrimeFaces core forum. If you think it is a bug in Primefaces, please create a github issue.
Hi aragorn,

I did as you asked. You can read my post at that address: http://forum.primefaces.org/viewtopic.php?f=3&t=44276.

Have a nice day
Primefaces 12.0
Jakarta Faces 4.0
Oracle JDK 17
Payara 6.2023.6
Jakarta EE 10.0

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

25 Jan 2016, 12:11

Thanks a lot, Pfroy ;)

Locked

Return to “Volt”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests