I don't think the first option will work, because the call to the menu is in  
autohandler and I don't think I can pass arguements like that from something 
farther down the chain.


I was researching m->notes and globals when I wrote the letter. I wrote the 
letter to see if there was a preferred method or something I was missing. So, 
thanks for the vote for globals :).

I think I may have come up with a better idea, though. I'm looking into making 
the index pages with the multi-layered menus call the applications as 
components. The component name will be like <& $comp &> and menu items for apps 
will call the index page with the $comp's URL attached to the index's pages URL 
with a default set for the first time to the page. I'll have to do some safety 
checking, but I think this may give me the consistency and flexibility I want.

Thanks for your input,

Jimbus




> ----- Original Message -----
> From: "RJ Herrick" <[EMAIL PROTECTED]>
> To: [email protected]
> Subject: Re: [Mason] Stupid Newbie Question #47: passing values to the auto
> Date: Wed, 22 Mar 2006 12:44:33 -0500
> 
> 
> You have a few options.
> 
> Just add the args to the call: <& /some/component, colors => { blue 
> => 'cyan', green => 'mint' } &>
> See http://www.masonbook.com/book/chapter-2.mhtml#TOC-ANCHOR-9, the 
> section "Arguments via Component Calls" partway down.
> 
> If you want something like $r that you can use for your own 
> purposes, you could also use $m->notes, or your own globals, to 
> pass info around without having to explicitly pass it between 
> components. I prefer objects accessed through global scalars, 
> local-ized in my syshandler for each request.
> 
> See info on $m->notes here: 
> http://www.masonhq.com/docs/manual/Request.html#item_notes
> 
> There are no stupid questions, only l no ,sno it seuqd i puts one rae rehT
> 
> HTH,
> RJ Herrick
> 
> Jim Babcock wrote:
> 
> > Hello,
> >
> > I'm wondering how best to pass information to compnents called in 
> > the autohandler. I set up a horizontal menu that is highlighting 
> > the current page's menu item using path info from $r, but I'm 
> > seeing limitations with that method. I'd like to add a sub-menu, 
> > which complicates things, but the real issue is that many of the 
> > applications I'm going to make available could be found on more 
> > than one path... for example one of the reports may be picked 
> > from the reports tab that will be available to one group of users 
> > or from the departmental tab for another group.
> >
> > So know I'm thinking that it might be best to pass the context 
> > and sub-context for the menus as some sort of variable, but I'm 
> > not sure what the best way to do that is. Should I set up a 
> > couple of global variables in the apache conf, create cookies, 
> > add them to the request, can I pass it through Any help would be 
> > appreciated,
> >
> > Jimbus
> >
> >
> >
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users

>


-- 
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to