You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Costa Basil <co...@yahoo.ca> on 2006/03/10 20:42:48 UTC

[shale] how to detect in the backing bean that the user navigates to another page?

I use shale and I was wondering if there is there an easy way to know in a backing bean on the postback that the user actually pressed a commandLink that navigates to another page than the one the backing bean is for. I want to avoid unecessary database calls.

Let me give you an example. Let's say I have a table with rows (populated from the database) and I have on each row a commandLink to delete that row. On the same page I have another commandLink to navigate to another page. If I delete the row the table has to be populated as early as possible for the deleteRow event to be fired. However, if I navigate to another page I don't want to query that table from the database which would happen even if I set immediate to true for the commandLink that navigates the other page. Of course I have the option of using a hidden link to delete the row but ...

		
---------------------------------
Have a question? Yahoo! Canada Answers. Go to Yahoo! Canada Answers