• Server side validation and xe:djTabContainer

    By Wojciech Klicki 1 decade ago

    If You use TabContainer and each tab represents different document (just like in Your example in XPagesExt.nsf/Core_DynamicTabs.xsp) server side validation one one document stops ALL operations from happening on other opened document.

    Just create new contact (server side) and hit Refresh page or try to create another contact.

    Is this a feature or what ?

    • Yes,this works as designed

      By Philippe Riand 1 decade ago

      Client side validation prevents a server roundtrip if there is a pending error. You can overcom that by disabling client validation in the control/page, or at the event handler level.

      • Situation is worse than You think ...

        By Wojciech Klicki 1 decade ago

        There is serious problem with server side validation also. I figured out on my own to turn off client side validation. But after that something far worse happend. Try the following:

        1. Add new server side document

        2. Input first name and last name

        3. Add another new document (server side)

        4. Switch back to the first document

        5. Add third new document (server side)

        Effect - new doc creation is stopped by validation from doc that is not even selected!

        See the picture below:

        If this is another 'works as designed' then from my point of view the design is broken!

        • Yes understand that

          By Philippe Riand 1 decade ago

          This is because the whole fields are submitted to the server, including the one that are invisible because the tab is hidden. And the messages control displays automatically all the errors, regardless if the controls are visible or not (fortunately).

          So the idea might be to make the messages more explicit. Or do some partial refresh/submit, so only a portion of the controls will be processed. It might seems strange, but this also works as designed as the server validates all the controls.

          • Partially fixed by SPR#PHAN8P3LU2

            By Maire Kehoe 1 decade ago

            As Phil said, to ensure that the validation errors in other tabs won't appear, it is necessary to restrict the refreshed area and the executed/validated area (which would normally specify with an execId property on the submit event). The tab areas were attempting to restrict the events on buttons within that area so that just that tab is executed, but it wasn't working.

            The problems with ExtLib controls using execId was reported in SPR#PHAN8P3LU2 (it effects many controls, including the Mobile Page, and Dojo Tab Panel controls.)

            With the fix for SPR#PHAN8P3LU2 in place, then I can create and save content in a 2nd tab even when the 1st tab has missing required fields. For events on controls within the 2nd tab, only the contents of that tab are partial updated and executed.
            That fix should be available in the next OpenNTF release.

            [That fix will not work for the Refresh Page button though, because that button attempts to refresh the entire page, including all of the tabs, so it will validate all of the page content. You should use a button in the tab instead. Also, there is an outstanding issue SPR#MKEE8P4L8D, the execId property on the xp:eventHandler tag will only work correctly when the target executed control is a NamingContainer, whose ID is included as a prefix in the ID of input controls in that area.]