Author: buildbot
Date: Sat Feb 21 13:19:45 2015
New Revision: 940973
Log:
Production update by buildbot for tapestry
Modified:
websites/production/tapestry/content/cache/main.pageCache
websites/production/tapestry/content/templating-and-markup-faq.html
Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/tapestry/content/templating-and-markup-faq.html
==============================================================================
--- websites/production/tapestry/content/templating-and-markup-faq.html
(original)
+++ websites/production/tapestry/content/templating-and-markup-faq.html Sat Feb
21 13:19:45 2015
@@ -82,77 +82,7 @@ table.ScrollbarTable td.ScrollbarNextIco
</div></div><p>Part of the DOCTYPE is the declaration of entities such as
<code>&nbsp;</code>.</p><p>Alternately, you can simply use the numeric
version: <code>&#160</code>; This is the exact same character and will
render identically in the browser.</p><p>Starting in release 5.3, Tapestry
introduces an XHTML doctype when no doctype is present; this means that common
HTML entities will work correctly.</p><h3
id="TemplatingandMarkupFAQ-Whydosomeimagesinmypageshowupasbrokenlinks?">Why do
some images in my page show up as broken links?</h3><p>You have to be careful
when using relative URLs inside page templates; the base URL may not always be
what you expect. For example, inside your <code>ViewUser.tml</code> file, you
may have:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="theme: Default; brush: xml; gutter: false"
type="syntaxhighlighter"><![CDATA[ <img class="icon"
src="icons/admin.png"/>${user.name} has Administrative access
]]></script>
-</div></div><p>This makes sense; <code>ViewUser.tml</code> is in the web
context, as is the <code>icons</code> folder. The default URL for this page
will be <code>/viewuser</code></p><p></p><p></p><p></p><p></p><p><style
type='text/css'>
-.FootnoteMarker, .FootnoteNum a {
- background: transparent
url(/confluence/download/resources/com.adaptavist.confluence.footnoteMacros:footnote/gfx/footnote.png)
no-repeat top right;
- padding: 1px 2px 0px 1px;
- border-left: 1px solid #8898B8;
- border-bottom: 1px solid #6B7C9B;
- margin: 1px;
- text-decoration: none;
-}
-.FootnoteNum a {
- margin-top: 2px;
- margin-right: 0px;
-}
-.FootnoteNum {
- font-size: x-small;
- text-align: right;
- padding-bottom: 4px;
-}
-.footnote-th1 {
- text-align: right;
-}
-.Footnote {
- padding-left: 7px;
- margin-bottom: 4px;
- border: 1px none #DDDDDD;
- writingMode: tb-rl;
-}
-.accessibility {
- display: none;
- visibility: hidden;
-}
-@media aural,braille,embossed {
- .FootnoteMarker, .FootnoteNum a {
- border: 1px solid #000000;
- background: #ffffff none;
- }
- .accessibility {
- display: run-in;
- visibility: visible;
- }
-}
-</style>
-<script type='text/javascript' language='JavaScript'>
-//<!--\n
-var effectInProgress = {};
-var despamEffect = function (id,effectType,duration) {
- if ((effectInProgress[id]) || (typeof(Effect)=="undefined") ||
(typeof(Effect[effectType])=="undefined")) return;
- new Effect[effectType](id);
- effectInProgress[id]=true;
- setTimeout('effectInProgress[\"'+id+'\"]=false;',duration*1000);
-};
-var oldFootnoteId = '';
-var footnoteHighlight = function(id,pulsateNum) {
- if (oldFootnoteId!='')
document.getElementById('Footnote'+oldFootnoteId).style['borderStyle'] = 'none';
- oldFootnoteId = id;
- document.getElementById('Footnote'+id).style['borderStyle'] = 'solid';
- despamEffect('Footnote'+id,'Highlight',1)
- if (pulsateNum) despamEffect('FootnoteNum'+id,'Pulsate',3)
-}
-var footnoteMarkerHighlight = function(id) {
- if (oldFootnoteId!='')
document.getElementById('Footnote'+oldFootnoteId).style['borderStyle'] = 'none';
- oldFootnoteId = '';
- despamEffect('FootnoteMarker'+id,'Pulsate',3)
-}
-//-->
-</script>
-<sup id="FootnoteMarker1">
- <a shape="rect" class="FootnoteMarker" name="FootnoteMarker1"
href="#Footnote1" onclick="footnoteHighlight("1",true);"
alt="Footnote: Click here to display the footnote" title="Footnote: Click here
to display the footnote">
- 1
- </a>
-</sup></p><p></p><p></p><p></p><p></p><p> </p><p>However, most likely,
the ViewUser page has a page activation context to identify which user is to be
displayed:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div><p>This makes sense; <code>ViewUser.tml</code> is in the web
context, as is the <code>icons</code> folder. The default URL for this page
will be <code>/viewuser (assuming that ViewUser class is in the
_root-package_.{{pages}} package).<br clear="none"></code></p><p>However, the
ViewUser page might use a page activation context to identify which user is to
be displayed:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[public class ViewUser
@Property
@@ -161,12 +91,7 @@ var footnoteMarkerHighlight = function(i
. . .
]]></script>
-</div></div><p>With a page activation context, the URL for the page will
incorporate the id of the User object, something like
<code>/viewuser/37371</code>. This is why the relative URLs to the
<code>admin.png</code> image is broken: the base path is relative to the page's
URL, not to the page template</p><p></p><p></p><p></p><p></p><p>
-<sup id="FootnoteMarker2">
- <a shape="rect" class="FootnoteMarker" name="FootnoteMarker2"
href="#Footnote2" onclick="footnoteHighlight("2",true);"
alt="Footnote: Click here to display the footnote" title="Footnote: Click here
to display the footnote">
- 2
- </a>
-</sup></p><p></p><p></p><p></p><p></p><p>.</p><p> </p><p>One solution
would be to predict what the page URL will be, and adjust the path for
that:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+</div></div><p>With a page activation context, the URL for the page will
incorporate the ID of the User object, something like
<code>/viewuser/37371</code>. This is why the relative URL to the
<code>admin.png</code> image is broken: the base path is relative to the page's
URL, not to the page template. (In fact, the page template may not even be in
the web context, it may be stored on the classpath, as component templates
are.)</p><p>One solution would be to predict what the page URL will be, and
adjust the path for that:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
<script class="theme: Default; brush: xml; gutter: false"
type="syntaxhighlighter"><![CDATA[ <img class="icon"
src="../icons/admin.png"/>${user.name} has Administrative access
]]></script>
</div></div><p>But this has its own problems; the page activation context may
vary in length at different times, or the template in question may be a
component used across many different pages, making it difficult to predict what
the correct relative URL would be.</p><p>The <em>best</em> solution for this
situation, one that will be sure to work in all pages and all components, is to
make use of the <code>context:</code> binding prefix:</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -208,19 +133,7 @@ table.ScrollbarTable td.ScrollbarParent
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width:
16px;border: none;}
-/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td
colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect"
href="general-questions.html"><img align="middle" border="0"
src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16"
height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName"
width="33%"><a shape="rect" href="general-questions.html">General
Questions</a> </td><td colspan="1" rowspan="1" class="ScrollbarParent"
width="33%"><sup><a shape="rect" href="frequently-asked-questions.html"><img
align="middle" border="0"
src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8"
height="8"></a></sup><a shape="rect"
href="frequently-asked-questions.html">Frequently Asked Questions</a></td><td
colspan="1" rowspan="1" class="ScrollbarNextName" width="33%"> <a
shape="rect" href="page-and-component-classes-faq.html">Page And Component
Classes FAQ</a></td><td colspan="1" rowspan="1" class="Scrol
lbarNextIcon"><a shape="rect" href="page-and-component-classes-faq.html"><img
align="middle" border="0"
src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16"
height="16"></a></td></tr></table></div><p> </p><p> </p><p></p><p></p><p></p><p></p><p><table
class="Footnotes" style="width: 100%; border:none;" cellspacing="0"
cellpadding="0" summary="This table contains one or more notes for references
made elsewhere on the page."><caption
class="accessibility">Footnotes</caption><thead class="accessibility"><tr
class="accessibility"><th colspan="1" rowspan="1" class="accessibility"
id="footnote-th1">Reference</th><th colspan="1" rowspan="1"
class="accessibility" id="footnote-th2">Notes</th></tr></thead><tbody><tr
name="Footnote1"><td colspan="1" rowspan="1" valign="top" class="FootnoteNum"
headings="footnote-th1">
- <a shape="rect" id="FootnoteNum1" href="#FootnoteMarker1"
onclick="footnoteMarkerHighlight("1");"
onmouseover="footnoteHighlight("1",false);" alt="Footnote: Click to
return to reference in text" title="Footnote: Click to return to reference in
text">
- 1
- </a>
- </td><td colspan="1" rowspan="1" valign="top" class="Footnote"
id="Footnote1" width="100%" headings="footnote-th2">
- Assuming that class ViewUser is in the
<em>root-package</em>.<code>pages</code> package.
- </td></tr><tr name="Footnote2"><td colspan="1" rowspan="1" valign="top"
class="FootnoteNum" headings="footnote-th1">
- <a shape="rect" id="FootnoteNum2" href="#FootnoteMarker2"
onclick="footnoteMarkerHighlight("2");"
onmouseover="footnoteHighlight("2",false);" alt="Footnote: Click to
return to reference in text" title="Footnote: Click to return to reference in
text">
- 2
- </a>
- </td><td colspan="1" rowspan="1" valign="top" class="Footnote"
id="Footnote2" width="100%" headings="footnote-th2">
- In fact, the page template may not even be in the web context, it
may be stored on the classpath, as component templates are.
- </td></tr></tbody></table></p><p></p><p></p><p></p><p></p></div>
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td
colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect"
href="general-questions.html"><img align="middle" border="0"
src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16"
height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName"
width="33%"><a shape="rect" href="general-questions.html">General
Questions</a> </td><td colspan="1" rowspan="1" class="ScrollbarParent"
width="33%"><sup><a shape="rect" href="frequently-asked-questions.html"><img
align="middle" border="0"
src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8"
height="8"></a></sup><a shape="rect"
href="frequently-asked-questions.html">Frequently Asked Questions</a></td><td
colspan="1" rowspan="1" class="ScrollbarNextName" width="33%"> <a
shape="rect" href="page-and-component-classes-faq.html">Page And Component
Classes FAQ</a></td><td colspan="1" rowspan="1" class="Scrol
lbarNextIcon"><a shape="rect" href="page-and-component-classes-faq.html"><img
align="middle" border="0"
src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16"
height="16"></a></td></tr></table></div><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><table
class="Footnotes" style="width: 100%; border:none;" cellspacing="0"
cellpadding="0" summary="This table contains one or more notes for references
made elsewhere on the page."><caption
class="accessibility">Footnotes</caption><thead class="accessibility"><tr
class="accessibility"><th colspan="1" rowspan="1" class="accessibility"
id="footnote-th1">Reference</th><th colspan="1" rowspan="1"
class="accessibility"
id="footnote-th2">Notes</th></tr></thead><tbody></tbody></table><p> </p><p> </p><p> </p><p> </p></div>
</div>
<div class="clearer"></div>