Tuesday, January 20, 2009


Decorator filter lets you update pages on the fly. Filter lets you add dynamically (on the fly) some content to the serviced requests. More precisely filter adds content from the given file before, after or inside of the given HTML tag (e.g. before the body tag, or after the head tag etc.). For example lets us add a new style for the each div tag. We can create a file /styles/add_on.txt with the following content: style="color:red". Now with the Decorator filter we can do the following:


and as soon as we map this filter to our JSP files, filter will update div blocks on the fly.

P.S. check out other filters in our JSOS package. There are a lot of updates.

No comments: