<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stefan Sobek Blog &#187; Software Engineering</title>
	<atom:link href="http://www.sobek.info/blog/category/software-engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sobek.info/blog</link>
	<description>Writing about IT, Software Engineering, sports and other stuff</description>
	<lastBuildDate>Mon, 24 Jan 2011 12:50:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using attribute values of composite component in commandLink</title>
		<link>http://www.sobek.info/blog/2010/10/14/using-attribute-values-of-composite-component-in-commandlink/</link>
		<comments>http://www.sobek.info/blog/2010/10/14/using-attribute-values-of-composite-component-in-commandlink/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 11:39:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[commandLink]]></category>
		<category><![CDATA[composite component]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[jsf 2.0]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.sobek.info/blog/?p=284</guid>
		<description><![CDATA[Situation:
You created a composite component in JSF 2.0. This component now should have some attributes which contains direct links. This links should now be declared when you use the component.
Example:

?View Code HTML1
2
3
    &#60;composite:attribute type=&#34;java.lang.String&#34; required=&#34;false&#34;
        name=&#34;logoutURL&#34; default=&#34;/faces/logout.jsf&#34;
        shortDescription=&#34;The [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Situation:</strong><br />
You created a composite component in JSF 2.0. This component now should have some attributes which contains direct links. This links should now be declared when you use the component.<br />
Example:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p284code4'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2844"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p284code4"><pre class="html" style="font-family:monospace;">    &lt;composite:attribute type=&quot;java.lang.String&quot; required=&quot;false&quot;
        name=&quot;logoutURL&quot; default=&quot;/faces/logout.jsf&quot;
        shortDescription=&quot;The logout URL.&quot; /&gt;</pre></td></tr></table></div>

<p>Later in the implementation you use it like the following example:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p284code5'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2845"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p284code5"><pre class="html" style="font-family:monospace;">		&lt;h:commandLink action=&quot;#{cc.attrs.helpURL}&quot;
			value=&quot;#{textbundle['status.linktext.logout']}&quot; /&gt;</pre></td></tr></table></div>

<p><strong>Problem</strong><br />
You now get a class cast exception. JSF excepts a String result of a method which you can use in the action attribute of commandLink. Directly putting a String in this result is ok. </p>
<p><strong>Solution</strong><br />
Use toString (although you declared the attribute as type of String)</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p284code6'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2846"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p284code6"><pre class="html" style="font-family:monospace;">		&lt;h:commandLink action=&quot;#{cc.attrs.helpURL.toString}&quot;
			value=&quot;#{textbundle['status.linktext.logout']}&quot; /&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.sobek.info/blog/2010/10/14/using-attribute-values-of-composite-component-in-commandlink/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short Maven introduction</title>
		<link>http://www.sobek.info/blog/2010/03/02/short-maven-introduction/</link>
		<comments>http://www.sobek.info/blog/2010/03/02/short-maven-introduction/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 13:28:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[maven2]]></category>
		<category><![CDATA[mvn]]></category>

		<guid isPermaLink="false">http://www.sobek.info/blog/?p=231</guid>
		<description><![CDATA[Due to the fact I got in touch with maven2 and I think that maven2 is very helpful will give a short introduction. Bigger projects normally have a more complex configuration but I will start from the scratch.
Maven will create a kind of project sceleton with the following command

?View Code JAVA1
mvn archetype:create -DgroupId=info.sobek.testapp -DartifactId=testapp

If you [...]]]></description>
			<content:encoded><![CDATA[<p>Due to the fact I got in touch with maven2 and I think that maven2 is very helpful will give a short introduction. Bigger projects normally have a more complex configuration but I will start from the scratch.</p>
<p><strong>Maven will create a kind of project sceleton with the following command</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code9'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2319"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p231code9"><pre class="java" style="font-family:monospace;">mvn archetype<span style="color: #339933;">:</span>create <span style="color: #339933;">-</span>DgroupId<span style="color: #339933;">=</span>info.<span style="color: #006633;">sobek</span>.<span style="color: #006633;">testapp</span> <span style="color: #339933;">-</span>DartifactId<span style="color: #339933;">=</span>testapp</pre></td></tr></table></div>

<p>If you work with e.g. eclipse, you can create the project files for eclipse:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code10'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p23110"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p231code10"><pre class="java" style="font-family:monospace;">mvn eclipse<span style="color: #339933;">:</span>eclipse</pre></td></tr></table></div>

<p>Now you can import it into eclipse with &#8220;import into existing workspace&#8221; option of eclipse. </p>
<p>Maven will normally copy the created so called &#8220;artifacts&#8221; into your local maven repository. Normally located under your home dir and then .m2</p>
<p>When you program depends on several jars and these dependencies are defined in the pom.xml, then maven will copy the jars in their specific version into the local maven repository. This is very helpful because you can simply build your project with another newer or older version of your dependent jar-file. </p>
<p>How to create multi-module projects will be explained in another episode. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sobek.info/blog/2010/03/02/short-maven-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

