Hi Thiago,
I agree to your point that changing css should be the ideal way to change
images.
The problem was that when we changed image through css, the position was to
be decided for each column seperately. Hence as a temporary measure we have
put this script which works fine
sortImage : function(path){
                        
                path = "/"+path+"/assets/kawwa/imgs/";
                
                var objectArray = $$('img.t-sort-icon');
                
                for(var i = 0; i < objectArray.size(); i++)
                {
                        objectArray[i].src = path+"spacer.gif";
                }
                
                var ascSortImg = $$('a.t-sort-column-ascending img');
                
                for(var i = 0; i < ascSortImg.size(); i++)
                {
                        ascSortImg[i].src = path+"pic_up.gif";
                }
                
                var desSortImg = $$('a.t-sort-column-descending img');
                
                for(var i = 0; i < desSortImg.size(); i++)
                {
                        desSortImg[i].src = path+"pic_down.gif";
                }

         }//function ends

We will surely look at a more standard css way to do it. CSS Solutions that
we worked on before writing this script was not fool proof. In this script
now, there is no dependency on any of the existing images from grid

Thanks



Thiago H. de Paula Figueiredo wrote:
> 
> Em Thu, 03 Dec 2009 05:23:43 -0200, sandeepraj singh  
> <[email protected]> escreveu:
> 
>> Hi,
> 
> Hi!
> 
>> We have a component MyGrid which has embedded Tapestry5 Grid component.
>> We needed to change the sorting images with our own and had first applied
>> the changes through css. However, it was giving problems of space  
>> consistency.
> 
> Changing the images through CSS is the recommended way of doing it. If it  
> was giving problems of space consistency, you should fix your CSS.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Grid-Sorting-images-changed---One-of-the-approaches-provided-tp26621714p26635757.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to