7 Replies Latest reply on Feb 25, 2009 10:18 AM by Mikhail Vitenkov

    disable background srollable for modalPanel

    Jamon Portu Newbie

      On my page I have rich:dataTable with many rows, and, hence, ability to scroll it inside browser. When some modalPanel have been showed, background became colored in gray and non-usable for user. But if I use scroll within mouse, where are been scrolling dataTable behind modalPanel, and my question - how avoid these behavior?

      i.e. I want enable srollability for controls within modalPanel (i.e. h:inputTextarea with many rows) and disable it for background controls (in my case, for rich:dataTable)

      Thx.)

        • 1. Re: disable background srollable for modalPanel
          Nick Belaevski Master

          Hello,

          I cannot reproduce the issue on 3.3.0.GA. Here is my code:

          <rich:modalPanel id="mp"></rich:modalPanel>
          
           <h:panelGroup layout="block" style="width: 100px; height: 100px; overflow: auto;">
           <h:panelGroup layout="block" style="width: 400px; height: 400px;">
           <h:inputText onclick="#{rich:component('mp')}.show()"/>
           <rich:dataTable id="frm_country_sr_tbl1" width="400px"
           value="#{forum5Bean.lotOfData}" var="item" rows="0" frozenColCount="3"
           rowClasses="row1, #{item}" rowKeyVar="row" headerClass="cu-tableheader" columnClasses="c1,c2,c3,c4,c5">
           <rich:column>
           <f:facet name="header">Header</f:facet>
           #{item}
           </rich:column>
           </rich:dataTable>
           </h:panelGroup>
           </h:panelGroup>


          Can you please check if you can reproduce the issue using this code or post your page code?

          • 2. Re: disable background srollable for modalPanel
            Jamon Portu Newbie

            Hello, my code like this:

            <a4j:form id="mainAjaxForm">
            <a4j:region id="mainAjaxRegion">
            
            <rich:datascroller align="center" for="mainTable" maxPages="20" id="sc1" actionListener="#{crmBean.pagerAction}"
            reRender="sc2" limitToList="false" selectedStyle="font-weight:bold"/>
             <rich:dataTable width="100%" id="mainTable" rows="#{crmBean.fetchSize}" value="#{crmBean.allRows}" var="currentRow" rowKeyVar="row">
             .... <%-- some code, I think, it not hot in this issue--%>
            
            <%- column with link, invoked modalPanel -%>
            
            <rich:column width="4%">
            
            <a4j:commandLink ajaxSingle="true" id="editRecordLink" oncomplete="#{rich:component('editPanel')}.show()"
            actionListener="#{crmBean.showRecordPanel}">
             <h:outputText value="#{currentRow.NID}" style="color: #{currentRow.statusColor}"/>
             <f:setPropertyActionListener value="#{currentRow}" target="#{crmBean.currentItem}"/>
             <f:setPropertyActionListener value="#{row}" target="#{crmBean.currentRow}"/>
            </a4j:commandLink>
            
            </rich:column>
            ...
            </a4j:region>
            </a4j:form>
            
            
            <%-- essential of my modalPanel:--%>
            
            <rich:modalPanel id="editPanel" autosized="true" moveable="false" width="900" height="600">
             <h:form>
             <a4j:outputPanel ajaxRendered="true" id="ajaxEditPanel">
             <rich:inplaceSelect value="#{crmBean.workerItem}" viewClass="inplace" changedClass="inplace" openOnEdit="true" layout="block" selectWidth="200px" id="inplace1">
            <f:selectItems value="#{crmBean.personItems}"/>
             </rich:inplaceSelect>
             </a4j:outputPanel>
             </h:form>
            </rich:modalPanel>
            
            


            In this code, you can see, what I use inplaceSelect (and count of rows is large enough); so I use mouse scroll inside inplaceSelect, but in some cases, my action on sroll, what was already directing to inplaceSelect, have been handled by browser, and background of site is scrolling -- in this point I want froze background scrolling, but enable it only for inside components in modalPanel like rich:inplaceSelect.




            • 3. Re: disable background srollable for modalPanel
              Mikhail Vitenkov Newbie

              Hello, I tried to reproduce code above, and no background scrolling take place for me, when I scroll inside rich inplaceSelect.
              Jamon, could you please describe your environment(browser, richfaces version and so on).

              For more info see attached screenshot below:
              http://picasaweb.google.com/lh/photo/vdBWWg_gp9_Kvm_Iz4yL7g?feat=directlink

              • 4. Re: disable background srollable for modalPanel
                Jamon Portu Newbie

                Yes.
                For example, on winXP and FF3, google chrome, and Opera 9 I view behavior like I've mention, but under openSUSE 10 and FF2, opera 9 I view behavior like you've mention.

                But try follow approach: modalPanel have been showed, try out directly invoke (by mouse click) on vertical scroll in browser. In this, for all case (both winXP and openSUSE) background may change up and down. Is this good behavior in this case? I think, in case disables background and active modalPanel such behavior is not good.

                • 5. Re: disable background srollable for modalPanel
                  Mikhail Vitenkov Newbie

                  Actually, I couldn't reproduce issue, because I tried to hang scroll inside inplaceSelect, but when make mouse scroll outside the component, placed in modal panel - rows in background rows is scrolled.

                  • 6. Re: disable background srollable for modalPanel
                    Jamon Portu Newbie

                    Probably, you grasp me wrong. I mention, what such behavior typical for using scroll on mouse (hardware feature - mouse wheel).

                    • 7. Re: disable background srollable for modalPanel
                      Mikhail Vitenkov Newbie

                      I grasp you right :), but described issue is not a bug, it's a feature.