cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Víctor Pergolesi <victorpergol...@codimat.com.ar>
Subject Re: Checking if resource "type" exists
Date Wed, 18 Mar 2009 17:44:26 GMT
Dear Mathias: since 16-03-2009 i am trying to do as you said but I have a problem:
1 - I could compile the class you send to me.
2 - Now I don´t understand how can I send the parameter to which. I try in the block-servlet-service.xml
of one of my blocks
...
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:servlet="http://cocoon.apache.org/schema/servlet"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">

  <bean name="com.codimat.bloque1.service" class="org.apache.cocoon.sitemap.SitemapServlet">
 
    <servlet:context mount-path="/bloque1" context-path="blockcontext:/bloque1/">

               <servlet:init-param name="type" value="directory"/>
    </servlet:context>
  </bean>
</beans>
...
I don`t know how can I use your code.
Please can you tell me?

Thank you very much.

Victor Pergolesi
From: Mathias Reem [mailto:m.reem@gmx.net]
To: Cocoon Users [mailto:users@cocoon.apache.org]
Sent: Mon, 16 Mar 2009 22:03:25 +0000
Subject: Checking if resource "type" exists

Hi
  
  I've been searching for a while for a way to not just determine whether
  a resource exists but also if the resource has a specific type (dir,
  file, hidden).
  
  As I could not find anything, I wanted to extend the default
  ResourceExistsSelector, but as all of its members are private without
  any getters or setters I just had to c&p it. :-( Anyway maybe it can be
  useful for somebody else too.
  
  You can use my ResourceExistsSelector as a drop in replacement for the
  default, it will behave exactly the same way. I've you want to further
  restrict the "type" of the resource you just have to pass a parameter
  named type to the selector.
  
  Have fun.
   Mathias
    


Este mensaje y sus adjuntos contienen información confidencial y son para uso exclusivo del
destinatario. Si hubiese recibido este mensaje por error, o contuviera información que Ud.
no desea recibir, por favor le agradecemos nos lo haga saber y lo elimine de su sistema. Cualquier
inconveniente, enviarlo a librodequejas@codimat.com.ar.
Este correo ha sido chequeado por el servidor de Codimat S.A. www.codimat.com.ar

Mime
View raw message