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]<model-glue%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/model-glue?hl=en >> > > > > -- > William Osler - "We are here to add what we can to life, not to get what we > can from life." > > -- > 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]<model-glue%[email protected]> > For more options, visit this group at > http://groups.google.com/group/model-glue?hl=en > -- 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
