cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Input Modules Reference
Date Fri, 02 Dec 2005 11:13:41 GMT
A document has been updated:

http://cocoon.zones.apache.org/daisy/legacydocs/727.html

Document ID: 727
Branch: main
Language: default
Name: Input Modules Reference (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 12/2/05 11:13:27 AM
Updated by: Upayavira

A new version has been created, state: publish

Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 28383 bytes (previous version: 27542 bytes)
Content diff:
(336 equal lines skipped)
    </tbody>
    </table>
    
+++ <p>For an example, let us assume we have a Java object called "user" in the
+++ session. We can get the username from this object via its getUsername() method.
+++ We want to be able to get at this username from the sitemap. So, in
+++ cocoon.xconf:</p>
+++ 
+++ <pre>&lt;input-modules&gt;
+++   ...
+++   &lt;component-instance 
+++      class="org.apache.cocoon.components.modules.input.JXPathMetaModule" 
+++      logger="core.modules.input" 
+++      name="user-attr"&gt;
+++     &lt;input-module name="session-attr"/&gt;
+++     &lt;parameter&gt;user&lt;/parameter&gt;
+++   &lt;/component-instance&gt;
+++   ...
+++ &lt;/input-modules&gt;
+++ </pre>
+++ 
+++ <p>Then, in our sitemap, we can say:</p>
+++ 
+++ <pre>&lt;map:read src="home/{user-attr:username}/somefile.xml"/&gt;
+++ </pre>
+++ 
+++ <p>Thus the <tt>{user-attr:username}</tt> code will effectively return
+++ <tt>{session.getAttribute("user").getUsername().</tt></p>
+++ 
    <h2>LocateResource</h2>
    
    <p>Locate a resource in a resource tree. Any attribute name is interpreted as a
(451 equal lines skipped)


Fields
======
no changes

Links
=====
no changes

Custom Fields
=============
no changes

Collections
===========
no changes

Mime
View raw message