title: How to set custom size for dialog in jsf?
body: <p>I am new to jsf. I have two xhtml pages: test.xhtml and exciseDetails.xhtml. When I click a button "ExciseDetails" on test.xhtml page, it will open exciseDetails.xhtml as a dialog by using primefaces' dialog framework. </p>
  
  <p>I have done this, but when the dialog opens not all components are displayed. To see them I have to use scroll present in that dialog.. </p>
  
  <p>How can I maximize the dialog?  All components of exciseDetails.xhtml page should be visible without scrolling..</p>
  
  <p>below one is beanclass</p>
  
  <pre><code>package com.madhu.tests.pagecode;
  import javax.faces.bean.ManagedBean;
  import org.primefaces.context.RequestContext;
  import com.madhu.tests.bean.Excisebean;
  
  @ManagedBean(name="pc_excisePageCode")
  public class ExcisePageCode {
  
      Excisebean excisebean=new Excisebean();
      public ExcisePageCode() {
      // TODO Auto-generated constructor stub
      }
  
      public void exciseDialog() {  
          RequestContext.getCurrentInstance().openDialog("exciseDetails");  
      }  
  
      public Excisebean getExcisebean() {
          return excisebean;
      }
      public void setExcisebean(Excisebean excisebean) {
          this.excisebean = excisebean;
      }
  }
  </code></pre>
  
  <p>exciseDetails.xhtml:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:p="http://primefaces.org/ui"&gt;
  
  &lt;h:head&gt;
  
  &lt;/h:head&gt;
  
  
      &lt;h:body&gt;
  &lt;h:form&gt;
  
          &lt;p:panelGrid&gt;
  
              &lt;p:row&gt;
                  &lt;p:column &gt;
                      &lt;p:outputLabel for="regtype" value="Registration Type"
                          style="display: block;"&gt;&lt;/p:outputLabel&gt;
                  &lt;/p:column&gt;
                  &lt;p:column&gt;
                      &lt;h:selectOneMenu id="regtype"
                          value="#{pc_excisePageCode.excisebean.regtype}"
                          style="width:200px;"&gt;
                          &lt;f:selectItem itemLabel="--Select--" itemValue="#{null}" /&gt;
                          &lt;f:selectItem itemLabel="Dealer" itemValue="Dealer" /&gt;
                          &lt;f:selectItem itemLabel="Manufacturer" itemValue="Manufacturer" /&gt;
                      &lt;/h:selectOneMenu&gt;
                  &lt;/p:column&gt;
              &lt;/p:row&gt;
  
              &lt;p:row&gt;
                  &lt;p:column&gt;
                      &lt;p:outputLabel for="eregno" value="Excise Registration (ECC) No."
                          style="display: block; " /&gt;
                  &lt;/p:column&gt;
                  &lt;p:column&gt;
                      &lt;p:inputText id="eregno"&gt;&lt;/p:inputText&gt;
                  &lt;/p:column&gt;
              &lt;/p:row&gt;
  
              &lt;p:row&gt;
                  &lt;p:column&gt;
                      &lt;p:outputLabel for="eregdate" value="Registration Date"
                          style="display: block;" /&gt;
                  &lt;/p:column&gt;
                  &lt;p:column&gt;
                      &lt;p:inputMask id="eregdate" mask="99-99-9999" /&gt;
                  &lt;/p:column&gt;
              &lt;/p:row&gt;
  
              &lt;p:row&gt;
                  &lt;p:column colspan="2"&gt;
  
                      &lt;p:panelGrid&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;
  
                              &lt;/p:column&gt;
                              &lt;p:column style="width:150px;display:block; text-align:center"&gt;
                                  &lt;p:outputLabel value="Code"&gt;&lt;/p:outputLabel&gt;
                              &lt;/p:column&gt;
  
                              &lt;p:column style="width:150px;display:block; text-align:center"&gt;
                                  &lt;p:outputLabel value="Name"&gt;&lt;/p:outputLabel&gt;
                              &lt;/p:column&gt;
  
                              &lt;p:column style="width:150px;display:block; text-align:center"&gt;
                                  &lt;p:outputLabel value="Address"&gt;&lt;/p:outputLabel&gt;
                              &lt;/p:column&gt;
  
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;
                                  &lt;p:outputLabel value="Range" /&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="rangecode"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="rangename"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="rangeaddress"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;
                                  &lt;p:outputLabel value="Division " /&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="divisioncode"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="divisionname"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="divisionaddress"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;
                                  &lt;p:outputLabel value="Commissionerate" /&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="commissioncode"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="commissionname"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:inputText id="commissionaddress"&gt;&lt;/p:inputText&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                      &lt;/p:panelGrid&gt;
  
                  &lt;/p:column&gt;
  
              &lt;/p:row&gt;
  
          &lt;/p:panelGrid&gt;
  
          &lt;/h:form&gt;
         &lt;/h:body&gt;
       &lt;/html&gt;
  </code></pre>
  
  <p>test.xhtml:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:p="http://primefaces.org/ui"&gt;
  
    &lt;h:head&gt;
    &lt;/h:head&gt;
    &lt;h:body&gt;
         &lt;h:form id="testform"&gt;
           &lt;p:commandButton id="excisebutton" value="Excise Details" 
             actionListener="#{pc_excisePageCode.exciseDialog()}"/&gt;                                               
         &lt;/h:form&gt;
    &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>