p:dialog with table inside UI problem

Post Reply
hmoussa
Posts: 5
Joined: 12 Nov 2018, 10:53

04 Dec 2018, 15:00

when i put a table inside the dialog the dialog width expanded unexpectedly and also when drag the dialogue just expand the width and not moving the dialog

hmoussa
Posts: 5
Joined: 12 Nov 2018, 10:53

05 Dec 2018, 11:58

this is my dialog:

Code: Select all

<p:dialog dir="#{guestPreferences.orientationRTL ? 'rtl' : 'ltr'}" id="newReqDlg" widgetVar="newReqDlg" responsive="true"  resizable="false"  showEffect="clip" hideEffect="explode">
                <div class="card card-w-title">
                    <h:form >
                        <h1>#{uiBundle.dlg_header}</h1>
                        <p:tabView >

                            <p:tab title="#{uiBundle.tab_header}">
                                <h:panelGrid columns="2">
                                    <p:outputLabel value="#{uiBundle.name}"></p:outputLabel>
                                    <p:inputText disabled="true" ></p:inputText>

                                    <p:outputLabel value="#{uiBundle.id}"></p:outputLabel>
                                    <p:inputText disabled="true" ></p:inputText>

                                    <p:outputLabel value="#{uiBundle.dept}"></p:outputLabel>
                                    <p:inputText disabled="true" ></p:inputText>

                                    <p:outputLabel value="#{uiBundle.email}"></p:outputLabel>
                                    <p:inputText disabled="true" ></p:inputText>

                                    <p:outputLabel value="#{uiBundle.ext}"></p:outputLabel>
                                    <p:inputText disabled="true" ></p:inputText>
                                </h:panelGrid>
                            </p:tab>

                            <p:tab title="xxxx" >
                                <h:panelGrid columns="2" id="requestTabGrid">
                                    <p:outputLabel value="H1"></p:outputLabel>

                                    <p:calendar id="dateId" value="" showOn="button" pattern="dd/MM/yyyy" >
                                        <p:ajax event="dateSelect" listener="" update="" />
                                    </p:calendar>

                                    <p:outputLabel value="o1"></p:outputLabel>
                                    <p:inputText disabled="true" value=""></p:inputText>

                                    <p:outputLabel value="o2"></p:outputLabel>                                            
                                    <p:inputTextarea cols="100" rows="4" value=""></p:inputTextarea>

                                    <span></span>
                                    <p:dataTable id="ss" var="item" value="#{myBean.myList}" selection="#{myBean.mySelection}" rowKey="#{item.id}" 
                                                 style="margin-bottom:0; table-layout: fixed">
                                        <f:facet name="header">
                                            table header
                                        </f:facet>
                                        <p:ajax event="rowSelect" listener="#{myBean.onSelect}" update="" />
                                        <p:column selectionMode="multiple" style="width:16px;text-align:center"/>
                                        <p:column headerText="sequence">
                                            <h:outputText value="#{item.sequence}" />
                                        </p:column>
                                        <p:column headerText="#{uiBundle.data1}}">
                                            <h:outputText value="#{item.data1}" />
                                        </p:column>
                                        <p:column headerText="#{uiBundle.data2}">
                                            <h:outputText value="#{item.data2}" />
                                        </p:column>
                                        <p:column headerText="#{uiBundle.data3}">
                                            <h:outputText value="#{item.data3}" />
                                        </p:column>
                                        
                                        <p:summaryRow>
                                            <p:column colspan="3" style="text-align:right">
                                                <h:outputText value="Total:" />
                                            </p:column>
                                            <p:column>
                                                <h:outputText value="#{myBean.total}">                                                   
                                                </h:outputText>
                                            </p:column>
                                        </p:summaryRow>

                                    </p:dataTable>
                                </h:panelGrid>
                            </p:tab>                                                                        
                        </p:tabView>
                    </h:form>
                </div>   
            </p:dialog>

when open this dialog i have a problem with the width and with dragging the dialog
but when remove the xxxx the dialog display correctly

also the "rowSelect" event not executed
Wait for you support

aragorn
Posts: 3747
Joined: 29 Jun 2013, 12:38

05 Dec 2018, 15:06

when open this dialog i have a problem with the width and with dragging the dialog
but when remove the xxxx the dialog display correctly
I think this issue is not a Layout or Theme. Could you please try it without Barcelona Layout and Theme? You can create a Github issue on https://github.com/primefaces/primefaces
also the "rowSelect" event not executed
I couldn't replicate it. I think you have nested h:form element. Could you please try it after removing h:form from dialog component?

Best Regards,

Post Reply

Return to “Barcelona - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest