How to create a jQuery plugin with methods?

According to the jQuery Plugin Authoring page (http://docs.jquery.com/Plugins/Authoring), it’s best not to muddy up the jQuery and jQuery.fn namespaces. They suggest this method: (function( $ ){ var methods = { init : function(options) { }, show : function( ) { },// IS hide : function( ) { },// GOOD update : function( content ) { … Read more

AngularJS passing data to $http.get request

An HTTP GET request can’t contain data to be posted to the server. However, you can add a query string to the request. angular.http provides an option for it called params. $http({ url: user.details_path, method: “GET”, params: {user_id: user.id} }); See: http://docs.angularjs.org/api/ng.$http#get and https://docs.angularjs.org/api/ng/service/$http#usage (shows the params param)

What is the need of JSF, when UI can be achieved with JavaScript libraries such as jQuery and AngularJS

JSF to plain JSP/Servlet/HTML/CSS/JS is like as jQuery to plain JS: do more with less code. To take PrimeFaces (jQuery + jQuery UI based) as an example, browse through its showcase to see complete code examples. BootsFaces (jQuery + Bootstrap UI based) has also a showcase with complete code examples. If you study those examples … Read more