Ya know, its open source / community contribution, so if you think others may want the same level of detail you feel is missing, you can add it yourself =)
Just sayin Chris On 7/28/10 11:20 PM, "Paul Milleson" <[email protected]> wrote: > okay, sorry for the misUnderstanding... it would have been nice if the > tutorial said something like: we're having you append > a bogus request format "&requestformat=print" to the popup url so that in > this particular case, the code will be unable to match with any actual > formatted views and therefore, won't use any. > > In general, I wish this tutorial was a lot more explanatory. In some cases, > I'm led to make a sequence of 5 different edits, in 5 different places, and > I'm supposed to somehow understand exactly what I just did to the app and what > each edit accomplished. There's not one word between edits giving at least > one sentence's worth of summary. Don't get me wrong, I'm quite grateful that > this even exists at all, but for the author, all that's happening is mere > child's play and self explanatory, but for me there are still lots of > questions. For example, how does this: > <event-types> > <event-type name="templatedPage"> > <after> > <views format="html"> > <include name="navigation" template="layout/Layout.Navigation.cfm"> > <value name="xe_ShipmentList" value="Shipment.List" /> > </include> > <include name="message" template="layout/Layout.MessageBox.cfm" /> > <include name="footer" template="layout/Layout.Footer.cfm" /> > <include name="main" template="layout/Master.Layout.cfm" /> > </views> > </after> > </event-type> > </event-types> > wrap all the other sections that refer to "templatedPage" without its view > content existing as just a variable that all sections can use? How does this > hardcoded content disappear and "wrap" other sections' content ? > > By the way, I followed the whole tutorial, all the way to the end and got > everything to work... I even got more scaffold object types to work, but I was > really hoping to get lots of detail on the most import aspect of Model Glue - > exactly how does all the data handling work. How does the form get the data > into the service layer. How does the service layer get the data into the > database... what's going on between the service layer and the control layer... > these are the very things that will determine whether a company adopts this > framework or ops for another... > > but i'm glad I had at least this level of exposure, and soon, i'll be getting > around to learning this app line by line... > > Paul > On Wed, Jul 28, 2010 at 9:52 AM, Dennis Clark <[email protected]> wrote: >> Easy there, Paul. Nobody is lying to you. You are misunderstanding how the >> Print Friendliness is being implemented in the tutorial. >> >> I'm sure either Dan (project leader) or Ezra (2nd in command & author of the >> training materials) would do a better job of explaining the materials, but >> they're both busy at the CFUnited conference for the rest of this week so >> I'll try to fill in for them as best as I can. >> >> The key here is "less is more". In order to display a Print Friendly view, we >> want to omit the standard HTML skin that we are wrapping around our requests. >> This standard skin is being applied though "after" views in the >> "templatedPage" event type, so all we need to do is to tell Model-Glue to not >> include those views for print-friendly requests. >> >> We can exclude a views section from a request by limiting the section to a >> request format that does not match the current request format. We still want >> the views included for standard requests, so the best option is to limit the >> section's request format to the default request format ("html"). As long as >> the request contains a value for url.requestformat or form.requestformat >> other than "html", those views will be excluded. >> >> Note that we do not want to specify the format for the views section in the >> "Shipment.Display" event handler because we want those views to be included >> for all request formats. >> >> If we needed to add content to the response to implement Print Friendliness >> then we could add a <views format="print"> section to the event handler or >> event type in ModelGlue.xml. However in this particular case it is not >> necessary: simply omitting the standard HTML layout is sufficient. >> >> If you need further assistance, please provide what you have for >> ModelGlue.xml and Display.Shipment.cfm via http://modelglue.pastebin.com/ so >> we can see we're you're at and show you what you need to change to make it >> work. >> >> Regards, >> >> -- Dennis >> >> >> On Wed, Jul 28, 2010 at 4:20 AM, Paul Milleson <[email protected]> >> wrote: >>> If a views block has a format attribute, we match it to the requestformat >>> value. >>> <views format="html"> >>> If a views block does NOT have a format attribute, we render it. (Since >>> there are no exclusions or filtering indicated). >>> <views> >>> >>> precisely, so this >>> page: http://docs.model-glue.com/wiki/Training/Section04 is dropping the >>> ball completely. >>> >>> we are being instructed to create a new requestformat value to use for >>> printing as follows: >>> >>> 1. We will now add in a request format URL parameter to the link. Append the >>> following to the link: >>> view plain <http://docs.model-glue.com/wiki/Training/Section04#> copy to >>> clipboard <http://docs.model-glue.com/wiki/Training/Section04#> print >>> <http://docs.model-glue.com/wiki/Training/Section04#> ? >>> <http://docs.model-glue.com/wiki/Training/Section04#> >>> 1. &requestformat=print >>> then we are told to: >>> >>> 1. Next, open /PlantOMatic/config/ModelGlue.xml and find <event-types>. Add >>> a new attribute to the <views> tag called format and assign the value of >>> html. >>> view plain <http://docs.model-glue.com/wiki/Training/Section04#> copy to >>> clipboard <http://docs.model-glue.com/wiki/Training/Section04#> print >>> <http://docs.model-glue.com/wiki/Training/Section04#> ? >>> <http://docs.model-glue.com/wiki/Training/Section04#> >>> 1. <views format="html"> >>> AND THAT IS ALL THAT WE'RE BEING TOLD TO DO - PERIOD - END OF EDITS ! We are >>> not told to make an additional section where we just have a <view> tag by >>> itself (as you indicated), nor are we being told to make a new view section >>> (<views format="print">) with special omissions which would allow the popup >>> print page to render without the header and footer... so when we are shown >>> the example of how our print page now pops up, we are being lied to (because >>> we've done nothing to make it behave in this way). >>> >>> And when the text makes this claim, we are also being lied to: >>> >>> We excluded the Navigation, Footer and Master.Layout.cfm content through the >>> use of the requestformat URL parameter and format attribute on our >>> templatedPage Event Type. >>> >>> because we did nothing of the sort... the ball was dropped several lines >>> above and no editing instructions were given that would accomplish any of >>> this. >>> >>> but the edit that was skipped is simple, and all that's lacking is >>> instructions to add the missing section in >>> here: /PlantOMatic/config/ModelGlue.xml >>> >>> <event-handler name="Shipment.Display" type="templatedPage"> <broadcasts> >>> <message name="needShipmentDetail" /> </broadcasts> <views format="html"> >>> <include name="primary" template="Display.Shipment.cfm"> <value >>> name="xe_ShipmentList" value="Shipment.List" /> <value name="xe_ItemForm" >>> value="Item.Form" /> <value name="xe_ShipmentDisplay" >>> value="Shipment.Display" /> <value name="xe_ItemRemove" >>> value="doItem.Remove" /> </include> </views> <views format="print"> <include >>> name="main" template="Print.Layout.cfm" /> </views> >>> ... >>> with a new additional page: /views/Print.Layout.cfm with the following code: >>> >>> <h3>#ShipmentDetail.name#</h3> >>> <a href="#linkShipment#">Back to List</a> >>> <table class="feature"> >>> <caption><form action="#linkItemForm#" method="post"><input type="submit" >>> name="New Item" value="New Item"></form></caption> >>> <thead> >>> <tr> >>> <th> </th> >>> <th> </th> >>> <th>Count Available</th> >>> <th>Size</th> >>> <th>Date Available</th> >>> <th> </th> >>> </tr> >>> </thead> >>> <tbody> >>> <cfloop query="ShipmentDetail"> >>> <tr <cfif ShipmentDetail.RecordCount MOD 2 IS 0>class="even"</cfif>> >>> <td><a href="#linkItemForm#&ItemID=#ItemID#">Change</a></td> >>> <td>#commonname#</td> >>> <td class="numeric">#Quantity#</td> >>> <td>#Size#</td> >>> <td>#DateAvailable#</td> >>> <td><a href="#linkItemRemove#&ItemID=#ItemID#">Remove</a></td> >>> </tr> >>> </cfloop> >>> </tbody> >>> </table> >>> >>> burma shave >>> >>> On Thu, Jul 22, 2010 at 5:00 AM, Dan Wilson <[email protected]> wrote: >>>> Paul, >>>> >>>> I think I see the disconnect now. The way formats work is like this. >>>> >>>> If you do not pass a requestformat variable, we default the value to html >>>> ( http://docs.model-glue.com/wiki/HowTos/HowToUseFormats#Formats ) >>>> >>>> If a views block has a format attribute, we match it to the requestformat >>>> value. >>>> >>>> <views format="html"> >>>> >>>> If a views block does NOT have a format attribute, we render it. (Since >>>> there are no exclusions or filtering indicated). >>>> >>>> <views> >>>> >>>> By the way, have you been building the training application as part of the >>>> process or have you just been trying to read along? >>>> >>>> >>>> DW >>>> >>>> >>>> >>>> >>>> >>>> On Thu, Jul 22, 2010 at 1:29 AM, Paul Milleson <[email protected]> >>>> wrote: >>>>> correction, green hyperlinks on a white background... (not on black) if >>>>> there is a navigation path that i missed which reveals the attached, >>>>> please advise ? >>>>> >>>>> >>>>> >>>>> On Wed, Jul 21, 2010 at 2:16 AM, Paul <[email protected]> wrote: >>>>>> Has anyone noticed that in the Model Glue training section 4 where >>>>>> there are supposed to be instructions for setting up and making a >>>>>> printer ready page that uses a <views format="print"> - calling a >>>>>> section where the header and footer are excluded - that the example >>>>>> never goes on to show how to make this section ? >>>>>> >>>>>> Paul >>>>> -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog 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
