> As far as I know, checkboxes are supposed to carry unique
> names. This contrary to radiobuttons. In both cases the
> getParameterValues() will return only one value.
That is not true. On screen1 I have a lot of DB rows displayed,
each has a checkbox, all of them have the same name (v1),
but different "value"s:
<input name="v1" type="checkbox">
<xsl:attribute name='value'><xsl:value-of
select='$therow/member_id'/>
</xsl:attribute>
</input>
If user selects a bunch of them and I do in the same action
class:
String [] members = request.getParameterValues("v1");
I will get a bunch of values in array of strings,
so I am able to do some DB operation on all of them.
However, I need to pass that array of Strings
as a parameter to the next screen (screen2),
which is supposed to display detailed screen (all columns)
of that row and allow me to modify it,
So I need to pass in to the action class of screen2.
I am trying to pass it there, so I can implement a page
iteration
(of screen2 pages) through the list of rows selected via
checkboxes on screen1.
In that action class of page2 I am trying to do:
redirector.redirect(true, "screen2?memberId=nextId");
I think it might be possible to do page iteration via sitemap,
but have no idea how to do it. Is there conditional loop
in sitemap ?
Is it possible to make that array of Strings "global"
(accessible from any XSL page like screen2) ?
Please advise.
Thank you,
Oloeg.
--- Geert Josten <[EMAIL PROTECTED]> wrote:
>
> > I tried to create a hidden input variable and
> > pass the value, but getParameterValues() returns me
> > only a single value, while I expect a bunch of values.
>
> As far as I know, checkboxes are supposed to carry unique
> names. This contrary to radiobuttons. In
> both cases the getParameterValues() will return only one
> value. But using getParameterNames() you
> should be able to loop over all parameters and get the value
> of each checkbox like that.
>
> > Could you please give a code sample (for a group of
> Checkboxes)?
>
> Err.. in flowscript (JavaScript) you can do something like:
>
> function getRequestParameters() {
> var mynames = cocoon.request.getParameterNames();
> var myname;
> var myparams = new Object();
>
> while (mynames.hasMoreElements()) {
> myname = mynames.nextElement();
> myparams[myname] = cocoon.request.getParameter(myname);
> }
>
> return myparams;
> }
>
> > Yes, 2.0.4 is a bit old. I am new to Cocoon and got a bunch
> > of Cocoon projects to enhance/do bug fixes/support.
> > Would love to upgrade to 2.1.X, but not sure what is
> involved.
> > Is that difficult?
> > Most likely start it early next year (to take advantage of
> > Lepido).
>
> Hmmm, I am not an expert on that field, but as long as you
> haven't written a lot of Java code, you
> will be safe enough. Component interfaces may have changed a
> bit, but not that much. I think it is
> not difficult. On the other hand, if you want to use the added
> capabilities of the newest Cocoon,
> you will have to find out what new features there are and how
> they could help you.. :-P
>
> Cheers,
> Geert
>
>
---------------------------------------------------------------------
> 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]