Tab for Search Results

Nov 1, 2013 at 4:45 PM
Hi, I have been using NakedObjects using MVC. When I return an object, it is displayed in a tab and when i click on an associated object it is opened in its own tab. However, when I return a search result containing a list of items, the items are displayed, but not in any tab. When I select an item from the result set the search results are lost and I have to search again. Does anyone know if there is some way for me to keep the search results in a tab?

Many thanks.
Nov 1, 2013 at 4:59 PM
This idea has come up before and is recorded in this ticket, Ronan: (note that the 'history' is now rendered as 'tabs' in the default styling).

It is something we can see the value in, and would very much like to see as a capability. However, the last time we looked at doing it, it turned out to be a lot less trivial than we had hoped and so other things took priority.

(If your client commissions us to do so, we are certainly prepared to have another go at it).

Meantime, the only way to achieve this would be to create a view model that either captures the actual results of the query (i..e. holds the Id of each result object in its own key), or that captures the parameters of the query action as keys, such that the action would be re-run whenever the view model was re-requested (i.e. the user clicked back on that tab) - and be rendered as a collection within the viewmodel, expanded as a table probably. If that's not clear I can sketch it for you next week.