This is probably most helpful: http://www.masonhq.com/?FAQ:Components#h-i_m_trying_to_generate_an_image_or_other_binary_file__but_it_seems_to_be_getting_corrupted_
On Dec 16, 2008, at 4:23 PM, Anthony Ettinger wrote: > I have a page, results.html > The page shows search results for a given set of criteria...I have > added an "Export" button that reposts the same search criteria but > intercepts the display and calls a mason component that delivers a > comma-separate-value file for download. > > This works fine, except that I'm still getting the header/footer html > from ./pages/autohandler. > This is how I'm calling the sub request: > > ./pages/results.html has this at the bottom of <%init> > > <%init> > ... > if ( $action eq 'export' ) { > $m->comp('/csv', filename => 'results.csv', csv_data => > $result_hash); > } > </%init> > > I'm having a difficult time finding a way to disable the > ./pages/autohandler from being used, typically the component would > have a flag that disables inheritance: > <%flag> > inherit => undef > </%flag> > > ...but when I call the 'csv' component this way, it is still using the > ./pages/results.html autohandler. > > Is there a way to dynamically disable the autohandler from inside the > <%init> block of results.html? > Or is there a better way to pass the $result_hash (all the data from > the search results in results.html) into a new page request? (I don't > want to have to duplicate all the code that gets the results hash from > the DB in two different places). > > > Thank you, > > -- > Anthony Ettinger > 408-656-2473 > http://anthony.ettinger.name > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, > Nevada. > The future of the web can't happen without you. Join us at MIX09 to > help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Mason-users mailing list > Mason-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mason-users ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users