1 Reply Latest reply on Aug 23, 2013 2:23 PM by bleathem

    Error Richfaces, size reference browser instead popup panel

    l-jis

      Hi,

       

      This is our first Post in this forum, we are developping some portlets in Liferay with richfaces 4.3.2

       

      I have a problem with the size of my table inside the popup panel, the table is taking as reference the size of the browser and not the popup panel's size.

       

      In this simple sample, the popup panel has a tab and inside the tab a table with one row and two columns.

       

      In the first column a table and in the second, a rich panel.

       

      When I open the panel popup from the button, if the size of the table is higher than the popup panel, elements inside the popup panel are not resized, and there are not scroll bar.

       

      The first table is taking the reference of the browser window and not the size og the popup panel.

       

      I post my XHTML code and one screenshot of my problem:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:a4j="http://richfaces.org/a4j"

          xmlns:rich="http://richfaces.org/rich"

          xmlns:lg="http://java.sun.com/jsf/composite/lg"

          xmlns:fn="http://java.sun.com/jsp/jstl/functions">

          <h:commandButton value="Call the popup">

              <rich:componentControl target="popup" operation="show" />

          </h:commandButton>

       

       

          <rich:popupPanel id="popup" modal="true" width="500" height="400"

              resizeable="true" domElementAttachment="form">

              <f:facet name="header">

                  <h:outputText value="Simple popup panel" />

              </f:facet>

              <f:facet name="controls">

                  <h:outputLink value="#"

                      onclick="#{rich:component('popup')}.hide(); return false;">

                      X

                  </h:outputLink>

              </f:facet>

      -          <rich:tabPanel id="tp">

                  <rich:tab header="1">

                      <table>

                          <tr>

                              <td><rich:extendedDataTable id="lineasCCFgcocta1"

                                      value="#{gestionExpVtAyudaConceptosVentaBean.cPVTAVtAyudaFiltro.listaTipsMovis}"

                                      var="ctacorr" selectionMode="single" rows="10" sortMode="single">

                                      <f:facet name="header">

                                          <h:outputText value="#{gestionExpBean.literales['enlaceweb']}" />

                                      </f:facet>

                                      <rich:column id="tb_linCocta">

                                          <f:facet name="header">

                                              <h:outputText value="#{gestionExpBean.literales['linCocta']}" />

                                          </f:facet>

                                          <h:outputText value="#{ctacorr.desAux1}" />

                                      </rich:column>

                                      <rich:column id="tb_lin2">

                                          <f:facet name="header">

                                              <h:outputText value="#{gestionExpBean.literales['linCocta']}" />

                                          </f:facet>

                                          <h:outputText value="#{ctacorr.desAux1}" />

                                      </rich:column>

                                      <rich:column id="tb_lin3">

                                          <f:facet name="header">

                                              <h:outputText value="#{gestionExpBean.literales['linCocta']}" />

                                          </f:facet>

                                          <h:outputText value="#{ctacorr.desAux1}" />

                                      </rich:column>

                                      <rich:column id="tb_lin4">

                                          <f:facet name="header">

                                              <h:outputText value="#{gestionExpBean.literales['linCocta']}" />

                                          </f:facet>

                                          <h:outputText value="#{ctacorr.desAux1}" />

                                      </rich:column>

                                      <rich:column id="tb_lin5">

                                          <f:facet name="header">

                                              <h:outputText value="#{gestionExpBean.literales['linCocta']}" />

                                          </f:facet>

                                          <h:outputText value="#{ctacorr.desAux1}" />

                                      </rich:column>

                                  </rich:extendedDataTable></td>

                              <td><a4j:outputPanel id="factboxCC">

                                      <rich:panel header="Detalle cuenta corriente">

                                          <h:panelGrid columns="2">

                                              <h:outputText value="Texto" />

                                              <h:inputText value="Valor" />

                                          </h:panelGrid>

                                      </rich:panel>

                                  </a4j:outputPanel></td>

                          </tr>

                      </table>

                  </rich:tab>

              </rich:tabPanel>

          </rich:popupPanel>

      </ui:composition>

       

       

      My Screeshot

       

       

      ejemplo.png