Hi,

 

Say I have a form where user can carry out a product search which hits an
action and returns a list of results - easy.. however in response to the
user changing their search criteria I want to also generate some search
terms which would be passed through to Ebay, google ads etc.. but not within
my action which is designed with one purpose in mind - to search my db (the
action doesn't know about google ads, ebay, AWS or any other thing that
comes along). Gut reaction here is to fire an event (say product changed)
and have some listeners do the work of generating the relevant google / ebay
stuff and storing this in the users session.

 

Firstly, is this how most of you would go about it?

 

Secondly in terms of the view side of things, whilst normally my action
would simply return 'success' I may want to tweak the view depending upon
which external source returned the best results (currently I use tiles but I
don't think I can or should dynamically switch the result after my action
has processed).. How would you tackle this? By adding logic to the tile /
template jsp or some other means?

 

Can any of you share experiences of using Struts in apps like this and how
you tackled similar scenarios or if maybe another framework is more suited?
You'll have to bear with me here since all my work thus far has had no need
to collaborate data from multiple sources in one page.

 

Regards and thanks in advance,

Marcus 

Reply via email to