3 Replies Latest reply on May 12, 2008 5:52 AM by vijay kumar

    Height of Rich:Panel adapting browser height

    leelavathic leelavathic Novice

      I want to display a rich:panel enclosed within a HtmlPanelGrid adapting browser height and width.

      <h:panelGrid columns="1" styleClass="style1" columnClasses="col1" >
      <rich:panel styleClass="style2">

      </rich:panel>
      </h:panelGrid >

      .style1{
      width:100%;
      height:100%;
      }

      .col1{
      width:100%;
      vertical-align:top;
      height:100%;
      }

      .style2{
      border:0px;
      width:100%;
      height:100%;
      }

      But only the panel width is adjusting to the browser not the height.
      Can anyone suggest any solutions?

      Thanx in advance

        • 1. Re: Height of Rich:Panel adapting browser height
          vijay kumar Novice

          Hi
          im facing the same problem
          did u get the solution.
          pls help

          • 2. Re: Height of Rich:Panel adapting browser height
            leelavathic leelavathic Novice

            I found that rich:panel component is ultimately rendered as a div within another div.
            So I tried displaying a div within another div in html with overflow css and width and height as 100 %
            given to the inner div, But the scrollbars were displayed according to the content not according to the
            height and width specified(ie, 100 % width and 100% height)

            Then i tried only i single div enclosing data and gave the following css to it.
            .style{
            width:100%;
            height:100%;
            overflow:auto;
            }

            The screen was displayed properly with scrollbars.

            So I modified my code given in the last post as follows:
            <div class="styleClass="style2"">
            ----- richfaces components-------


            .style{
            width:99%;
            height:99%;
            overflow:auto;
            }

            Only the data is displayed according to the browser width and height.

            I just wanted to confirm my understanding regarding the following issues:
            1) Does a div within any other html component(table,div etc) doesn't display the scrollbars properly.
            2) If we use div instead of rich:panel or htmlPanelGrid component will it affect any ajax calls that will be
            made by the components within this div.
            3)I thought of changing the css for overflow attribute only for rich-panel body, but if I do so then it will
            affect all the rich:panel components. Is there any way of specifying the css of rich-panel body only for a particular
            rich-panel (may be by some id attribute>?)

            • 3. Re: Height of Rich:Panel adapting browser height
              vijay kumar Novice

              Thanks for the reply
              dat really helped.