[jifty-devel] FW: Some help and/or pointers to doco: updating
calling other region's/fragments from an action
s_t_e_v_e_h at hotmail.com
Mon Oct 8 21:38:08 EDT 2007
> From: s_t_e_v_e_h at hotmail.com
> To: jifty-devel at lists.jifty.org
> Subject: Some help and/or pointers to doco: updating calling other region's/fragments from an action
> Date: Sun, 7 Oct 2007 23:19:35 +1000
> I was unable to see from doco or example, how I would cause another region/fragment to update from a different region's action.
> For example, I have a page that I've composed with various Regions. One of these can have search criteria entered, another can add entries, and another includes a table of data fetched/displayed via a collection and pager. I was wanting to have the pager fragment execute to repopulate it's region following input/submit of data into either the Search region or the Add region. Both the search and add have an Action defined. I'd anticipated using criteria entered in the Search, as args for the Collection used in the pager fragment.
> The appropriate doco or examples have so far eluded me... along with any perhaps more Jifty'esq ways to do it.
An update: Someone responded to me via the IRC. The penny that hadn't dropped for me was related to what is calling what/when/where... in that I was looking for how to call a fragment after processing an Action, when all along it was the fragment/s that had called the Action in the first place and thus execution would naturally return there after processing the action... so I just had to include a bit of trace/debug and look a bit closer at the call stack. All that said though, I needed to use info from args that were visible in the Action. It then became apparent that the same args were visible in the calling fragment that execution returned to... thing was though, I needed that info in a fragment that was called then from that fragment. After much poking and proding, it became apparent that I needed to declare the call to the fragment in which I need the info with a "default =>" clause and line it up with the args in the called fragment.
...so far, surviving the learning curve.
New music from the Rogue Traders - listen now!
More information about the jifty-devel