<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Appunti</title>
	<atom:link href="http://imieiappunti.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://imieiappunti.wordpress.com</link>
	<description>effettivamente appunti informatici, ma ... chissà</description>
	<lastBuildDate>Tue, 22 Jun 2010 10:05:18 +0000</lastBuildDate>
	<language>it</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='imieiappunti.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Appunti</title>
		<link>http://imieiappunti.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://imieiappunti.wordpress.com/osd.xml" title="Appunti" />
	<atom:link rel='hub' href='http://imieiappunti.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Agganciare un database</title>
		<link>http://imieiappunti.wordpress.com/2010/06/22/agganciare-un-database/</link>
		<comments>http://imieiappunti.wordpress.com/2010/06/22/agganciare-un-database/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 10:01:44 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[datasource]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[jsf]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/?p=57</guid>
		<description><![CDATA[Finalmente comincio a vedere qualcosa di più vicino alla mia visione di programmazione: agganciare i dati di un database ad una pagina jsf. La cosa più semplpice è creare una tabella (ice:dataTable) e agganciarci un oggetto List che contiene i risultati di una query sql. In questo momento voglio di proposito non usare hibernate o [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=57&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finalmente comincio a vedere qualcosa di più vicino alla mia visione di programmazione: agganciare i dati di un database ad una pagina jsf.</p>
<p>La cosa più semplpice è creare una tabella (ice:dataTable) e agganciarci un oggetto List che contiene i risultati di una query sql. In questo momento voglio di proposito non usare hibernate o altri stumenti per la persistenza perchè la mia conoscenza su jdbc è molto scarsa e vorrei farmi un po&#8217; di basi di questa tecnologia.</p>
<p>La strategia è abbastanza semplice: creo un DataSource in Tomcat, lo configuro su un mio database MySql e lo interrogo da una pagina jsf.</p>
<h3>Configurazione DataSource</h3>
<p>La cosa più semplice per creare un Datasource e invocarlo con jndi è quello di crearlo localmente all&#8217;applicazione. I passi sono</p>
<p>1. creare il file META-INF/context.xml</p>
<p>2. all&#8217;interno del file definire una risorsa di tipo DataSource e impostare i parametri di connessione al db</p>
<pre>&lt;Context path="/DBTest" docBase="DBTest" debug="5" reloadable="true" crossContext="true"&gt;
 &lt;Resource name="jdbc/IceApp" auth="Container" type="javax.sql.DataSource"
 maxActive="2" maxIdle="2" maxWait="10000"
 username="iceapp" password="iceapp" driverClassName="com.mysql.jdbc.Driver"
 url="jdbc:mysql://localhost:3306/iceapp"/&gt;
&lt;/Context&gt;</pre>
<p>3. Inserire un riferimento alla risorsa nel file web.xml delll&#8217;applicazione</p>
<pre>&lt;resource-ref&gt;
 &lt;description&gt;DB Connection&lt;/description&gt;
 &lt;res-ref-name&gt;jdbc/IceApp&lt;/res-ref-name&gt;
 &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
 &lt;res-auth&gt;Container&lt;/res-auth&gt;
 &lt;/resource-ref&gt;</pre>
<h3>Utilizzare i dati del Database</h3>
<p>Creare un managed-bean (cioè una classe java registrata nel faces-config.xml) ed esporre con i soliti metodi get/set l&#8217;elemento lista che contiene i dati prelevati dal Database. Il DataTable che deve mostrre a video i dati dovrà dichiarare la fonte delle sue righe (un oggetto List contenuto nel bean di cui sopra) e un generico oggetto riga.</p>
<pre>&lt;ice:dataTable id="tabellaDati" value="#{jdbcPage.lista}" var="el"&gt;
 &lt;ice:column &gt;
  &lt;f:facet name="header"&gt;
   &lt;ice:outputText id="idCol1" value="Cognome"&gt;&lt;/ice:outputText&gt;
  &lt;/f:facet&gt;
  &lt;ice:outputText id="cognome" value="#{el.cognome}"/&gt;
 &lt;/ice:column&gt;
 &lt;ice:column &gt;
  &lt;f:facet name="header"&gt;
   &lt;ice:outputText id="idCol2" value="Nome"&gt;&lt;/ice:outputText&gt;
  &lt;/f:facet&gt;
  &lt;ice:outputText id="nome" value="#{el.nome}"/&gt;
 &lt;/ice:column&gt;
 &lt;ice:column &gt;
  &lt;f:facet name="header"&gt;
   &lt;ice:outputText id="idCol3" value="Data Nascita"&gt;&lt;/ice:outputText&gt;
  &lt;/f:facet&gt;
  &lt;ice:outputText id="dataNascita" value="#{el.dataNascita}"&gt;
   &lt;f:convertDateTime pattern="dd/MM/yyyy"/&gt;
  &lt;/ice:outputText&gt;
 &lt;/ice:column&gt;
&lt;/ice:dataTable&gt;</pre>
<p>da notare che l&#8217;ultima colonna &#8220;data di nascita&#8221; visualizza una data formattata dd/MM/yyyy. Questo è dovuto al tag f:convertDateTime che registra un Converter per il componente che lo contiene (in questo caso ice:outputText id=&#8221;dataNascita&#8221;)</p>
<p>Il codice che collega l&#8217;applicazione al database via datasource e popola la lista è il seguente</p>
<pre>private List&lt;TableRow&gt; getPersoneFromDB(){
 DataSource ds = null;
 TableRow el;
 List&lt;TableRow&gt; l = new ArrayList&lt;TableRow&gt;();

 try {
 ds = (DataSource)InitialContext.doLookup("java:comp/env/jdbc/IceApp");
 } catch (NamingException e) {
 e.printStackTrace();
 }

 Connection con = null;
 ResultSet rs = null;
 try {
 con = ds.getConnection();
 rs = con.createStatement().executeQuery("select * from persona");

 while(rs.next()){
 el = new TableRow();
 el.setCognome(rs.getString("cognome"));
 el.setNome(rs.getString("nome"));
 el.setDataNascita(rs.getDate("dataNascita"));

 l.add(el);
 }

 } catch (SQLException e) {
 e.printStackTrace();
 } finally {
 try {
 rs.close();
 con.close();
 } catch (SQLException e) {
 e.printStackTrace();
 }

 }
 return l;
 }
</pre>
<p>l&#8217;oggetto TableRow è semplicemente un bean che espone le proprietà Nome, Cognome e DataNascita</p>
<p>Si può notare che la ricerca del datasource è effettuata con una stringa jndi formata da:</p>
<ul>
<li>la parte java:comp/env che sembra individuare lo spazio in cui cercare</li>
</ul>
<ul>
<li>la parte jdbc/IceApp che è il parametro di contesto che identifica il DataSource</li>
</ul>
<p>Molto probabilmente si può impostare il DataSource in un unico punto di Tomcat, il luogo più idoneo potrebbe essere il file server.xml o, per chi usa tomcat 6, context.xml. Questa è una prova che non so se farò, tutte queste configurazioni sono abbastanza noiose; vedremo</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=57&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2010/06/22/agganciare-un-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Questa è davvero singolare</title>
		<link>http://imieiappunti.wordpress.com/2010/06/17/questa-e-davvero-singolare/</link>
		<comments>http://imieiappunti.wordpress.com/2010/06/17/questa-e-davvero-singolare/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 11:46:27 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[icefaces]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[tristezza]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/2010/06/17/questa-e-davvero-singolare/</guid>
		<description><![CDATA[Dopo la barra di navigazione non c&#8217;è niente di meglio che mettere un po&#8217; di carne al fuoco. allora che fare? Semplice! La classica pagina con una tabella e qualche dato in croce. Per iniziare niente data base, semplicemente una lista di oggetti complessi (si fa per dire, nome, cognome e data di nascita) piazzati [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=45&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dopo la barra di navigazione non c&#8217;è niente di meglio che mettere un po&#8217; di carne al fuoco. allora che fare?</p>
<p>Semplice! La classica pagina con una tabella e qualche dato in croce. Per iniziare niente data base, semplicemente una lista di oggetti complessi (si fa per dire, nome, cognome e data di nascita) piazzati su una tabella.</p>
<p>La pagina è fatta con un layout Border delle iceFaces. A sx la solita barra di navigazione, in alto il titolo, al centro la nostra tabella, cosa c&#8217;è di più facile!</p>
<pre><span style="font-size:small;"><code>java.lang.NullPointerException </code><code>
at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1169)
at com.icesoft.faces.component.DataTableTag.doStartTag(DataTableTag.java:750)</code></span></pre>
<p>ma perchè, perchè??!! Perchè? ve lo dico subito</p>
<p>Il signorino non poteva mettere la tabellina tra semplici tag</p>
<pre><span style="font-size:small;"><code>&lt;f:facet name="center"&gt;
&lt;ice:outputText id="centerTitle" value="Dati"&gt;&lt;/ice:outputText&gt;</code></span></pre>
<p><span style="font-size:small;"><code> </code></span><span style="font-size:small;"><code><strong>qui</strong></code></span></p>
<pre><span style="font-size:small;"><code>&lt;/f:facet&gt;</code></span></pre>
<p>aveva bisogno di un &lt;ice:panelGroup&gt; (leggi uno schifoso div) che raccogliesse tutti i componenti nella facet!</p>
<p><strong>Update</strong></p>
<p>Giusto per completare è bene controllare le versioni dei jar che si stanno utilizzando. Dal mio progetto ho dovuto rimuovere le MyFaces perchè avevano dei problemi con le ICEfaces: le pagine si vedevano ma c&#8217;era sempre bisogno di fare un refresh del browser. Sostituendo le jsf-api e le jfs-impl tutto è filato liscio. Il problema però è che non è sempre facile conoscere la versione di un jar</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=45&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2010/06/17/questa-e-davvero-singolare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Muoversi tra i frammenti</title>
		<link>http://imieiappunti.wordpress.com/2010/06/17/muoversi-tra-i-frammenti/</link>
		<comments>http://imieiappunti.wordpress.com/2010/06/17/muoversi-tra-i-frammenti/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 09:43:45 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[jspf]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/2010/06/17/muoversi-tra-i-frammenti/</guid>
		<description><![CDATA[Continua la mia esperienza auto didattica con le jsf. Oggi ne ho imparata una nuova. Premessa il mio scopo è sempre quello di fare una barra di navigazione sulla destra di ogni pagina. Ho usato la soluzione dell&#8217;inclusione del jfsp. Un semplice div con dei link ad altre pagine dell&#8217;applicazione. Dal punto di vista grafico [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=42&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Continua la mia esperienza auto didattica con le jsf.</p>
<p>Oggi ne ho imparata una nuova.</p>
<h3>Premessa</h3>
<p>il mio scopo è sempre quello di fare una barra di navigazione sulla destra di ogni pagina. Ho usato la soluzione dell&#8217;inclusione del jfsp. Un semplice div con dei link ad altre pagine dell&#8217;applicazione.</p>
<p>Dal punto di vista grafico nulla da eccepire, sulla funzionalità mmmh! Ho configurato il buon faces-config.xml per istruire l&#8217;applicazione su come si devono comportare i link della barra di navigazione. Nella mia ingenuità avevo fatto una cosa del genere</p>
<pre><code>&lt;navigation-rule&gt;
&lt;display-name&gt;NavBar&lt;/display-name&gt;</code><code>
&lt;from-view-id&gt;/WEB-INF/jspf/NavBar.jspf&lt;/from-view-id&gt;</code><code>
&lt;navigation-case</code><code>from-outcome&gt;goHome&lt;/from-outcome&gt;
</code><code>&lt;to-view-id&gt;/Welcome.jspx&lt;/to-view-id&gt;</code><code>
&lt;/navigation-case&gt;
</code><code>&lt;/navigation-rule&gt;</code><code>
&lt;navigation-rule&gt;</code><code>
&lt;display-name&gt;NavBar&lt;/display-name&gt;</code><code>
&lt;from-view-id&gt;/WEB-INF/jspf/NavBar.jspf&lt;/from-view-id&gt;
</code><code>&lt;navigation-case&gt;</code><code>
&lt;from-outcome&gt;goJdbc&lt;/from-outcome&gt;</code><code>
&lt;to-view-id&gt;/JdbcPage.jspx&lt;/to-view-id&gt;</code><code>
&lt;redirect /&gt;</code><code>
&lt;/navigation-case&gt;
&lt;/navigation-rule&gt;</code></pre>
<p>peccato che così i link non facessero una emerita mazza. Il trucco per risolvere la questione è quello di cambiare</p>
<p><span style="font-family:'Dejavu Sans Mono';background-color:#e9e9e8;">&lt;from-view-id&gt;/WEB-INF/jspf/NavBar.jspf&lt;/from-view-id&gt;</span></p>
<p><span style="font-family:'Dejavu Sans Mono';">in</span></p>
<p><span style="font-family:'Dejavu Sans Mono';background-color:#e9e9e8;">&lt;from-view-id&gt;</span><span style="font-family:'Dejavu Sans Mono';background-color:#e9e9e8;"><strong>*</strong></span><span style="font-family:'Dejavu Sans Mono';background-color:#e9e9e8;">&lt;/from-view-id&gt;</span></p>
<p>Perchè? Per il semplice motivo che le jspf non sono delle vere pagine ma dei frammenti di pagina. Per cui le regole di navigazione devono essere impostate su tutte le pagine che includono il frammento jspf. Utilizzando &#8220;*&#8221; sono sicuro che quella regola di navigazione sarà valida per ogni pagina, e nel mio caso sono tutte le pagine con la barra di navigazione</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=42&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2010/06/17/muoversi-tra-i-frammenti/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Fuori i secondi</title>
		<link>http://imieiappunti.wordpress.com/2010/06/07/fuori-i-secondi/</link>
		<comments>http://imieiappunti.wordpress.com/2010/06/07/fuori-i-secondi/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 10:54:33 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/?p=40</guid>
		<description><![CDATA[Per necessità lavorative mi sono imbattuto in un problema sql: estrarre un set di record raggruppati per alcuni campi e tra questi visualizzare il secondo all&#8217;interno del proprio raggruppamento. Dopo un paio di ore San Google ha fatto il miracolo link<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=40&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Per necessità lavorative mi sono imbattuto in un problema sql:</p>
<p>estrarre un set di record raggruppati per alcuni campi e tra questi visualizzare il <strong>secondo</strong> all&#8217;interno del proprio raggruppamento. Dopo un paio di ore San Google ha fatto il miracolo</p>
<p><a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:12759079666984">link</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=40&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2010/06/07/fuori-i-secondi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Total eclipse of the mind</title>
		<link>http://imieiappunti.wordpress.com/2010/06/05/total-eclipse-of-the-mind/</link>
		<comments>http://imieiappunti.wordpress.com/2010/06/05/total-eclipse-of-the-mind/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 17:35:36 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/?p=28</guid>
		<description><![CDATA[Visto che bestemmiare contro j2ee (jboss 5) e netbeans su una piattaforma linux 64 bit non era sufficiente ho deciso di provare eclipse. Dopo aver installato facilmente l&#8217;ide (galileo) ho provato a fare il solito progetto j2ee di esempio: un modulo ejb. Business logic, entity con annotation e hibernate come back end un modulo war [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=28&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Visto che bestemmiare contro j2ee (jboss 5) e netbeans su una piattaforma linux 64 bit non era sufficiente ho deciso di provare eclipse. Dopo aver installato facilmente l&#8217;ide (galileo) ho provato a fare il solito progetto j2ee di esempio: </p>
</p>
<ol>
<li>un modulo ejb. Business logic, entity con annotation e hibernate come back end</li>
<li>un modulo war con icefaces</li>
</ol>
<p> Installo il plugin delle icefaces. Creo un nuovo enterprise application project Creo il modulo ejb A questo punto vorrei creare le prime entity ma qui arriva il difficile. Esiste tra i wizard JPA &#8211;&gt; Entity. Il wizard però è bloccato e  non si riesce a usarlo, per la precisione non mi fa scegliere il progetto relativo all&#8217;entity. Dopo un paio di giorni di ricerca arrivo a <a href="http://leieuncretino.blogspot.com/2009/10/jpa-ed-hibernate-per-leggere-e-scrivere.html" target="_blank">questo</a> tutorial. Il trucco sta tutto nell&#8217;impostazione delle proprietà della sezione &quot;Project Facets&quot; delle proprietà del progetto ejb.</p>
</p>
<p>A questo punto la costruzione del progetto comincia a delinearsi. </p>
<p>Certo Netbeans è molto più intuitivo &#8230; quando non ti inchioda il pc!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=28&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2010/06/05/total-eclipse-of-the-mind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse e Ice Faces</title>
		<link>http://imieiappunti.wordpress.com/2010/06/05/eclipse-e-ice-faces/</link>
		<comments>http://imieiappunti.wordpress.com/2010/06/05/eclipse-e-ice-faces/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 16:28:05 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[icefaces]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jsf]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/2010/06/05/eclipse-e-ice-faces/</guid>
		<description><![CDATA[Creare applicazioni con le jsf non è una passeggiata, se poi, come me, si è abituati a ide visuali con wizard che creano lo sceletro del progetto, con designer della gui &#8230; è un vero inferno. Se poi lo strumento che si vuole utilizzare è Eclipse, beh allora &#8230; se riesco a fare questo posso [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=37&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Creare applicazioni con le jsf non è una passeggiata, se poi, come me, si è abituati a ide visuali con wizard che creano lo sceletro del progetto, con designer della gui &#8230; è un vero inferno.</p>
<p>Se poi lo strumento che si vuole utilizzare è Eclipse, beh allora &#8230; se riesco a fare questo posso fare tutto.</p>
<p>Io sono un programmatore &#8220;desktop&#8221; e lavorare con tag, fogli di stile non riesce davvero ad entrarmi nella testa, però qualche passo sono riuscito a farlo. Qui parlerò del primo impatto.</p>
<p>Il mio ambiente di lavoro è jboss 5.1. I passi sono stati questi.</p>
<ol>
<li>Scarico Eclipse Galileo</li>
<li>Scarico i plugin per icefaces da <a title="icefaces" href="http://www.icefaces.org/main/downloads/os-downloads.iface">qui</a></li>
<li>Seguo <a href="http://www.digit.lk/09_sept_eclipse">questo</a> tutorial per i primi passi</li>
</ol>
<p>Qui mi imbatto nel primo stop. Dopo il primo step</p>
<p><img src="http://imieiappunti.files.wordpress.com/2010/06/newproject.png?w=455" alt="" /></p>
<p>Il wizard di eclipse mi propone di scaricare le implementazioni jsf delle IceFaces e a questo punto mi impone di scaricare anche quelle della sun o di MyFaces</p>
<p><img src="http://imieiappunti.files.wordpress.com/2010/06/jsfcapabilities.png?w=455" alt="" /></p>
<p>Questo fa sì che alla fine dell&#8217;autocomposizione mi ritrovo un web.xml con molte impostazioni MyFaces di cui non ho bisogno: infatti userò la versione jsf di jboss e includerò nel war solo le icefaces. Questi dettagli, però, li scoprirò solo dopo un paio di notti insonni, deploy falliti e molte imprecazioni.</p>
<p>Alla fine è stato sufficiente includere nel progetto le librerie di jboss (il path impostato dalle preferenze di eclipse) e le iceFaces.</p>
<p>Adesso non mi resta che tuffarmi nella grafica (no, i tag no, i css noooo)!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=37&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2010/06/05/eclipse-e-ice-faces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>

		<media:content url="http://imieiappunti.files.wordpress.com/2010/06/newproject.png" medium="image" />

		<media:content url="http://imieiappunti.files.wordpress.com/2010/06/jsfcapabilities.png" medium="image" />
	</item>
		<item>
		<title>6 feet under</title>
		<link>http://imieiappunti.wordpress.com/2009/12/24/6-feet-under/</link>
		<comments>http://imieiappunti.wordpress.com/2009/12/24/6-feet-under/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 11:31:39 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/?p=26</guid>
		<description><![CDATA[Magari sbaglio, ma a leggere qui sembra che quelli di Microsoft si stiano scavando la fossa piano piano<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=26&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Magari sbaglio, ma a leggere <a href="http://www.programmazione.it/index.php?entity=eitem&amp;idItem=43559" target="_blank">qui</a> sembra che quelli di Microsoft si stiano scavando la fossa piano piano</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=26&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2009/12/24/6-feet-under/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Dove andremo a finire!</title>
		<link>http://imieiappunti.wordpress.com/2009/12/18/dove-andremo-a-finire/</link>
		<comments>http://imieiappunti.wordpress.com/2009/12/18/dove-andremo-a-finire/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 08:03:20 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[attualità]]></category>
		<category><![CDATA[tristezza]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/?p=23</guid>
		<description><![CDATA[Qualcuno dice che abbiamo toccato il fondo, ma pare che sotto i nostri piedi si aprano continuamente abissi<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=23&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Qualcuno dice che abbiamo toccato il fondo, ma pare che sotto i nostri piedi si aprano continuamente <a href="http://news.bbc.co.uk/2/hi/europe/8419948.stm">abissi</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=23&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2009/12/18/dove-andremo-a-finire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>JPA ql e left join</title>
		<link>http://imieiappunti.wordpress.com/2009/12/01/jpa-ql-e-left-join/</link>
		<comments>http://imieiappunti.wordpress.com/2009/12/01/jpa-ql-e-left-join/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 15:42:47 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jpaql]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/?p=19</guid>
		<description><![CDATA[articolo esplicativo su come costruire un left join con jpa<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=19&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://depressedprogrammer.wordpress.com/2007/11/20/performing-a-left-outer-join-using-jpql-and-jpa/">articolo esplicativo</a> su come costruire un left join con jpa</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=19&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2009/12/01/jpa-ql-e-left-join/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
		<item>
		<title>Segreti di Hibernate</title>
		<link>http://imieiappunti.wordpress.com/2009/12/01/segreti-di-hibernate/</link>
		<comments>http://imieiappunti.wordpress.com/2009/12/01/segreti-di-hibernate/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 11:31:34 +0000</pubDate>
		<dc:creator>fabiot</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jpaql]]></category>

		<guid isPermaLink="false">http://imieiappunti.wordpress.com/?p=15</guid>
		<description><![CDATA[sto lavorando sulle query jpa ql per lavoro. Mi sono imbattuto in questa situazione: dovevo estrarre degli oggetti da una collezione i cui campi id valessero un valore specifico. In prima battuta ho scritto una cosa simile: select obj1.valore from Oggetto1 as obj1 where obj1.collezione.id in (12345) il risultato è stato un messaggio di questo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=15&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>sto lavorando sulle query jpa ql per lavoro.</p>
<p>Mi sono imbattuto in questa situazione: dovevo estrarre degli oggetti da una collezione i cui campi id valessero un valore specifico.</p>
<p>In prima battuta ho scritto una cosa simile:</p>
<blockquote><p><strong>select obj1.valore from Oggetto1 as obj1 where obj1.collezione.id in (12345)</strong></p></blockquote>
<p>il risultato è stato un messaggio di questo tipo</p>
<blockquote><p><strong>org.hibernate.QueryException: illegal attempt to dereference collection</strong></p></blockquote>
<p>Cercando sulla rete ho scoperto che per avere i risultati voluti avrei dovuto scriverla in questo modo</p>
<blockquote><p><strong>select ogj1.valore from Oggetto1 obj1, in (obj1.collezione) col where col.id in (12345)</strong></p></blockquote>
<p>così la magia riesce</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/imieiappunti.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/imieiappunti.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/imieiappunti.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/imieiappunti.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/imieiappunti.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/imieiappunti.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/imieiappunti.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/imieiappunti.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/imieiappunti.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/imieiappunti.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/imieiappunti.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/imieiappunti.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/imieiappunti.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/imieiappunti.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=imieiappunti.wordpress.com&amp;blog=10653878&amp;post=15&amp;subd=imieiappunti&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://imieiappunti.wordpress.com/2009/12/01/segreti-di-hibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b26716a3b92946c847d2fc83860fae6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fabiot</media:title>
		</media:content>
	</item>
	</channel>
</rss>
