cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: Parameters between Action and XSP
Date Tue, 20 Jul 2004 15:16:49 GMT
Carlos Duque wrote:

> I have the definition of the form in database (name of fields, size, 
> types, etc...). When submit I recive this parameters in an action (I do 
> something with this) and I return to a XSP page.

Did you take a look at CocoonForms?

Maybe the form definition XML could be generated dynamically
from the database ...

-- Andreas


>  
> Thanks...
> 
>     -----Mensaje original-----
>     *De:* news en nombre de Andreas Hartmann
>     *Enviado el:* mar 20/07/2004 16:52
>     *Para:* users@cocoon.apache.org
>     *CC:*
>     *Asunto:* Re: Parameters between Action and XSP
> 
>     Carlos Duque wrote:
> 
>      > But my problem is that the name of paramter are dinamically generate.
>      > I don't know in sitemap the name of parameters.
>      > Other solution?
> 
>     Maybe you could describe your usecase?
>     Are you sure that the action / XSP approach is the right solution
>     for your problem?
> 
>     -- Andreas
> 
>      > 
>      > 
>      > Thanks!!
>      > Carles
>      >
>      >     -----Mensaje original-----
>      >     *De:* news en nombre de Andreas Hartmann
>      >     *Enviado el:* mar 20/07/2004 15:56
>      >     *Para:* users@cocoon.apache.org
>      >     *CC:*
>      >     *Asunto:* Re: Parameters between Action and XSP
>      >
>      >     Carlos Duque wrote:
>      >
>      >      > Hello, I'm developing a application under cocoon. My
>     question is
>      >     to mark
>      >      > a "best practices" in my work.
>      >      > How I pass parameters between Action and XSP? Which are
>     the best
>      >     option?
>      >      > I know:
>      >      >     -session
>      >      >     -request.setParameter
>      >      > It's possible with Map returned? with response?
>      >
>      >     I would recommend the following:
>      >
>      >     public Map act(...) {
>      >          ...
>      >          Map result = new HashMap();
>      >          result.put("foo", value);
>      >          return result;
>      >     }
>      >
>      >
>      >     <map:act type="...">
>      >        <map:generate type="xsp" src="...">
>      >          <map:parameter name="foo" value="{foo}"/>
>      >        </map:generate>
>      >     </map:act>
>      >
>      >
>      >     XSP: String foo = parameters.getParameter(foo);
>      >
>      >
>      >     This way you have a separation between parameter names in action
>      >     and XSP and see what happens in the sitemap.
>      >
>      >     -- Andreas
>      >
>      >
>      >    
>     ---------------------------------------------------------------------
>      >     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>      >     For additional commands, e-mail: users-help@cocoon.apache.org
>      >
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     For additional commands, e-mail: users-help@cocoon.apache.org
> 


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


Mime
View raw message