• DataView detail section strange behaviour

    By miguel calvo 1 decade ago

    HI,

        I'm using a DataView control to show a mail database folder. In the detail section I've got a inputRichText control to show the memo Body field. The view works OK, but when showing the details,in some cases, the DataViewControl expands to cover the whole page. Everything else dissapears ( navigators, header, footer,...). it's quite strange. I've not found a pattern, but it always happens with HTML messages, but not all HTML messages generates the behaviour. No error messges on server console, but you lose the application control.

      Is there something I could do to control this behaviour in the DataView control ?

       Thanks,

    • Could you try some tools to debug?

      By Andrejus Chaliapinas 1 decade ago

      Hi,

      If you could try Firebug under Firefox or Web Inspector under Chrome - could you try to see what markup is generated in case of visibly incorrect page? In them you could also see what CSS styles are applied for different HTML tags, so that could allow you to see where is exact problem resides.

      • It's not related to CSS or HTML

        By miguel calvo 1 decade ago

        Hi,

           The problem is not with HTML or CSS. When the user clicks in the "expand" icon on the right, an Ajax petition is made. I check with Firebug the XHR petition and the response. The server sends the "......." needed to refresh the UI. But, sometimes,  the response is  inserted just under tag and the resulting HTML is

           .......

         

         For me it seems a problem with the client javascript that has to update the UI.

        Regards,

        • Can you send us a sample NSF with a document showing the behavior please.

          By Maire Kehoe 1 decade ago

          Hi. We haven't been able to reproduce this locally. I'd guess it may be related to the content of your document, possibly containing ambiguous HTML, and possibly your web browser version. If you have a sample page and document that reproduces the issue consistently, can you please provide them here (removing any confidential information first).

          -Regards, Maire

          • Here you have a database with the error

            By miguel calvo 1 decade ago

            Hi,

                I've attached a database with the error isolated. Just run the errorDataView.xsp XPage in the browser and click  in the dataview "Show Details" link.

              I'm using release 853-20111117-1058 and I've tested the problem with Firefox 8, IE 7 and Chrome 15.0

               Thanks,

                Miguel

               

            • Logged as SPR#MKEE8PJG6M

              By Maire Kehoe 1 decade ago

              I've logged the issue as SPR#MKEE8PJG6M. I could reproduce it using your sample. Thanks, that will help with the investigation.

              • workaround for SPR#MKEE8PJG6M

                By Maire Kehoe 1 decade ago

                The workaround is to ensure that the read-only Rich Text field does not contain html open and close tags.
                So your rich text field might be replaced by something like so:

                                                    rendered="#{javascript:document2.isEditable()}">
                                                     rendered="#{javascript:!document2.isEditable()}">
                                      document2.getDocument().getMIMEEntity('Body')
                     .getContentAsText().replaceAll('','')
                }}]]>

                                

                The underlying problem in the XPages runtime has been logged as SPR#MKEE8PJMQL
                 

                • It works,but breaks other memos

                  By miguel calvo 1 decade ago

                  Hi,

                     Thank you for the workaround. It works for the memo in the test database but for the whole project it breaks other documents. In any case the idea you've provided can serve me to llok for a whole solution in my environment.

                     Thanks

    • Re: DataView detail section strange behaviour

      By Lorcan McDonald 1 decade ago

      The HTML message probably has some styling in it that's having a bad interaction with your page. You can probably reduce the impact of whatever's causing the problem by setting style="overflow: hidden" on the element containing the HTML. This will force the content to be clipped if it goes outside of its box. 

      However guarding against issues in user provided HTML is a notoriously difficult thing to get right, which is why we provide Active Content Filtering, is it possible that these messages are not being processed by the filter for some reason?