[jifty-devel] : Dispatcher/ Request Mapper difficulties

Steve H s_t_e_v_e_h at hotmail.com
Thu Oct 18 20:47:14 EDT 2007

>> Thanks for the prev reply. From following your guide, I've now got the
>> Dispatcher processing the POST through the Action, then I inspect the result
>> in the 'on POST ... run' part. I was missing the significance of the
>> Action when merely wanting to inspect the POSTed data in the Dispatcher.
>> Now I want to use some of that 'result' data to feed to a fragment that is
>> supposed to be displaying in a different region. (when using a 'show' for
>> example, I get it rendered into the same region the search criteria was
>> entered into.) ...so, in summary, any pointers on what's needed to have a
>> different fragment now called (from the Dispatcher, after the original
>> POST's Action returns) that can access data from the Dispatcher (I could now
>> for example: set var => data), and have that fragment render it it's usual
>> place in some other region?
> I think you can do much that within the submit button in the template. The
> Jifty::Request::Mapper can take the results of an action and put that back
> into the arguments passed to a region request.
> You might want to read that documentation... unfortunately, Jifty is
> seriously lacking in some good synopsis examples.
> I've been working my way through the docs trying to add a SYNOPSIS section
> to everything in addition to general clean-up and such, but I somewhere
> around Jifty::Dispatcher in the alphabet... My deadlines at work have been a
> little tight lately so I haven't had time to spend on important but not
> urgent work like helping add documentation to Jifty. :(

Andrew, thanks for your reply.

...thing is though, I'm only just learning to speak "Jifty".  The only bit I understood from the doco on Request::Mapper was "The prime example..." sentence.  Not actually the next sentence which was the solution, though.  The doc uses what seems like a lot of Jifty-speak.  I'm having great difficulty understanding "...establishing a mapping between some part of the Jifty::Result of the Create action, and the ID query parameter...", AND trying to interpret the overall doc/page in light of the issue I'm trying to solve.  I'm really not sure to what all these abstracted terms refer, or in what circumstances.  Really, I'm still at the 'look at some code examples' in order to get through the "a-ha" moments.
Please, are there any code examples I could be pointed at for this sort of thing.
To reiterate what was needed:  a submit occurs from a form/fragment of say, some search criteria. It's action runs to verify that search criteria (which can also make it available via Result to the Dispatcher).  At the (dispatcher) stage of 'on' (i.e. after the action has run), I was wanting to have a different fragment execute that would display the search results in it's different region; that fragment/region would also include a collection/pager that it could subsequently er, Page through.  That generally describes what I was trying to do -- attempting what I thought was sensible, being to break the app and pages up into manageable/functional chunks, isolating those (page regions) that could/should be able to update independently... thing being though, is how to choreograph the thing... it was a major move forward when I better understood the Dispatcher, but now I'm lost as to how to have a different fragment/region process with results from another.   From a new user perspective, and I'm sure I'm not alone in this, I'm totally lost when it comes to what/how Jifty choreographs things -- left to imagine how it might do things... experimenting with code... looking at examples... correlating them with the docs... hitting brick walls...  Like I've said, it was a significant move forward for me with your help re the Dispatcher... albeit I'm now at this brick wall.  I'm sure being able to convey an understanding of the choreography would be a significant leap forward for new Jifty users.   Oh, and apologies for the somewhat wordy post here... a combination of trying to contribute by outlining issues encountered as a perhaps typical new user, and a plea for help.


What are you waiting for? Join Lavalife FREE

More information about the jifty-devel mailing list