Error processing snippet:
content_id=main
Reason: Method Not Found
XML causing this error:
note: this error is displayed in the browser because
your application is running in "development" or "test" mode.If you
set the system property run.mode=production, this error will not
be displayed, but there will be errors in the output logs.
Reason: Method Not Found
XML causing this error:
<body xmlns="http://www.w3.org/1999/xhtml"> <div id="globalWrapper"> <div class="splitheader"> <span class="prev"><a href="index-13.2.html#Next" name="prev" class="prev">Previous: Section 13.2</a></span> <span class="up"><a href="index-Chapter-13.html" class="up">Up: Chapter 13</a></span> <span class="next"><a href="index-13.4.html#prev" name="Next" class="next">Next: Section 13.4</a></span> </div> <h2 class="Section"> <a name="toc-Section-13.3" class="toc">13.3</a> Creating the view </h2> <div class="Standard"> Next you have to create a file that corresponds to the path defined in the <tt>SiteMap</tt>. So, let’s look at the <tt>src/main/webapp/index.html</tt> file: </div> <div class="listing"> <div class="caption"> index.html </div> <pre class="listing brush: scala"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Home</title> <div class="lift:surround?with=default&at=content" id="main"> <div> Hi, I'm a page that contains the time: <span class="lift:TimeNow">??? some time</span>. </div> <div> And a button: <button class="lift:ClickMe">Click Me</button>. </div> </div> </pre> </div> <div class="Standard"> The page is valid HTML5. <tt><body class="lift:content_id=main"></tt> says “ignore everything on this page except the Element with id ’main’.” </div> <div class="Standard"> <tt><div id="main" class="lift:surround?with=default&at=content"></tt> says “Wrap the default page chrome around this Element.” </div> <div class="Standard"> <tt><span class="lift:TimeNow">??? some time</span></tt> says “Find the <tt>TimeNow</tt> snippet and transform this Element with the rules contained in that snippet.” See <a href="index-7.1.html#sec:Snippets" class="Reference">7.1 on page 1↑</a>. The result will be <tt><span>Fri Jan 21 11:30:34 PST 2011</span></tt> </div> <div class="Standard"> So, that’s simple. You tell Lift what Snippet to use to transform your static content into dynamic content. </div> <div class="splitheader"> <span class="prev"><a href="index-13.2.html#Next" name="prev" class="prev">Previous: Section 13.2</a></span> <span class="up"><a href="index-Chapter-13.html" class="up">Up: Chapter 13</a></span> <span class="next"><a href="index-13.4.html#prev" name="Next" class="next">Next: Section 13.4</a></span> </div> <p class="bottom">(C) 2012 David Pollak</p> </div> <script type="text/javascript">SyntaxHighlighter.all()</script> </body>