Tag: Web Development

JQuery-Mobile with AngularJS and Angular-Route (ngRoute)

JQuery-Mobile with AngularJS and Angular-Route (ngRoute)

Introduction The following details how JQuery-Mobile and AngularJS can play together seamlessly. Angular-Route (ngRoute) is used for navigation. A simple Angular directive invokes JQuery-Mobile styling and enhancements as each page is loaded. This includes pages loaded via  ng-include A working example is available here as a Plunker http://plnkr.co/edit/RPbJfWX84XkzWlvPFMvX?p=info

AngularJS – Radio Buttons – Three Scenarios

AngularJS – Radio Buttons – Three Scenarios

Introduction This post will detail how to AngularJS can enhance the usage and functionality of Radio Buttons. Three scenarios are covered. Each radio button represents an object. For example, there may be a radio button for each element of an array. When one of the radio buttons is selected, a […]

AngularJS – isolate scope – ‘&’ (function reference)

AngularJS – isolate scope – ‘&’ (function reference)

Introduction This blog demonstrates how to pass a reference to a function to an angular directive/template. The way in which the child directive/template calls the parent is also demonstrated. The example is available as a working JSFiddle here. This tutorial details creating directive/templates in general (without an isolated scope). This […]

AngularJS – isolate scope – ‘=’ (pass by reference)

AngularJS – isolate scope – ‘=’ (pass by reference)

Introduction This blog will explore the concept of passing object to angularJS directives / templates using by reference. When an object is passed by reference both the parent (controller or parent directive) and the child directive/template have access to the object. The relationship is bidirectional. This tutorial details creating directive/templates […]

AngularJS – isolate scope – ‘@’ (pass by value)

AngularJS – isolate scope – ‘@’ (pass by value)

Introduction Objects can be passed into an angularJS directive in any one of the following ways: By value using ‘@’ By reference using ‘=’ As a reference to a function in the parent controller using ‘&’ The next few blogs will detail each of these techniques. This blog will detail the […]

Spring 4 Web MVC – Hello World using Annotation and Java configuration with Netbeans

Spring 4 Web MVC – Hello World using Annotation and Java configuration with Netbeans

This blog will go through the steps required to setup a basic Spring 4 MVC web application using Netbeans and Maven. The Spring 4 project will be configured using annotations and plain Java rather than XML. It is a step by step guide to getting up and running quickly. There […]

ServiceStack – Force file download

ServiceStack – Force file download

Making a call to ServiceStack to force a file to download.

Hibernate-Search Multiple-value Facet-Counts

Hibernate-Search Multiple-value Facet-Counts

Introduction The hibernate-search facet search API is pretty amazing but it lacks a little on the following: Facet-Count values are incorrect where a facet matches a fields that have multiple values. I.e. the facet-counts are correct where the facet has a 1-to-many relationship with result-set items but the facet-counts are […]

Understanding Faceted Searching

Understanding Faceted Searching

Introduction Tony Russell-Rose describes faceted searching in great detail in these posts: http://isquared.wordpress.com/2011/04/12/interaction-models-for-faceted-search/ http://java.dzone.com/articles/designing-faceted-search http://isquared.wordpress.com/2011/04/28/where-am-i-techniques-for-wayfinding-and-navigation-in-faceted-search/ http://isquared.wordpress.com/2011/02/17/reflections-on-faceted-search-and-beyond/ They’re well worth a read before even contemplating developing a faceted search. There are many types of faceting techniques available. This blog focuses on a facet-search where the facets and results remain on a […]

jQuery-UI arrow boxes

jQuery-UI arrow boxes

This blog describes how to add arrows to the standard jQuery-UI error and highlight boxes. Arrows can be either from the left, right, top or bottom.

Resolving AngularJS minimization / obfuscation issues

Resolving AngularJS minimization / obfuscation issues

AngularJs uses Dependency Injection (DI) to supply objects/variables during configuration. Variables that begin with the $ character tend to be injected, therefore if a minimizor and/or obfuscater changes the variable name, the DI will not be performed. This Angular Crash Course provides a detailed intro on AngularJS. This blog details a common solution to the […]

Hibernate – Populating an unmapped Entity field with COUNT(*) using @Formula

Hibernate – Populating an unmapped Entity field with COUNT(*) using @Formula

This post demonstrates how to populate an Entity Bean property that is not mapped to a DB table column. It uses the @Formula annotation to insert native SQL into the hibernate generated query. My

AngularJS – A crash course – in processing AJAX JSON

AngularJS – A crash course – in processing AJAX JSON

I’ve recently started using AngularJS http://angularjs.org/ . It’s very impressive. It’s extremely useful for handling/processing AJAX JSON results. This blog demonstrates the following: Setting up an AngularJS “application”. Binding (dynamic) JSON data to the view. I.e. processing an AJAX callback. Invoking an AngularJS Controller function externally from outside the AngularJS […]

Asp.NET html <button> element onclick and onserverclick -> client-side validation

Asp.NET html <button> element onclick and onserverclick -> client-side validation

The problem solved here is that an asp.net <button> element (html = <button runat=”server” > or <asp:HtmlButton )  doesn’t support a onclientclick event. This prevents performing client side validation ahead of the onserverclick event. Here’s more on the problem. http://stackoverflow.com/questions/1245033/asp-net-onserverclick-event-handler-not-called-if-using-onclick

jQuery-UI Split Button

jQuery-UI Split Button

Here’s how to create a split button with jQuery-ui $( “#mySplitButton” ).splitButton();

input and textarea html5 ‘placeholder’ attribute support in IE (or other non compliant browsers)–jQuery plugin

input and textarea html5 ‘placeholder’ attribute support in IE (or other non compliant browsers)–jQuery plugin

Which results in Where the text ‘Search Products’ disappears on focus and reappears on blur if the field is still empty. This text is not the ‘value’ of the field. In addition: If the value of the field is set to empty programmatically (using JS) the placeholder will appear […]

jQuery-UI – Rich Autocomplete component

jQuery-UI – Rich Autocomplete component

A problem with the out-of-box jQuery-ui autocomplete component is that: Only text is shown in the dropdown That same text populates the field upon list selection. Thankfully, this does not have to be the case. Images and other markup can easily be rendered in the suggestion list. Consequently, the text […]

jQuery – Fly to basket (and fly from basket)

jQuery – Fly to basket (and fly from basket)

The example below is a fully working Fly to Basket implementation. The image will fly to the center of the basket or fly from the basket back to where it came from.

Hibernate @ManyToMany delete non-owner – prevent owner being deleted

Hibernate @ManyToMany delete non-owner – prevent owner being deleted

The solution to deleting a child in a @ManyToMany relationship and deleting the parents in the process.

Force IE out of compatibility mode

Force IE out of compatibility mode

Add this to within the <head> <meta http-equiv=”X-UA-Compatible” content=”IE=edge” /> This forces IE out of compatibility mode. IE will ignore compatibility mode settings from the ‘(F12) Developer Tools’ facility. Here’s some code that will allow testing. Done using ‘IE Tester’ http://www.my-debugbar.com/wiki/IETester/HomePage IE7 and IE8 will render this differently. IE8 in compatibility […]