tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Francisco Sabugal <daniel.franci...@universia.net>
Subject how to detect when an attribute value is not found
Date Thu, 16 Oct 2008 17:01:37 GMT
Hi. I'm using a custom preparer to be able to pass parameters to an
attribute value. Example:

    <definition name="cronica.block.content.reportaje"
template="/jsp/templates/wrappers/bloqueReportajeWrapper.jsp"
       
preparer="net.universia.cronica.tiles.preparer.DynamicAttributesViewPreparer">
        <put-attribute name="reportaje"
value="/blocks/${country}/contenidos/${publicationDate}/${contentType}/reportaje_${contentID}.html"/>
    </definition>

My problem is that I want to detect when a parametrized value (which
refers to an html or jsp page) points to a file that couldn't be found.
Instead of throwing an exception, the Tiles behaviour is to do nothing.
That attribute is rendered in blank. My question is, how can I detect it
in order to be able to redirect the user to an error page.

Thanks to all.

Best regards,
-- 
	*Daniel Francisco Sabugal*


*Java/J2EE Developer*

PORTAL UNIVERSIA, S.A.
Ciudad Grupo Santander. Avda. de Cantabria s/n
Edif. Arrecife, planta 00.
28660 Boadilla del Monte - Madrid

Telf: (34) 91 289 59 12 - Fax: (34) 91 257 15 06

daniel.francisco@universia.net <mailto:daniel.francisco@universia.net>
www.universia.es <http://www.universia.es>



Mime
View raw message