Hi,

The way I have done this in the past is to enclose the table in a form.
Unfortunately I use extreme components rather than displaytag, but the
basics should be roughly the same for both. For the purposes of illustration
lets assume you have implemented the form as I mentioned in my previous
email:

<form ...>
...

<display:table id="foo" ....>

<display:column sortable="true" titleKey=" engagementform.archived">
   <input type="checkbox" name="archived" value="${foo.id}"/>
</display:column >

</display:table id="foo" ....>

...

</form>

In your controller (I'm not sure which web frontend you use so cannot give
specifics here) you need to do something like the following:

String[] foosToArchive = request.getParameterValues("archived");

for (String fooId : foosToArchive)
{
  fooManager.archiveFoo(fooId);
}


And that should do it.

Mike

On 7/20/07, Msarda <[EMAIL PROTECTED]> wrote:


Hi Mike,
Thanks for ur reply.

Could you plesae elaborate more on line..
In your form you will then iterate over the values of parameter archived,
and archive each foo with a an id that matches the value.

I am not getting it.Could you please give me some example,suppose in my
case...
What i am thinking is i will call one javascript function onclick of that
checkbox,if that is checked i will add id(eg foo.id) in one List.
But the thing is how will i pass that list to controller that will be
called
for archiving.

I don't know whether i am thinking in right or wrong direction.



Michael Horwitz wrote:
>
> There is  javascript that runs to make the whole row clickable. If you
> remove it from your JSP page, it should disable the behaviour for the
row.
> Look for the javascript call at the bottom of your page called
> highlightTableRows().
>
> You are going to need to pass some sort of key back to your form handler
> to
> identify the rows that have been checked. So you need to do something
> like:
>
> <display:table id="foo" ....>
>
> <display:column sortable="true" titleKey="engagementform.archived">
>     <input type="checkbox" name="archived" value="${ foo.id}"/>
> </display:column >
>
> </display:table id="foo" ....>
>
> In your form you will then iterate over the values of parameter
archived,
> and archive each foo with a an id that matches the value.
>
> Mike.
>
> On 7/19/07, Msarda <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi all,
>>
>> I want to implement archive functionality.
>> On the jsp page where all engagement forms are getting displayed i want
>> to
>> create checkbox under the column "archive".
>> That jsp  page is using <display:table> and <display:column> tags for
>> displaying all data from engagementform table.
>> I tried something like..
>>
>> <display:column sortable="true" titleKey=" engagementform.archived">
>>     <input type="checkbox" name="archived" />
>> </display:column >
>>
>> It is creating check box for each row under that archive column,but
>> "href"
>> property of <display:column> is used for id like..
>>
>> <display:column property="id" sortable="true"
>> href="engagementformform.html " media="html"
>>         paramId="id" paramProperty="id" titleKey="engagementform.id"/>
>>
>> Becuase of this when i am clicking on checkbox it goes to other jsp.
>> I want to keep this "href" facilty also,but only after clicking that id
>> field.Is it possible usinh<display:table> tag.
>>
>> Also i am not getting how will i collect the requests(engagementform)
>> for
>> which the archive checkbox is checked so that i can archive those all
>> records. :(
>>
>> Thanks in advance.
>>
>>
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/Implementing-archiving-functionality-tf4108896s2369.html#a11684426
>> Sent from the AppFuse - User mailing list archive at 
Nabble.com<http://nabble.com/>
.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>

--
View this message in context: 
http://www.nabble.com/Implementing-archiving-functionality-tf4108896s2369.html#a11702907

Sent from the AppFuse - User mailing list archive at 
Nabble.com<http://nabble.com/>
.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to