You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by RogerV <ro...@googlemail.com> on 2009/10/16 11:22:08 UTC

Convention Plugin - Setting dynamic parameter values

Hi

I'm tying to define a stream result using the convention plugin. The values
for the contentLength and inputName require dynamic values. Obviously I
know, for example, the length of the data stream within my action, but how
do I  code this so either the @Annotation or the StreamResult can get the
data from my action - or have I hit the limits of the convention plugin.

Regards
-- 
View this message in context: http://www.nabble.com/Convention-Plugin---Setting-dynamic-parameter-values-tp25922320p25922320.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Convention Plugin - Setting dynamic parameter values

Posted by Roger <ro...@googlemail.com>.
On Friday 16 October 2009 19:29:05 Musachy Barroso wrote:
> when you declare a result using annotations, the param values can
> contain OGNL values, just like in xml,:
> 
>  @Action(value="/different/url",
>     results={@Result(name="success", type="httpheader",
> params={"status", "%{status}", "errorMessage", "%{error}"})}
>   )
>   public String execute() {
>     return SUCCESS;
>   }

Is this true only for result annotations, or does this apply to other 
annotations as well?

> >
> > I'm tying to define a stream result using the convention plugin. The
> > values for the contentLength and inputName require dynamic values.

For future reference. providing a getContentLength() and getInputName() method 
works as well.

Regards

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Convention Plugin - Setting dynamic parameter values

Posted by Musachy Barroso <mu...@gmail.com>.
when you declare a result using annotations, the param values can
contain OGNL values, just like in xml,:

 @Action(value="/different/url",
    results={@Result(name="success", type="httpheader",
params={"status", "%{status}", "errorMessage", "%{error}"})}
  )
  public String execute() {
    return SUCCESS;
  }

On Fri, Oct 16, 2009 at 2:22 AM, RogerV <ro...@googlemail.com> wrote:
>
> Hi
>
> I'm tying to define a stream result using the convention plugin. The values
> for the contentLength and inputName require dynamic values. Obviously I
> know, for example, the length of the data stream within my action, but how
> do I  code this so either the @Annotation or the StreamResult can get the
> data from my action - or have I hit the limits of the convention plugin.
>
> Regards
> --
> View this message in context: http://www.nabble.com/Convention-Plugin---Setting-dynamic-parameter-values-tp25922320p25922320.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org