You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Robert Lee <Ro...@rcn.com> on 2002/02/13 23:16:25 UTC
how to question: extracting parameters
I have parameters from a screen that look like this when I display
$data.getParameters() = {line=[1],[2],[3]}{count=[5],[6],[7]}{action=match}
$data.getParameters().line = 1
$data.getParameters().count=5
$data.getParameters().action=match
#foreach($item in $data.getParameters()) ## results in $item being null
#foreach($item in $data.getParameters().line) ## results in $item being
null
#foreach($item in $data.value) ## results in $item being null
Is there a way to access the sub items in line or count?
Robert Lee
Re: how to question: extracting parameters
Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2/13/02 2:16 PM, "Robert Lee" <Ro...@rcn.com> wrote:
> I have parameters from a screen that look like this when I display
> $data.getParameters() = {line=[1],[2],[3]}{count=[5],[6],[7]}{action=match}
> $data.getParameters().line = 1
> $data.getParameters().count=5
> $data.getParameters().action=match
>
> #foreach($item in $data.getParameters()) ## results in $item being null
>
> #foreach($item in $data.getParameters().line) ## results in $item being
> null
>
> #foreach($item in $data.value) ## results in $item being null
>
> Is there a way to access the sub items in line or count?
>
> Robert Lee
$data.Parameters returns a ParameterParser object, not a List. Look at the
API for the PP object to get an idea of what you can do with it.
Thx.
-jon
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>