cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@sun3.oulu.fi>
Subject Re: how to access parameter inside of action
Date Sun, 19 Jan 2003 23:14:19 GMT


Nils Leßmann wrote:
> Hi!
> 
>  
> 
> This one can?t be too tough ? anyway I?m not able to find an example 
> somewhere. I?m writing my own action and need to pass a parameter, with 
> something like
> 
>  
> 
> 

> 
>  
> 
> How can I access this value inside the action? The cocoon docs just 
> mention that this work, but not how.


This should work:

In sitemap:

<map:act type="your-action">
   <map:parameter name="fileid" value="smoevalue" />
</map:act>


In your action:

public class YourAction extends AbstractAction implements ThreadSafe
{
     public Map act (Redirector redirector,
                     SourceResolver resolver,
                     Map objectModel,
                     String source,
                     Parameters params)
     {
        String fileid = params.getParameter("fileid");
        ....
     }


> 
>  
> 
> Regards, Nils
> 
> ________________________________________________
> 
> Nils Leßmann
> 
> Stockacher Str. 38
> 
> 68239 Mannheim
> 
>  
> 
> 0175 - 814 899 8
> 
>  
> 
>  
> 
>  
> 


-- 
Andre H. Juffer              | Phone: +358-8-553 1683
The Biocenter and            | Fax: +358-8-553-1141
     the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
University of Oulu, Finland  | WWW: http://www.biochem.oulu.fi/Biocomputing/


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message