sourceforge > tacos

Frequently Asked Questions


1. General Tacos Information

1.1. How do I submit a new component to the tacos library?


Use sourceforge's built-in ability to accept patch submissions, for tacos this patch area is here .

It may also be desirable to quickly post something to the tacos-devel mailing list before or after writing a component to see what the rest of the developers think, or to possibly save time re-duplicating efforts.

1.2. How can I use tacos from my maven2 project?


Tacos is not currently listed in ibiblio or any other known public repository. Till that happens, here's what you can use:

  • Stable versions :
  • Snapshot versions :

Here's how to include both in your pom:


2. Ajax Support

2.1. I can't get my page to work with prototype.


You don't have to include the prototype.js file in your pages. It is only required by tacos:Autocompleter and it is automatically included in your pages if needed.

2.2. How do I debug ajax requests?


Besides the built-in logging being generated on the server end, there are a number of ways to debug ajax/javascript on the client side.

  • Add a tacos:DebugConsole in your page and set the global dojo configuration variable, isDebug:true
  • This site provides a fairly comprehensive list of the most commonly used methods.
  • Use the FireBug firefox extension. You can have dojo output all its (and tacos) debug messages into the FireBug console by adding dojo.require("dojo.debug.Firebug");
  • Another commonly used debugging method is employed using the greasemonkey firefox extension which allows script libraries to be installed on your browser. The XmlHttpRequestTracing script logs all request/responses using ajax requests. The same site also has XmlHttpRequestDebugging which supposedly does much more, but I haven't used it so I can't vouch for it's usability.

2.3. Can I use Tapestry's Upload component in AjaxForms?


This was possible in beta-1 and beta-2 of tacos, but required a major hack (for IE) and was unreliable. Furthermore, dojo has removed support for this (file upload and pure XML responses) in its later versions, due to 'MSIE and Safari issues that block a good implementation'.

So, you can't currently use Upload in AjaxForms. There are some thoughts for making this work again - namely by uploading the file in a separate ajax request - but nothing has been implemented yet.

2.4. How can I refresh or cancel an AjaxForm?


In normal Forms, this is accomplished by either or

In ajax Forms you'll have to use tacos.refreshForm(document.form) or tacos.cancelForm(document.form).

2.5. How can I control how exceptions (or stale sessions) during an ajax request are presented ?


By default, when an exception or a stale session occurs, tacos presents an error page as a popup within the current page. If you want to preserve this behavior but change the pages displayed, you can contribute to the tapestry.InfrastructureOverrides configuration point and override the properties tacos.exceptionPageName and tacos.staleSessionPageName.

Here's a simple example:

<contribution configuration-id="tapestry.InfrastructureOverrides">
    <property name="tacos.exceptionPageName"    value="MyCustomExceptionPage"/>
    <property name="tacos.staleSessionPageName" value="MyCustomStaleSessionPage"/>

For even more control, you have to create and register your own implementation of AjaxExceptionPresenter and override the presentException method. In that method, you can grab the active ResponseBuilder (usually from an injected AjaxWebRequest) and add to the ajax response any custom content you desire. The default implementation simply does: ajaxWebRequest.getResponseBuilder().addExceptionResponse(exceptionPage, cycle); which results in the exception page shown as a popup in the web browser.

Here's how to register you custom exception presenter:

  <implementation service-id="tacos.AjaxExceptionPresenter">
            <construct class="my.AjaxExceptionPresenterImplementation">                
                <!-- inject anything your implementation requires here -->

For stale sessions, override the tacos.AjaxStaleSessionExceptionPresenter service-id.

3. IE Problems

3.1. Why does IE abort displaying some pages?


This is most likely related to this dojo+tapestry issue and occurs when using Tapestry's Shell component. To resolve this:

  • if you're using Tapestry 4.0, create your own Shell component and change the way the BASE tag is added inside HEAD (or remove it).
  • if you're using Tapestry 4.0.1 or 4.0.2, set renderBaseTag of Shell component to false.
  • later Tapestry versions are immune to this issue.