struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kranti Parisa" <kranti.par...@gmail.com>
Subject Re: internationalization in struts + dynamic checkboxes
Date Tue, 12 Dec 2006 20:28:23 GMT
Chris,

cant we use <html:checkbox> tag instead of <input type="checkbox"

is there any way to assign values & ids to <html:checkbox> dynamically?


On 12/13/06, Christopher Schultz <chris@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kranti,
>
> Kranti Parisa wrote:
> > now i want to display the arraylist in jsp
> > the empid should be assigned to check box
> > so each row should contain checkboxe which is going to populate
> dynamically
> > and carry empid
> >
> > so that when i select the checkbox and click on delete it should capture
> > the empid of that checkbox and delete.
>
> This sounds pretty simple. I don't work with JSP so forgive me if this
> is not 100% correct.
>
> <form>
> .
> .
> .
>
> <logic:iterate id="employee" name="employeeList">
> <input type="checkbox" name="delete_employeeId" value="<bean:write
> name="employee" property="empid" />" />
> [the rest of the row of data to display]
> </logic:iterate>
> .
> .
> .
> </form>
>
> When you submit your form, check to see if there are any values for the
> parameter name "delete_employeeId" (they must be accessed using the
> array form of the Request.getParameter method, like this:
>
> String[] idsToDelete = request.getParameterValues("delete_employeeId");
>
> You may need to convert these String values into numeric values if you
> use numeric identifiers for your records.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFfxBl9CaO5/Lv0PARAht5AJ95eUZcaTO5P7gQvdHxqVvddA2nbgCgwWBf
> utb9kKOKgBhQn32bRDR4ZmU=
> =G5wj
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
------------------
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625             +91 - 9391 - 438 - 738

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message