If formatting is not an issue, i.e. for quick debugging you can just
call toString() on the ParameterParser to get a list of all key/values.
So in a template just add
$data.Parameters
john mcnally
Andrea Papotti wrote:
>
> Thank you, It works pretty well, I've also translated it within a .java
> here it is:
>
> -----
> ...
> ParameterParser pp = data.getParameters();
> Enumeration e = pp.keys();
>
> String p = "";
>
> for( ; e.hasMoreElements(); )
> {
> String x = e.nextElement().toString();
>
> p += "\n<br>" + x + " = '" + pp.getString(x) + "'";
> }
> ...
> -------------------
>
> Andrea =8-)
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 26, 2001 11:04 AM
> Subject: RE: unknown form parameters
>
> > I use the following in a velocity template
> >
> > ## display all keys in PP
> > <br/>
> > <h1>Keys in Parameter Parser</h1>
> > #set ($keys = $data.getParameters().getKeys())
> > <table border=1>
> > #foreach ($k in $keys)
> > <tr>
> > <td>$k</td>
> > <td>$data.getParameters().getString($k)</td>
> > </tr>
> > #end
> > </table>
> >
> > Jon
> >
> > -----Original Message-----
> > From: Andrea Papotti [mailto:[EMAIL PROTECTED]]
> > Sent: 26 September 2001 10:04
> > To: [EMAIL PROTECTED]
> > Subject: unknown form parameters
> >
> >
> > I'm trying to build a page which shows ALL the parameters sent by any
> form.
> > BUT, I have not found no methods in RunData, TurbineRunData or
> > ParameterParser, which give me a list of parameter's names.
> >
> > Outside from Turbine I use something like:
> >
> > ---------
> > ...
> > HTTP request = HTTP.getRequest();
> > Hashtable table = request.getURLParameters();
> >
> > int maxsize = table.size();
> >
> > String[] param = new String[maxsize];
> > String[] value = new String[maxsize];
> >
> > Enumeration k = table.keys();
> > Enumeration e = table.elements();
> >
> > int i=0;
> >
> > for( ; k.hasMoreElements(); )
> > {
> > param[i]=k.nextElement().toString();
> > value[i]=e.nextElement().toString();
> > i++;
> > }
> > ...
> > ---------
> >
> > but, under Turbine I can't ever get the 'request' object.
> >
> > any suggestion?
> >
> > Andrea =8-)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > --------------------------------------------------
> > DISCLAIMER: This message contains proprietary
> > information some or all of which may be
> > confidential and/or legally privileged. It is for
> > the intended recipient only who may use and apply
> > the information only for the intended purpose.
> > Internet communications are not secure and
> > therefore the British Biotech group does not
> > accept legal responsibility for the contents of
> > this message. Any views or opinions presented are
> > only those of the author and not those of the
> > British Biotech group. If you are not the intended
> > recipient please delete this e-mail and notify the
> > author immediately by calling ++44 (0)1865 748747;
> > do not use, disclose, distribute, copy, print or
> > rely on this e-mail.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]