Richard's blog

Using Resource Bundles on the client-side

Java has a mature approach to handling localization involving properties files, or 'resource bundles', and the same need exists on the client-side.

Introducing the l:resourceBundle and l:resourceLabel widgets to make localization easy.

Generating XML from a form to send to the server

Its easy to load some XML data and either create a form using XSLT, or data-bind the form to an XML source document. But what about sending the completed form data back to the server?
You don't always have control over the format the server needs. It could be that an existing service requires an XML document of a certain format to be HTTP POSTed.

This tutorial shows how to generate the XML and includes a new widget to make it simple.

Wrapping an ExtJS widget

ExtJS is a popular Ajax widget library. While it is possible to uses ExtJS on the same page as Backbase (coexistence), it is sometimes better to wrap a widget. Like Dojo, Yahoo and others, widgets from ExtJS can be wrapped to make them first-class Backbase widgets.

Formatting columns in a listGrid

The enhanced listGrid in 4.1 has some powerful features like the ability to intelligently format columns of data. For example, you may want to highlight high values in green and low values in red. You can now do that easily just be adding a dataFormatter.

Data binding XML to a form

It is often useful to load some XML data, place it into a form, save changes back to the XML document as they are made in the form, and post the XML back to the server.

Having loaded some XML into a global variable $userProfile:

<?xml version="1.0" encoding="UTF-8"?>
<UserProfile>
        <Name first="Roger" surname="Rabbit" />
        <Demographics age="25" />
</UserProfile>

we want to bind a field to an element in the XML document using an xpath:

<input type="text" id="firstName"
    path="$userProfile/Name/@first" e:behavior="l:autofill" />

Drag and drop Example (R3)

Sometimes you want to drag from one list to another, but the items in the first list are not removed. Here is a working example of how to do it with symbolic drag mode.

FusionCharts for Backbase

It is now possible to use any of the high-quality Fusion Charts within a Backbase application, and doing so has never been easier.

First, add the Labs namespace to your page. This widget was developed in the Backbase Labs, and these widgets have the prefix l: by default (that's a lower case L).

  xmlns:l="http://www.backbase.com/2007/labs"

Now include the widget definition. This widget should be installed under /Labs/fusionChart but you can change that within the widget definition if you desire.

  <xi:include href="/Labs/fusionChart/fusionChart.xml" />

You're ready to add a chart anywhere in your page:

  <l:fusionChart width="600" height="350" id="bbBar2D"
    url="data/Bar2D.xml" type="FCF_Bar2D" />

Locating Performance Tuning JSF 4

Courtesy of Kees Broenink, here is some step-by-step advice on how to locate the source of slow performance in a JSF page.

When experiencing a bad performance you must first see if it is client, network or server.
I will explain how to measure the server. If you are working on a LAN the network is most of the time not the bottleneck. This leaves you with a way to have an idea about the client: total - server = client.