Featured post

Docker setup for Liferay 7 with MySQL

Wednesday, 26 October 2016

jQuery UI with Liferay 7

If you want to integrate liferay 7 theme/portlet/application with jQuery UI, you need to make subtle change in jQuery UI library itself.

By default library starts with -

(function( factory ) {
 if ( typeof define === "function" && define.amd ) {

  // AMD. Register as an anonymous module.
  define([ "jquery" ], factory );
 } else {

  // Browser globals
  factory( jQuery );
 }
}(function( $ ) {


If you add library directly in your liferay application, you will be getting an error - Mismatched anonymous define() module:

To overcome this issue, you need to change the library like



(function( factory ) {
 
  factory( jQuery );
 
}(function( $ ) {

What you are doing is removing the reference of define call, which causes the issue, as jQuery is already loaded by default.
Same thing you need to perform for other JS libraries which contains the call.


You are just done, Try & Enjoy the function.............:)

21 comments:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from JQuery Training in Chennai . or learn thru JQuery Training . or learn thru ES6 Online Training. Nowadays JavaScript has tons of job opportunities on various vertical industry.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Pretty blog, so many ideas in a single site, thanks for the informative article, keep updating more article.
    Webdesining course in chennai

    ReplyDelete
  4. Appreciating the persistence you put into your blog and detailed information you provide


    Selenium training in Chennai

    Selenium training in Bangalore

    ReplyDelete
  5. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing..
    Believe me I did wrote an post about tutorials for beginners with reference of your blog. 




    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  6. thanks for your information really good and very nice web design company in velachery

    ReplyDelete
  7. I’m really happy to say it was an interesting post to read. I learned new information from your article, you are doing a great job. Continue
    Thanks & Regards,
    SAP Training in Bangalore

    ReplyDelete
  8. Lovely blog ..! I really enjoyed reading this article. Thank you for sharing such a wonderful post
    aws Training in Bangalore
    python Training in Bangalore
    hadoop Training in Bangalore
    angular js Training in Bangalore
    bigdata analytics Training in Bangalore.SAP Training in Bangalore

    ReplyDelete
  9. Your articles really impressed for me,because of all information so nice.angular 7 training in bangalore

    ReplyDelete
  10. These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.sap s4 hana simple finance training in bangalore

    ReplyDelete
  11. I gathered a lot of information through this article.Every example is easy to undestandable and explaining the logic easily.javascript training in bangalore

    ReplyDelete
  12. Very useful and information content has been shared out here, Thanks for sharing it.sap hr training in bangalore

    ReplyDelete
  13. This is really an awesome post, thanks for it. Keep adding more information to this.html training in bangalore

    ReplyDelete
  14. thank you so much for this nice information Article, Digitahanks for sharing your post with us.Real Time Experts training center bangalore

    ReplyDelete
  15. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful . student review for Realtime Experts marathahalli bangalore

    ReplyDelete
  16. I have read your blog its very attractive and impressive. I like it your blog.Real Time Experts Training in Bangalore center address bangalore

    ReplyDelete