I'll definitely be interested in checking it out mate.
I like your idea of specifying event variables as that does make it more complete and like you say catches form values etc. Storing the entire values is an option but might lead to lots of extra data being stored that isn't needed. My viewstate often contains lots of complex objects that wouldn't need storing for instance. --- James Allen From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Rawlins Sent: 09 October 2008 12:32 To: [email protected] Subject: [Model-Glue] Re: A recent tasks toolbar. Haha *high fives J, Good to hear from you mate, I thought you'd be lurking around here somewhere. Do you facebook? Capturing the URL in its entirety is a very nice idea, it's certainly simple, I just wonder if we're running the risk of missing form values which might be used on that page, this is why I thought copying individual values directly from the viewstate might be good. It would be nice to be able to crop out the second argument of my broadcast so I don't have to specify the viewstate values to save though, perhaps it's worth considering saving the entire viewstate, hmm, interesting thought. It should be a droppable little module once it's all tied up so I'll be sure to share a copy with you. Rob From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of James Allen Sent: 09 October 2008 12:12 To: [email protected] Subject: [Model-Glue] Re: A recent tasks toolbar. /me high fives Sir Rawlins Love that idea Rob and reckon you've got it spot on. I use something slightly similar on my question and answer website. I have a 'rememberThis' broadcast which stores the current URL in session scope (although encapsulated within my URLTools singleton). I can then jump back to various pages which the user needs to be able to go back to after completing an interrupt event. Top idea you have there.. I might have to nick it.. ;) --- James Allen From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Rawlins Sent: 09 October 2008 12:06 To: [email protected] Subject: [Model-Glue] A recent tasks toolbar. Morning All, It's been a while since I've had my ColdFusion hat on but at long last I've got the chance to jump back into things which is an excellent feeling. I have a challenge today and I'm looking for your input and suggestions on how you think this could be cleanly implemented. We have here a CRM application which is built upon MG:U, CS and Transfer and allows us to manage all our prospect and current customers. I'm looking to construct a 'Recent Tasks' type toolbar for the application which can sit in the users menu and lists a bunch of recently performed tasks so they can quick hop back to them. I'm also looking to branch this idea into a 'Popular Tasks' toolbar which lists tasks which they perform on a regular basis over an extended period of time. The plan for the list of tasks is that it'll slowly grow into something like this: . Added new customer. . Edited Customer: Robert Rawlins . Viewed Call Log . Edited Customer: John Doe . Sent Email To: Robert Rawlins As you can see and imagine, some of these tasks are formed by a generic URL, things like 'Viewed Call Log' is simply a case of browsing to "?event=call.log" however, some of these tasks have more parameters which need to be taken into account, such as 'Edited Customer: John Doe' in which we need to pass his customer_id in the url like '?event=edit.customer&customer_id=657' for instance. And also customise the text for the link to include his name. I want to make this little concept as reusable as possible and I'm thinking that it would really be nice if I could form a solution which was purely based in XML and could be configured solely from model-glue.xml. My current thought is to have a broadcast on any events which I want the system to 'remember' as a recent activity, perhaps defining it something like this: <broadcasts> <message name="trackEvent"> <argument name="title" value="Edited Customer: [customer_name]" /> <argument name="viewstate_variables" value="customer_name, customer_id" /> </message> </broadcasts> The idea behind this is that the message handler for trackEvent compiles a key/value pair into the users session, the key being the title/linktext, which it forms by replacing the [whatever] variable in the string with the corresponding value from the viewstate It then forms the value for the pair, which is the URL for the link, it does this by grabbing the current events name, and appending the viewstate_variables and their values to the URL. I can't currently foresee any problems with this approach but I wanted to open it up to you guys and get your thoughts, do you think this is the correct way to go about this? I really like the xml only implementation which would allow me to cleanly track the users recent activities and allow them to jump back to it with a single click. Cheers All, Rob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en For more about Model-Glue, check http://www.model-glue.com . -~----------~----~----~----~------~----~------~--~---
