Topic
1 reply Latest Post - ‏2013-10-02T12:33:20Z by mburati
BuddydelRosario
BuddydelRosario
1 Post
ACCEPTED ANSWER

Pinned topic jQueryUI Calendar and WEF ActionList

‏2013-10-02T11:29:31Z |

We implemented jQueryUI calendar as an alternative to dojo datepicker because of locale issues in zh-TW. Upon adding the calendar on page load everything seems fine until we click a submit button that calls an ActionList that does a partial page refresh.

Now upon partial refresh, the calendar doesn't load anymore. I thought this was just a rebind issue but the datepicker still doesn't show even after a rebind.

I also tried using chrome's dev tools to dynamically add the jQueryUI datepicker to input boxes but none seems to work after the partial page refresh.

Any thoughts? Thanks in advanced!

  • mburati
    mburati
    2466 Posts
    ACCEPTED ANSWER

    Re: jQueryUI Calendar and WEF ActionList

    ‏2013-10-02T12:33:20Z  in response to BuddydelRosario

    While WEF uses Dojo out of the box, it is often possible to use other JS in the page, when it doesn't conflict with something Dojo's doing or have issues with being refreshed in a page.

    It's hard to tell exactly what's going on without a sample that reproduces the issue, but I have heard that some jQuery UI widgets do not like being reloaded within a single browser page instance (as WEF AJAX based partial page refresh and smart refresh do).

    When you're using a JS framework like Dojo or jQuery, it's typically better to have the "portal" page load the framework and widgets, so that they're loaded once per portal page, and not reloaded on each portlet rendering and/or portlet partial page refresh, especially with JS widgets that don't like being reloaded in the page.   If you could load the jquery script file references in the portal page (assuming you're building a portal app) then that may help.

    If you're building a standalone webapp, not intended to be run as a portlet, then it's often better to load the JS files in the head of the outermost page (eg, if using contained models, load them in the head of the container model, and not in the contained model pages.

     

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.