You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kranti Parisa <kr...@gmail.com> on 2006/12/12 21:11:00 UTC

Re: internationalization in struts + dynamic checkboxes

Chris,

Thank you very much for the info.
I shall try this and get back to the forum on my findings.

i have been struggling with another issue, that is

Please suggest me some idea to achive the following
 ================
from DB getting empid,empname,salary..etc into a arraylist of beans. that
means each employee record is stored in a bean which is added to arraylist.

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.

thanks in advance!

===============




On 12/13/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kranti,
>
> Kranti Parisa wrote:
> > for this i did the following
> >
> > 1) WEB-INF/classes/resources folder defined all the files
> > example : application.properties, application_fr.properties ..etc
>
> [snip]
>
> > 3) in struts-config.xml file defined the following
> > <message-resources parameter="resources.application"/>
>
> Putting your properties file into a subdirectory may require you to use
> a slash (/) instead of a dot (.) in the name of the bundle. So, try this
> instead:
>
> <message-resources parameter="resources/application" />
>
> and see if that works.
>
> If it doesn't work, try moving your properties file into WEB-INF/classes
> and removing the confusion of the added subdirectory. Once you get
> everything working, you can experiment with changing one thing at a time
> to move your files to your preferred location.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFfwtu9CaO5/Lv0PARAgF0AKCAVIcDZOoDxusV3oPkgHgRCodXYwCgi8Qg
> RnAZHWDuz407MverzFQEVeg=
> =Qie8
> -----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

Re: internationalization in struts + dynamic checkboxes

Posted by Kranti Parisa <kr...@gmail.com>.
Chris,

I will check around.
Thank you very much for the suggestions & help.




On 12/13/06, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kranti,
>
> Kranti Parisa wrote:
> > cant we use <html:checkbox> tag instead of <input type="checkbox"
> >
> > is there any way to assign values & ids to <html:checkbox> dynamically?
>
> Unfortunately, I'm not the person to ask about that. I don't use JSP and
> I'm not very familiar with the JSP tab libraries available through Struts.
>
> Sorry.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFfxKc9CaO5/Lv0PARAot4AJ9C1Ah/nn8S9TbFnkqQNnyME6hr9QCgq5Mo
> c3ZOI1mXhFqxz0NNmOXIX6o=
> =bb8H
> -----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

Re: internationalization in struts + dynamic checkboxes

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kranti,

Kranti Parisa wrote:
> cant we use <html:checkbox> tag instead of <input type="checkbox"
> 
> is there any way to assign values & ids to <html:checkbox> dynamically?

Unfortunately, I'm not the person to ask about that. I don't use JSP and
I'm not very familiar with the JSP tab libraries available through Struts.

Sorry.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFfxKc9CaO5/Lv0PARAot4AJ9C1Ah/nn8S9TbFnkqQNnyME6hr9QCgq5Mo
c3ZOI1mXhFqxz0NNmOXIX6o=
=bb8H
-----END PGP SIGNATURE-----

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


Re: internationalization in struts + dynamic checkboxes

Posted by Kranti Parisa <kr...@gmail.com>.
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 <ch...@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

Re: internationalization in struts + dynamic checkboxes

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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