You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ho...@algorithmics.com on 2009/06/11 18:27:48 UTC

RequestCycle access without injecting

Hi 

Is there any way to get hold of the RequestCycle in tapestry 4.0.x without injecting it ie some static utility that can provide it. Basically I think there is a bug with tables in that if you click a column heading to sort the column the table values are sorted in the rewind.  This means that if you have a checkbox which on rewind records which rows are selected however when the rewind of the checkbox value occurs the values have been sorted so you cannot find the item via PrimaryKeyConverter and I don’t want to provide a Collection with all the results as this is a search so could be large. 

So I’ve tracked it down to BasicTableModelWrap.getCurrentPageRows so I was thinking that if I could implement my own TableSortingState that could hold ‘current’ and ‘future’(sorting info for the render) sorting info and if I could workout there that we’re ‘rewinding’ then use the ‘current’ sorting info and only update the current sorting info when we’re rendering. 

Any help would be greatly appreciated.

Howard 


 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

RE: RequestCycle access without injecting

Posted by Ho...@algorithmics.com.
Hi 
Thanks for the advice but I've found that moving the TableColumns component below the TableRows in the .html fixed the issue. The sort still occurs in the rewind phase but after the rewind of the rows so the checkbox can get the row from the current page data.
Howard

-----Original Message-----
From: andreoua@gmail.com [mailto:andreoua@gmail.com] On Behalf Of Andreas Andreou
Sent: 11 June 2009 18:12
To: Tapestry users
Subject: Re: RequestCycle access without injecting

Why not make your ITableSortingState a service and inject IRequestCycle to that?

On Thu, Jun 11, 2009 at 7:27 PM, <Ho...@algorithmics.com> wrote:
> Hi
>
> Is there any way to get hold of the RequestCycle in tapestry 4.0.x without injecting it ie some static utility that can provide it. Basically I think there is a bug with tables in that if you click a column heading to sort the column the table values are sorted in the rewind.  This means that if you have a checkbox which on rewind records which rows are selected however when the rewind of the checkbox value occurs the values have been sorted so you cannot find the item via PrimaryKeyConverter and I don’t want to provide a Collection with all the results as this is a search so could be large.
>
> So I’ve tracked it down to BasicTableModelWrap.getCurrentPageRows so I was thinking that if I could implement my own TableSortingState that could hold ‘current’ and ‘future’(sorting info for the render) sorting info and if I could workout there that we’re ‘rewinding’ then use the ‘current’ sorting info and only update the current sorting info when we’re rendering.
>
> Any help would be greatly appreciated.
>
> Howard
>
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

 
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
--------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: RequestCycle access without injecting

Posted by Andreas Andreou <an...@di.uoa.gr>.
Why not make your ITableSortingState a service and inject IRequestCycle to that?

On Thu, Jun 11, 2009 at 7:27 PM, <Ho...@algorithmics.com> wrote:
> Hi
>
> Is there any way to get hold of the RequestCycle in tapestry 4.0.x without injecting it ie some static utility that can provide it. Basically I think there is a bug with tables in that if you click a column heading to sort the column the table values are sorted in the rewind.  This means that if you have a checkbox which on rewind records which rows are selected however when the rewind of the checkbox value occurs the values have been sorted so you cannot find the item via PrimaryKeyConverter and I don’t want to provide a Collection with all the results as this is a search so could be large.
>
> So I’ve tracked it down to BasicTableModelWrap.getCurrentPageRows so I was thinking that if I could implement my own TableSortingState that could hold ‘current’ and ‘future’(sorting info for the render) sorting info and if I could workout there that we’re ‘rewinding’ then use the ‘current’ sorting info and only update the current sorting info when we’re rendering.
>
> Any help would be greatly appreciated.
>
> Howard
>
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>
>
> --------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory.
> --------------------------------------------------------------------------
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org