[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Re: Where to put non action associated data
From:       Chris Pratt <thechrispratt () gmail ! com>
Date:       2011-07-31 18:26:32
Message-ID: CAALdY0z4BMnR+dJbEn1=B9d5nSB55kQ1Bzj=qiHm4krzYotaXQ () mail ! gmail ! com
[Download RAW message or body]


This sounds like one of the very few legitimate uses of the chain result
type. Check out http://struts.apache.org/2.0.14/docs/chain-result.html
  (*Chris*)
On Jul 31, 2011 9:50 AM, "Marcus Bond" <marcus@marcusbond.me.uk> wrote:
> 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
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic