home mail me! syndication

overthinkings

by Ruben Daniels

Archive for March, 2009

Simple authentication for complex Ajax applications

Can I do this? Who are you? Yes you can do it.

Authentication is always a hard problem for any web application. For an Ajax application it’s even more complex. Imagine you make a request which gives you an access denied, what state should the application be in? And when the user logs in again, how can the request - or requests that happened while not being logged in - be retried?

This is where jpf.auth comes in. It helps you to set up authentication for your entire application in a declarative manner. First, let’s look at how to set-up basic login and logout teleport methods, to which the auth element can connect to.
Read the rest of this entry »

How to add items to a list

This week’s snippet discusses two methods of adding items to a list.

First we create a list with some inline binding rules. For this example we are using a list with mode=”check” and mode=”radio” set. The mode sets the behaviour of the list, “check” to function as a list of checkboxes, “radio” to function as a list of radiobuttons.

<j:list id="lstExample1"
    mode     = "check"
    model    = "mdlData:question1"
    caption  = "text()"
    traverse = "item" />
<j:list id="lstExample2"
    mode     = "radio"
    model    = "mdlData:question2"
    caption  = "text()"
    traverse = "item" />

We can now add the model to our application:
Read the rest of this entry »

How to integrate crappy banner javascript with your neat ajax application

Many banner companies are using dynamic javascript loading to insert their banners in a website. Most of these companies grew big before the Ajax term was coined and recognized as the future technology of the web. So the scripts they are using assume the page is loading while the script is inserted; they use document.write() to add html to the page. As many of you might know, using document.write on an already loaded page will clear all it’s html and leave you with a white page containing only the banner. In this week’s snippet I’ll show you how to work around this.
Read the rest of this entry »



Movies online

movies online, click here