Category Archives: javascript

A Tooltip component for Tapestry

I was thinking of adding tooltips using prototip but found a very good free solution in Opentip. This is a very nice library and very easy to integrate. I was able to integrate it with only a single modification to the script and that was to replace the default ajax support with the Tapestry’s own ajax support. Continue reading

A Modal Dialog For Tapestry

As Tapestry does not provide a Dialog Box, let us see how difficult(or easy) it is to create one on our own. We will use ModalBox as it has an MIT license and it is written in prototype (Soon this won’t be a criteria for choosing a script as Tapestry is going to be prototype independent). The ModalBox script is very easy to use. There is a method which displays a dialog box. It takes a dom element and configuration options as parameters. If you want to create a wizard just keep on using the same method inside the dialog box. There is also a ModalBox.hide() method to hide the dialog. Continue reading

A Periodic Zone Refresh Mixin for Tapestry

Tapestry uses a concept of Zones for Ajax based updates. Zones are components which are used to identify/mark a portion of a component/page for Ajax updates. Usually zones are connected to client events of other components e.g. click of EventLink or ActionLink component, change event of Select component or submit event of Form component. But what if we just want a zone which refreshes itself with its own contents.This is what we are going to do. Continue reading

Ajax Upload for Tapestry

Tapestry has an excellent support for JavaScript and Ajax. It strikes a perfect balance between how much a framework should assist and how much the developer should do. Most component-based frameworks, rather than assisting, supervise and most action-based frameworks leave even the integration to the developer. Tapestry provides you with events which you can easily connect to your JavaScript events/functions and all the rest is, as I keep on saying, magic.

In this post, I will talk about integrating an Ajax based upload library, file-uploader with Tapestry.
Continue reading

Tapestry Magic #8: ApplicationStateManager

The Notifications we had in this post are fine when we are dealing with requests which are not redirect-after-post. But in case we want to notify users after a post request like onSubmit from a form, we cannot use Environment as after the post request is complete a redirect is done and so no Environment is available to the MarkupRendererFilter. Continue reading

Tapestry Magic #6: Environment

Environment is yest another Tapestry’s Magic Trick which changes the way you approach a problem once you get to know it. Environment service keeps a stack for each interface on which you can push an implementation. This service is available per-thread, so a new instance is available for each request cycle. During the request cycle you can change the implementation at any point by pushing your own implementation over the one available and later when you are done using it, popping out yours and restoring the previous one from the stack. There are two main uses of Environment service, passing information to nested components and providing a per-thread service which can be overridden at any point in the request cycle. You can read more about it here. Continue reading

%d bloggers like this: