cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Unico Hommes <un...@apache.org>
Subject Re: [JCR Block] Viewing content of properties and last modified
Date Wed, 17 Aug 2005 15:39:52 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Hartmann wrote:
> Michael Wechner wrote:
> 
>> Sylvain Wallez wrote:
>> 
>>> Michael Wechner wrote:
>>> 
>>>> Hi
>>>> 
>>>> I have two questions re the JCR Block
>>>> 
>>>> 1) How can one actually access the content of properties?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> You cannot access them directly with the JCRNodeSource, which is 
>>> meant to represent file-like abstractions which are mapped to
>>> nodes.
>> 
>> 
>> 
>> 
>> wouldn't it make sense to actually implement this for JCR source? I
>> mean extend it to JCR properties.
> 
> 
> In my sandbox, I implemented InspectableSource in JCRNodeSource (I
> already posted a message some time ago).
> 
> How do you imagine providing access to the properties?
> 
> Property getProperty(...) { return getNode().getProperty(...); }
> 
> doesn't add much value ...
> 
> 
> 
>>> Now such a source, you can get the corresponding Node and then do
>>>  whatever you want with it.
>> 
>> 
>> yes, I can list all nodes by using the TraversableGenerator, but I 
>> think it would make sense it the the JCR Source in combination with
>> the "FileGenerator" would allow to get the content of a JCR
>> property, e.g.
>> 
>> <property name="" value=""> .... </property>
> 
> 
> That could probably be implemented using an 
> "InspectableTraversableGenerator" or something like that ...

Check out TraversableSourceDescriptionGenerator:

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/TraversableSourceDescriptionGenerator.html


Horrible name, I know :-(

- --
Unico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDA1pHcuec8tVNKAwRAli6AKDP6I9QqDcQvQaIpPsN86ZqNVL5awCg2HoO
rie8BlnrJ+MjVB6xvLPZwUM=
=ChFN
-----END PGP SIGNATURE-----


Mime
View raw message