cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Klein <>
Subject Action Not Adding Values to Sitemap or is it?
Date Fri, 24 Jan 2003 23:21:03 GMT
Hi All,

I am trying to add a paramater to the sitemap through
an Action extended from the MultiAction Class, but
when I try to access it in my sitemap, it is empty.  I
am certain there should be a value coming out of the
Action b/c it prints the value to my log from inside
the action.  Any help would be greatly appreciated.  I
attached my Action code and sitemap code snippets.  I
am running Cocoon 2.1 dev and java 1.4 on Red Hat 8.0.
 The reason for the action is to get collection names
from the Xindice database, which translate to client's
of the webapp.


   <map:match pattern="view/**">
    	<map:act type="task">
     	  <map:parameter name="method"
     	  <map:parameter name="task-subject-node"
         <map:match type="request-parameter"
            <map:transform src="stylesheets/task.xsl">
		<map:parameter name="users" value="{subjNodes}"/>
		<map:parameter name="categories"
            <map:serialize type="html"/>
    <map:transform src="stylesheets/task.xsl"/>
    <map:serialize type="html"/>
  /*Places all the user's into a sitemap parameter.*/
    public Map doAddSubjNodes (Redirector redirector,
                   SourceResolver resolver,
                   Map objectModel,
                   String src,
                   Parameters parameters) throws
Exception {

        Request request =
        Map sitemapParams = new HashMap();
        //determine dest of task to be created
        String subjectNode =
        TaskManager taskManager = new TaskManager();
        //get all available subjectNode's
        String[] subjNodes =
        String subjStr = "";
        //add all user's to sitemap
        for(int x=0;x<subjNodes.length;x++) {
            subjStr = subjStr + "/" + subjNodes[x];
        sitemapParams.put("subjNodes", subjStr);
        return sitemapParams;

Live simply so others may simply live.
Pluralitas non est ponenda sine neccesitate.
"Entities should not be multiplied unneccesarily"
-William of Occam

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message