{"id":1398,"date":"2011-07-06T17:01:57","date_gmt":"2011-07-06T17:01:57","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=1398"},"modified":"2011-07-06T17:01:57","modified_gmt":"2011-07-06T17:01:57","slug":"faceletsusing-uiparam-for-temporary-in-page-variables","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=1398","title":{"rendered":"Facelets&ndash;using &lt;ui:param&gt; for temporary in-page variables"},"content":{"rendered":"<p>I have sometimes had a need to define temporary variables for use on a facelets page.<\/p>\n<p>When I tried using &lt;c:set&gt; for this it failed to work when used within a decorator.<\/p>\n<p>However, &lt;ui:param&gt; fulfills the need admirably. Whilst it is normally used to pass EL parameters to a template from its client, it can also be used to hold data for use elsewhere in the same decorator for example. Bear in mind that there are scoping issues which as yet I have not fully bottomed out \u2013 the variable is probably visible anywhere else in other templates\/xhtml files on the same page and so care is needed with naming.<\/p>\n<p>A good example of this was when I wanted to define a couple of size parameters (which could not be done with CSS) at the top of a decorator\/custom tag where they were clearly visible, and then re-use them multiple times further down in tag attribtutes to called tags.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have sometimes had a need to define temporary variables for use on a facelets page. When I tried using &lt;c:set&gt; for this it failed to work when used within a decorator. However, &lt;ui:param&gt; fulfills the need admirably. Whilst it is normally used to pass EL parameters to a template from its client, it can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[76,40,184,16],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1398"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1398"}],"version-history":[{"count":0,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1398\/revisions"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}