Atilim Alci wrote:
>
> I'm looking for a way to put a checkbox on the left side of the
> display:table elements. I'm planning to use this check box to delete the
> records. I'm using struts 2 basic configuration with hibernate support.
> Any working piece of jsp and action class code would be very much
> appreciated.
> Regards..
>
Hello again,
I found my solution myself. I want to share, maybe someone finds usefull;
in my jsp I'm using something like;
<display:column title="<center><input type='checkbox'
style='text-align:center'
name='selectall'
onclick='checkAll(this);'/></center>"
style="text-align:center;">
<s:checkbox name="select[%{#attr.terms_rowNum - 1}]"
value="select[%{#attr.terms_rowNum - 1}]" />
</display:column>
in my Action class I'm implementing a "String[] select" array. Before the
page gets prepared I'm instantiating this array according to the number of
rows that are being displayed, like;
select = new String[number_of_rows];
.
When I invoke a submit action in the form, I get something like [false,
false, true....] in this array. The numbers in the array corresponds to the
element of my real list which is exploded.
If you know any simpler solution, I'd appreciate to hear it too...
Atilim
--
View this message in context:
http://www.nabble.com/Struts2---Checkbox-to-delete-display%3Atable-elements-tp20177968s2369p20193990.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]