{"id":14,"date":"2010-11-27T11:30:01","date_gmt":"2010-11-27T09:30:01","guid":{"rendered":"http:\/\/www.hurmuzov.com\/?p=14"},"modified":"2010-11-27T11:30:01","modified_gmt":"2010-11-27T09:30:01","slug":"jsf-2-0-composite-components-1","status":"publish","type":"post","link":"https:\/\/www.hurmuzov.com\/?p=14","title":{"rendered":"JSF 2.0 Composite Components #1"},"content":{"rendered":"<p>Starting with something very easy &#8211; label. We&#8217;ll make it bold to separate from input\/output text.<\/p>\n<p>Usual directories in the web project:<\/p>\n<p><!-- \t\t@page { margin: 20mm } \t\tP { margin-bottom: 2.12mm } --><br \/>\n<code><span style=\"font-family: Courier New,monospace; font-size: x-small;\">&lt;Web Pages&gt;<br \/>\n&lt;Web Pages&gt;\/WEB-INF<br \/>\n&lt;Web Pages&gt;\/resources<br \/>\n&lt;Web Pages&gt;\/resources\/css<br \/>\n&lt;Web Pages&gt;\/resources\/images<br \/>\n<strong>&lt;Web Pages&gt;\/resources\/realsoft<\/strong><\/span><br \/>\n<\/code><br \/>\nIn bold is the directory where I&#8217;ll put my custom components. Choose a suitable for you name. Below is label.xhtml file:<\/p>\n<pre lang=\"xml\">&lt;?xml version='1.0' encoding='UTF-8' ?&gt;\r\n&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;\r\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"\r\nxmlns:cc=\"http:\/\/java.sun.com\/jsf\/composite\"\r\nxmlns:h=\"http:\/\/java.sun.com\/jsf\/html\"&gt;\r\n&lt;!-- INTERFACE --&gt;\r\n&lt;cc:interface&gt;\r\n  &lt;cc:attribute name=\"value\" required=\"true\" \/&gt;\r\n  &lt;cc:attribute name=\"for\" required=\"false\" \/&gt;\r\n&lt;\/cc:interface&gt;\r\n&lt;!-- IMPLEMENTATION --&gt;\r\n&lt;cc:implementation&gt;\r\n  &lt;span id=\"#{cc.clientId}\" class=\"label\" &gt;\r\n    &lt;h:outputLabel id=\"#{cc.clientId}label\" value=\"#{cc.attrs.value}\" for=\"#{cc.attrs.for}\" \/&gt;\r\n  &lt;\/span&gt;\r\n&lt;\/cc:implementation&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>\ufeff<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting with something very easy &#8211; label. We&#8217;ll make it bold to separate from input\/output text. Usual directories in the web project: &lt;Web Pages&gt; &lt;Web Pages&gt;\/WEB-INF &lt;Web Pages&gt;\/resources &lt;Web Pages&gt;\/resources\/css &lt;Web Pages&gt;\/resources\/images &lt;Web Pages&gt;\/resources\/realsoft In bold is the directory where I&#8217;ll put my custom components. Choose a suitable for you name. Below is label.xhtml file: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[6,7,3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=\/wp\/v2\/posts\/14"}],"collection":[{"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":10,"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/27"}],"wp:attachment":[{"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hurmuzov.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}