<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>jsf &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/jsf/</link>
	<description>Feed of posts on WordPress.com tagged "jsf"</description>
	<pubDate>Fri, 05 Sep 2008 10:19:12 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[JDeveloper Declarative JSF Components]]></title>
<link>http://ahoehma.wordpress.com/?p=76</link>
<pubDate>Thu, 04 Sep 2008 06:35:55 +0000</pubDate>
<dc:creator>Andreas Höhmann</dc:creator>
<guid>http://ahoehma.wordpress.com/?p=76</guid>
<description><![CDATA[Auf dieser Seite findet sich ein Screencast in dem Shay Shmeltzer vom Oracle JDeveloper Team die Anw]]></description>
<content:encoded><![CDATA[<p>Auf dieser <a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/11/demos/reusableJSFComponents/reusableJSFComponents.html" target="_blank">Seite </a>findet sich ein Screencast in dem Shay Shmeltzer vom Oracle JDeveloper Team die Anwendung von Declarativen JSF Komponenten zeigt. Er hat zwei Projekte, in dem einen definiere er CustomerComponenten (Ähnlichkeiten zu Faclets) in dem anderen benutzt er diese.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Primer artículo sobre Jdeveloper 11g]]></title>
<link>http://fetishcode.wordpress.com/?p=214</link>
<pubDate>Mon, 01 Sep 2008 07:41:31 +0000</pubDate>
<dc:creator>fetishcode</dc:creator>
<guid>http://fetishcode.wordpress.com/?p=214</guid>
<description><![CDATA[No podiamos empezar Septiembre de mejor manera. En Jdevloperla se publica el primer artículo sobre ]]></description>
<content:encoded><![CDATA[<p>No podiamos empezar Septiembre de mejor manera. En <a href="http://jdeveloperla.com" target="_blank">Jdevloperla </a>se publica el primer artículo sobre sobre <strong>ADF </strong>Y <strong>Jdeveloper 11g</strong>.</p>
<p>Les dejo el enlace al articulo: <a href="http://www.jdeveloperla.com/joomla/index.php?view=article&#38;catid=38%3Aadf&#38;id=61%3Adesarrollando-una-rica-interfaz-de-usuario-con-ajax-y-jsf&#38;option=com_content&#38;Itemid=94">Desarrollando una Rica Interfaz de Usuario con AJAX y JSF</a> .</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ExtJs with JSF]]></title>
<link>http://undermypalapa.wordpress.com/?p=19</link>
<pubDate>Sat, 30 Aug 2008 22:29:05 +0000</pubDate>
<dc:creator>jaydfwtx</dc:creator>
<guid>http://undermypalapa.wordpress.com/?p=19</guid>
<description><![CDATA[I saw some people were finding this blog by doing a search for ExtJs with JSF.
I previously searched]]></description>
<content:encoded><![CDATA[<p>I saw some people were finding this blog by doing a search for ExtJs with JSF.</p>
<p>I previously searched and found that someone had wrapped up ExtJs into a JSF library, however it appeared to be a dead project.</p>
<p>A coworker and I instead decided to use <a href="http://shale.apache.org/">Apache Shale</a> to expose methods in a managed bean, to return the JSON data that ExtJs wanted. At the time, we were only using the ExtJs Tree component. We needed to use the ExtJs Tree instead of the one from RichFaces because of a certain requirement that could not be fulfilled with RichFaces.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JSF or Struts]]></title>
<link>http://rasandoval.wordpress.com/?p=11</link>
<pubDate>Sat, 30 Aug 2008 02:38:55 +0000</pubDate>
<dc:creator>rasandoval</dc:creator>
<guid>http://rasandoval.wordpress.com/?p=11</guid>
<description><![CDATA[Craig Mcclanahan, creator of Struts and co-spec lead for JavaServer Faces, has started blogging. In ]]></description>
<content:encoded><![CDATA[<p>Craig Mcclanahan, creator of Struts and co-spec lead for JavaServer Faces, has started blogging. In this entry, he gives his current recommendations for the common question: Struts or JSF?</p>
<p><a href="http://www.theserverside.com/news/thread.tss?thread_id=29068">JSF or Struts</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[MyFaces goes JSF 2.0]]></title>
<link>http://matthiaswessendorf.wordpress.com/?p=118</link>
<pubDate>Fri, 29 Aug 2008 08:02:40 +0000</pubDate>
<dc:creator>matthiaswessendorf</dc:creator>
<guid>http://matthiaswessendorf.wordpress.com/?p=118</guid>
<description><![CDATA[Yesterday morning (German time), Simon Lessard created a JSF 2.0 branch for Apache MyFaces. This is ]]></description>
<content:encoded><![CDATA[<p>Yesterday morning (German time), Simon Lessard created a <a href="https://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/">JSF 2.0 branch</a> for <a href="http://myfaces.apache.org">Apache MyFaces</a>. This is great news, since the MyFaces team is now kinda early in the game. Simon already added new interfaces/APIs, proposed by the last early draft. We also have a bunch of <a href="http://tinyurl.com/54psd3">open jira issues on JSF 2.0</a> in our JIRA.</p>
<p>So, go ahead, do a <a href="https://svn.apache.org/repos/asf/myfaces/core/branches/2_0_0/">checkout </a>and provide patches, suggestions or comments ;-)</p>
<p>Since this is <em><strong>EARLY </strong></em>development stage, the branch isn't something I'd consider to be <em>stable</em>... For discussions, use the <a href="http://myfaces.apache.org/mail-lists.html">developers mailing list</a> and use [JSF 2.0] as prefix of your subject.</p>
<p>Once the spec is kinda final, we should be in a good shape to not be that late, with a (certified) release.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Grails + ExtJs]]></title>
<link>http://undermypalapa.wordpress.com/?p=13</link>
<pubDate>Wed, 27 Aug 2008 18:26:34 +0000</pubDate>
<dc:creator>jaydfwtx</dc:creator>
<guid>http://undermypalapa.wordpress.com/?p=13</guid>
<description><![CDATA[Looking at the beginnings of a new webapp. I&#8217;m heavily leaning towards Grails+ExtJs, even thou]]></description>
<content:encoded><![CDATA[<p>Looking at the beginnings of a new webapp. I'm heavily leaning towards Grails+ExtJs, even though the ExtJs plugin has been discontinued because of the license change. Honestly, paying for developer licenses is not a big deal in the grand scheme of things. For widgets, dojo seems to be a runner-up, however it just doesn't feel as polished, and I find the experience somewhat lacking. I wish jquery had a more mature &#38; official widget set, because it would be my first choice.</p>
<p>In my previous project, we used JSF 1.2 + RichFaces. While I feel that combination can produce good results, it didn't feel very agile. On a new JSF project going forward, I would recommend Seam; however it is not worth the effort to retrofit a large project.</p>
<p><a href="http://jlorenzen.blogspot.com/2008/08/getting-started-with-grails-and-extjs.html">James Lorenzen</a> has a post about how to roll your own ExtJs plugin for grails, which I will probably give a shot.</p>
<p>With JSF, we were pushing markup down to the browser using ajax polling &#38; rerendering of components. However, I want to start using RESTful services along with Comet. This should get interesting...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[JBoss' WebBeans and TCK]]></title>
<link>http://matthiaswessendorf.wordpress.com/?p=114</link>
<pubDate>Wed, 27 Aug 2008 13:08:07 +0000</pubDate>
<dc:creator>matthiaswessendorf</dc:creator>
<guid>http://matthiaswessendorf.wordpress.com/?p=114</guid>
<description><![CDATA[By accident, I noticed this link on the Seam website. It talks about WebBeans. No, it doesn&#8217;t ]]></description>
<content:encoded><![CDATA[<p>By accident, I noticed <a href="http://www.seamframework.org/WebBeans">this link</a> on the Seam website. It talks about <a href="http://jcp.org/en/jsr/detail?id=299">WebBeans</a>. No, it doesn't only talk about WebBeans and the relationship to Seam. It does much more... it contains a link to the source code... Not a big deal... But! I am really happy to see that WebBeans is developed under ASL 2.0, by JBoss/Red Hat.</p>
<p>Even better, the page says that the TCK (not yet there) will also be licensed under ASL 2.0. Which is really great news! As far as I know, the only TCK that is ASL 2.0 based is the one from <a href="http://db.apache.org/jdo/tck.html">JDO</a>.</p>
<p>Well done, JBoss!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[podcast/interview from JSFCentral ]]></title>
<link>http://matthiaswessendorf.wordpress.com/?p=111</link>
<pubDate>Wed, 27 Aug 2008 11:04:50 +0000</pubDate>
<dc:creator>matthiaswessendorf</dc:creator>
<guid>http://matthiaswessendorf.wordpress.com/?p=111</guid>
<description><![CDATA[Kito D. Mann did an interview with me, when I was in NYC to attend the AjaxWorld show. He published ]]></description>
<content:encoded><![CDATA[<p><a href="http://www.manning.com/mann/">Kito D. Mann</a> did an interview with me, when I was in NYC to attend the <a href="http://matthiaswessendorf.wordpress.com/2008/03/26/ajaxworld-east-2008-in-new-york-city/">AjaxWorld</a> show. He published this interview as a podcast <a href="http://www.jsfcentral.com/articles/wessendorf-08-08.html">here</a>.</p>
<p>Currently I am writing a series of articles about Trinidad. These will be published soon on Kito's <a href="http://www.JSFCentral.com">JSFCentral.com </a>site.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Engenharia de Componentes utilizando Java - Pós Graduação]]></title>
<link>http://alyssontmv.wordpress.com/?p=167</link>
<pubDate>Fri, 22 Aug 2008 13:05:32 +0000</pubDate>
<dc:creator>alyssontmv</dc:creator>
<guid>http://alyssontmv.wordpress.com/?p=167</guid>
<description><![CDATA[
A TNT Educational em 	parceria com a FIO (Faculdades Integradas de Ourinhos) está 	disponibilizand]]></description>
<content:encoded><![CDATA[<ul>
<p class="western" style="margin-bottom:0;">A TNT Educational em 	parceria com a FIO (Faculdades Integradas de Ourinhos) está 	disponibilizando a terceira turma em Ourinhos-SP do curso de 	pós-graduação lato-sensu (especialização) 	em desenvolvimento de componentes Java. Uma especialização 	muito interessante pois coloca em foco as tecnologias mais usadas no 	mercado de trabalho como JPA, EJB, Design Patterns, UML, Struts, 	JSTL, JSF, PostgreSQL dentre outras. A cada turma, as disciplinas 	estão sendo revistas e atualizadas conforme o mercado 	necessita. O que vejo de  mais bacana, é que os professores 	são do mercado de trabalho e dão uma idéia real 	de como funcionam todos os processos de projeto e desenvolvimento e 	isto a diferencia de outros cursos existentes no mercado que 	disponibilizam professores que conhecem o que ensinam mas nunca 	usaram na prática o que aprenderam(somente acadêmicos). 	Abaixo, seguem as disciplinas do curso:</p>
</ul>
<div class="mceTemp mceIEcenter">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><a href="http://www.tntedu.com.br/tnt/images/posgraduacao/banner_pos_sucesso.gif"><img src="http://www.tntedu.com.br/tnt/images/posgraduacao/banner_pos_sucesso.gif" alt="Engenharia de Componentes utilizando Java" width="281" height="156" /></a></dt>
</dl>
</div>
<ul>
<li>
<ul>
<li>Introdução 	à Engenharia de Componenentes</li>
<li>Plataforma 	Tecnológica e Linguagem de Programação Java<sup><span style="font-size:x-small;">TM</span></sup></li>
<li>Modelagem de 	Negócios e E-business</li>
<li>Qualidade de 	Software, Gerência de Projetos e Ciclo de Desenvolvimento RUP</li>
<li>Design de sistemas 	utilizando UML</li>
<li>Banco de Dados</li>
<li>Conectividade: 	Java<sup><span style="font-size:x-small;">TM</span></sup> com Banco de Dados</li>
<li>Metodologia de 	Pesquisa e Seminários de Orientação à 	Monografia</li>
<li>Ambientes 	Distribuídos - Redes, Telecomunicações e 	Seguranças</li>
<li>Objetos 	Distribuídos e Aspectos Avançados da Programação 	Java<sup><span style="font-size:x-small;">TM</span></sup></li>
<li>Padrões de 	Projeto de Software, Componentização e Arquitetura 	J2EE</li>
<li>Desenvolvimento de 	Aplicações Web</li>
<li>Componentização 	da Camada de Visualização: Struts e JSF</li>
<li>Componentização 	da Camada de Negócios: EJB</li>
<li>Seminários de Orientação 	à Monografia e Didática do Ensino Superior</li>
</ul>
</li>
</ul>
<p class="western">O site da responsável pelo curso: <a href="http://www.tntedu.com.br/">http://www.tntedu.com.br/</a></p>
<p class="western">O site de onde é dado o curso: <a href="http://www.fio.edu.br/">http://www.fio.edu.br</a></p>
<p class="western">Nestes sites podem ser encontradas maiores informações sobre as instituições e sobre o curso.</p>
<p class="western">Eu estou concluindo o curso e por isso posso dizer o quanto ele foi muito bom para meu crescimento profissional. Aproveitem mais esta oportunidade em nossa região.</p>
<p class="western">Um grande abraço.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Mod_gzip - how to make configuration work for Apache 1.3, mod_jk and JBOSS/JSF]]></title>
<link>http://roneiv.wordpress.com/?p=39</link>
<pubDate>Fri, 22 Aug 2008 08:28:20 +0000</pubDate>
<dc:creator>roneiv</dc:creator>
<guid>http://roneiv.wordpress.com/?p=39</guid>
<description><![CDATA[I&#8217;ve been working a couple of days trying to get mod_gzip to work with apache 1.3, enabling co]]></description>
<content:encoded><![CDATA[<p>I've been working a couple of days trying to get mod_gzip to work with apache 1.3, enabling compression for JSF application (.faces). Everything seemed so easy in the configuration described here, but I actually troubled quite a lot with it, and wanted to share what I've learned. :) I used <a href="http://schroepl.net/projekte/mod_gzip/index.htm">this</a> page as a starting point for my digging into mod_gzip. I use mod__jk to forward the request to jboss' tomcat server.</p>
<p>Firs and most important of all, the configuration I use that make things work with JSF:</p>
<p>[sourcecode language='xml']<br />
LoadModule gzip_module     libexec/mod_gzip.so</p>
<p><IfModule mod_gzip.c><br />
mod_gzip_on                   Yes<br />
mod_gzip_can_negotiate        Yes<br />
mod_gzip_static_suffix        .gz<br />
AddEncoding              gzip .gz<br />
mod_gzip_update_static        No<br />
mod_gzip_command_version      '/mod_gzip_status'<br />
mod_gzip_temp_dir             /tmp<br />
mod_gzip_keep_workfiles       No<br />
mod_gzip_minimum_file_size    300<br />
mod_gzip_maximum_file_size    500000<br />
mod_gzip_maximum_inmem_size   60000<br />
mod_gzip_min_http             1000<br />
mod_gzip_handle_methods        GET POST<br />
mod_gzip_dechunk              Yes<br />
mod_gzip_send_vary            On</p>
<p>#Files and items to compress<br />
mod_gzip_item_include         file       \.html$<br />
mod_gzip_item_include         file       \.htm$<br />
mod_gzip_item_include         file       \.js$<br />
mod_gzip_item_include         file       \.js<br />
mod_gzip_item_include         file       \.faces<br />
mod_gzip_item_include         file       \.css$<br />
mod_gzip_item_include         file       \.jsp$<br />
mod_gzip_item_include         file       \.jsp</p>
<p>mod_gzip_item_include         uri        \.jsp$<br />
mod_gzip_item_include         uri        \.jsp</p>
<p>mod_gzip_item_include         handler    \.*<br />
mod_gzip_item_include         handler    \.*$</p>
<p>mod_gzip_item_include         mime       ^text/html$<br />
mod_gzip_item_include         mime       ^text/html<br />
mod_gzip_item_include         mime      ^text/plain<br />
mod_gzip_item_include         mime      ^text/plain$<br />
mod_gzip_item_include         mime       ^text/xml$<br />
mod_gzip_item_include         mime       ^text/css$<br />
mod_gzip_item_include         mime       ^text/javascript$<br />
mod_gzip_item_include         mime       ^text/javascript<br />
mod_gzip_item_include         mime       ^application/x-javascript$<br />
mod_gzip_item_include         mime       ^application/javascript$</p>
<p>CustomLog                     logs/mod_gzip.log common_with_mod_gzip_info2<br />
LogFormat                     "%h %l %u %t \"%V %r\" %<s %{Content-type}o  %b mo<br />
d_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n -< Out:%{mod_gzip_output_<br />
size}n = %{mod_gzip_compression_ratio}n pct." common_with_mod_gzip_info2<br />
</IfModule></p>
<p>[/sourcecode]</p>
<p>I will just say (cause it is important) that <strong>without</strong> the two lines including the "handler" patterns, I couldn't get any compression to work when I was playing with JSF applications. All the logging lines had status "DECLINED:EXCLUDED".</p>
<p>The first thing to do when you're supposed to do this would be to enable logging of gzip to understand what is going on. Then based on status-codes you can get a clue to why a file is compressed or not.</p>
<p>Add the following line in your conf:<br />
LogFormat                     "%h %l %u %t \"%V %r\" %&#60;s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n -&#60; Out:%{mod_gzip_output_size}n = %{mod_gzip_compression_ratio}n pct." common_with_mod_gzip_info2</p>
<p>A problem that troubled me were when I got prints like this:<br />
213.162.235.138 - - [21/Aug/2008:15:13:44 +0200] "localhost.localdomain GET /Url/css/styles.css HTTP/1.1" 200 text/plain  0 mod_gzip: SEND_AS_IS:NO_200 In:0 -&#60; Out:0 = 0 pct.</p>
<p>Apache reports the file as 200, but gzip ends up with status code "SEND_AS_IS:NO_200". Ok, so we go to check the meaning of the <a href="http://schroepl.net/projekte/mod_gzip/status.htm">status codes</a>, but that didn't tell us much. Confusing? It really means that this file is cached in the browser, and will not be compressed because of this. Try ctrl+F5 to clear the cache, then it should compress that file as well.</p>
<p>Also, even if I included the line "mod_gzip_item_include         file       \.js$" to compress javascript, for all the javascripts it reported "SEND_AS_IS:RESPONSE_CONTENT_TYPE_EXCLUDED"<br />
I troubled with this one, but then I remembered something I read on the internet: "The order of processing during each of both phases is not important, but to trigger the compression of a request's content this request a) must match at least one include rule in each of both phases and # b) must not match an exclude rule in any of both phases." </p>
<p>In other words, for some reason it didn't find an include rule for javascript in both phases. I had included mime type ^text/javascript, so I couldn't understand this. But I felt like navigating blindly, cause I never saw what mime-type the request was. So I added the following to my log statement: "%{Content-type}o" - which would print out the mime-type as well. Then I saw that for some javascripts the mime-type were application/x-javascript. I included this in the include-list as well, then case was closed :)</p>
<p>Hope this post will help others in the same situation, or at least it might give you a clue to what is going on :)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Issues I filed against JSF 2.0]]></title>
<link>http://matthiaswessendorf.wordpress.com/?p=99</link>
<pubDate>Thu, 21 Aug 2008 09:43:46 +0000</pubDate>
<dc:creator>matthiaswessendorf</dc:creator>
<guid>http://matthiaswessendorf.wordpress.com/?p=99</guid>
<description><![CDATA[Some important items, such as ajax or lowering the pain of creating components was already discussed]]></description>
<content:encoded><![CDATA[<p>Some important items, such as ajax or lowering the pain of creating components was already discussed on blog from Ed Burns or other JSF spec members.</p>
<p>I filed some tickets in the past against the JSF Spec (meaning API definition) as well.</p>
<p>Here is my (incomplete) list:</p>
<p>I want more interfaces on javax.faces.component:<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=322"><br />
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=322</a></p>
<p>Why does Unified EL Spec say <strong>If A is String: return A. Otherwise, if A is null: return ""</strong>.<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=323"><br />
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=323</a></p>
<p>I can understand why they added this guy in UIInput, but IMO this is wrong:<br />
<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=327">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=327</a><br />
(Please no EditableValueHolder2 ;-))</p>
<p>Autocomplete was introduced on inputText, with the advent of JSF 1.2 (due to the rise of ajax),<br />
but they forgot the html_form component:<br />
<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=418">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=418</a></p>
<p>I am pretty sure some more methods are missing on ExternalContext:<br />
<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=438">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=438</a><br />
In Trinidad we have a ExternalContextUtil, where we add those bits that are missing...</p>
<p>Why not making subforms part of the standard (since jsf 2.0 already contains some new tags):<br />
<a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=441">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=441</a></p>
<p>These came up due to bugs, Gabrielle Crawford and I worked on (since our ADF Faces Framework has an optimized JSF lifecycle):</p>
<p>-<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=331">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=331</a></p>
<p>-<a class="moz-txt-link-freetext" href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=332">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=332</a></p>
<p>I hope these tickets (and some others) are addressed in the next generation of JSF 2.0 :-)<br />
Some other cool things were already added, as Ryan showed in his <a href="http://blogs.sun.com/rlubke/">blog</a>. I am really looking forward for the JSF.next (and for Servlet 3.0 as well).</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Masked Input with Richfaces]]></title>
<link>http://ahoehma.wordpress.com/?p=35</link>
<pubDate>Tue, 19 Aug 2008 13:08:21 +0000</pubDate>
<dc:creator>Andreas Höhmann</dc:creator>
<guid>http://ahoehma.wordpress.com/?p=35</guid>
<description><![CDATA[I would like to define a input-mask for a inputfield, e.g. for a telefonnumber or number in scientif]]></description>
<content:encoded><![CDATA[<p>I would like to define a input-mask for a inputfield, e.g. for a telefonnumber or number in scientific notation (1.23 E-10). A nice way could be the usage of a special "css-class" to mark the masked-input-elements and the usage of the alt-attribute to define the mask-format. Here is my solution:</p>
<p>First of all we need a little bit Javascript, i use the <a href="http://jsfromhell.com/forms/masked-input" target="_blank">Masked Input Component from Jonas Raoni Soares Silva</a>:</p>
<p>[sourcecode language='javascript']</p>
<p>addEvent = function(o, e, f, s){<br />
var r = o[r = "_" + (e = "on" + e)] = o[r] &#124;&#124; (o[e] ? [[o[e], o]] : []), a, c, d;<br />
r[r.length] = [f, s &#124;&#124; o], o[e] = function(e){<br />
try{<br />
(e = e &#124;&#124; (window.event ? (arguments = [].slice.call(arguments)).unshift(e = event) &#124;&#124; 1 &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; e : {})).preventDefault &#124;&#124; (e.preventDefault = function(){e.returnValue = false;});<br />
e.stopPropagation &#124;&#124; (e.stopPropagation = function(){e.cancelBubble = true;});<br />
e.target &#124;&#124; (e.target = e.srcElement &#124;&#124; null);<br />
e.key = (e.which + 1 &#124;&#124; e.keyCode + 1) - 1 &#124;&#124; 0;<br />
}catch(f){}<br />
for(d = 1, f = r.length; f; r[--f] &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; (a = r[f][0], o = r[f][1], a.apply ? c = a.apply(o, arguments) : (o._ = a, c = o._(e), o._ = null), d &#38;amp;amp;amp;amp;amp;amp;amp;amp;= c !== false));<br />
return e = null, !!d;<br />
}<br />
};<br />
removeEvent = function(o, e, f, s){<br />
for(var i = (e = o["_on" + e] &#124;&#124; []).length; i;)<br />
if(e[--i] &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; e[i][0] == f &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; (s &#124;&#124; o) == e[i][1])<br />
return delete e[i];<br />
return false;<br />
};<br />
MaskInput = function(f, m){<br />
function mask(e){<br />
var patterns = {"1": /[A-Z]/i, "2": /[0-9]/, "4": /[\xC0-\xFF]/i, "8": /./ },<br />
rules = { "a": 3, "A": 7, "9": 2, "C":5, "c": 1, "*": 8};<br />
function accept(c, rule){<br />
for(var i = 1, r = rules[rule] &#124;&#124; 0; i &#38;amp;amp;amp;amp;amp;amp;amp;lt;= r; i&#38;amp;amp;amp;amp;amp;amp;amp;lt;&#38;amp;amp;amp;amp;amp;amp;amp;lt;=1)<br />
if(r &#38;amp;amp;amp;amp;amp;amp;amp;amp; i &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; patterns[i].test(c))<br />
break;<br />
return i &#38;amp;amp;amp;amp;amp;amp;amp;lt;= r &#124;&#124; c == rule;<br />
}<br />
var k, mC, r, c = String.fromCharCode(k = e.key), l = f.value.length;<br />
(!k &#124;&#124; k == 8 ? 1 : (r = /^(.)\^(.*)$/.exec(m)) &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; (r[0] = r[2].indexOf(c) + 1) + 1 ?<br />
r[1] == "O" ? r[0] : r[1] == "E" ? !r[0] : accept(c, r[1]) &#124;&#124; r[0]<br />
: (l = (f.value += m.substr(l, (r = /[A&#124;9&#124;C&#124;\*]/i.exec(m.substr(l))) ?<br />
r.index : l)).length) &#38;amp;amp;amp;amp;amp;amp;amp;lt; m.length &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; accept(c, m.charAt(l))) &#124;&#124; e.preventDefault();<br />
};<br />
for(var i in !/^(.)\^(.*)$/.test(m) &#38;amp;amp;amp;amp;amp;amp;amp;amp;&#38;amp;amp;amp;amp;amp;amp;amp;amp; (f.maxLength = m.length), {keypress: 0, keyup: 1})<br />
addEvent(f, i, mask);<br />
};<br />
[/sourcecode]</p>
<p>then we define the inputfield:</p>
<p>[sourcecode language='html']<br />
<h:inputText styleClass="maskedInput" alt="9,99 E-99"/><br />
[/sourcecode]</pre>
<p>and last a little bit JS-Code which decorates the current formulare after each rerender, but it at the end of your page:</p>
<p>[sourcecode language='html']<br />
<a4j:outputPanel ajaxRendered="true"><br />
  <script type="text/javascript">
   var maskedInput=$$(".maskedInput");
   if (Object.isArray(maskedInput)){
     maskedInput.each(function (elm){
     // input-mask is defined in the alt element
     var maskPattern = Element.readAttribute(elm, "alt");
     MaskInput(elm, maskPattern);
     });
   }
  </script><br />
</a4j:outputPanel><br />
[/sourcecode]</pre>
<p>That's it :) Every time A4J rerenders the page the decorator search all marked elements and creates a MaskInput object for the elements.</p>
<p>Try it!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Using Seam 2 and JBoss Portal Pt.2]]></title>
<link>http://tarnaeluin.wordpress.com/?p=187</link>
<pubDate>Sun, 17 Aug 2008 18:04:56 +0000</pubDate>
<dc:creator>berenerchamion</dc:creator>
<guid>http://tarnaeluin.wordpress.com/?p=187</guid>
<description><![CDATA[This is the second post in my quest to screw around with JBoss Portal and Seam&#8230;the first post ]]></description>
<content:encoded><![CDATA[<p>This is the second post in my quest to screw around with JBoss Portal and Seam...<a href="http://tarnaeluin.wordpress.com/2008/08/08/liferayi-need-a-life-jacket-giving-jboss-portal-a-try/">the first post is here</a>.</p>
<p><a href="http://www.seamframework.org">Seam</a> is an application framework based on several different technologies: JSF, Facelets, EJB3, and AJAX. If you are interested in creating rich internet applications then Seam or <a href="http://icefaces.org">IceFaces</a> are nice packages for Java based systems. Since I'm interested in building portlets for JBoss Portal using Seam is a good fit. If you're interested in IceFaces I can say its a nice package too and I've used it successfully on other applications.</p>
<p>In this post I'm not really going to discuss in too many details the platforms and how they work - if you want more info on Seam then go to their site or Google it. The Seam site is really quite nice. I'm going to detail out how I got my system configured, what tips/tricks I learned, and make a decision on if I'll use these tools on a real project that I have coming up.<!--more--></p>
<p>Getting going with Seam is really quite simple. There's one basic rule: RTFM. The<a href="http://www.seamframework.org"> Seam site</a> is good and has great docs on getting everything setup so use it. Because I'm into self torture I'm going with the Seam 2.0 beta version and I'm going to use this with Elcipse 3.4 and add on top of that the latest JBoss Tools suite of plugins and features. I've grabbed all these from the JBoss CVS repo {CVS? dudes! SVN is way better!}. I'm also using the latest JBossAS 4.2 build for Win32 and MySQL 5.1 as well. I'm using JDK 1.6U7</p>
<p>I messed around with JSF about a year ago so the first thing I wanted to do was get a refresher on JSF. I found these sites useful:</p>
<ul>
<li>http://www.jsftutorials.net/</li>
<li>http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFIntro.html</li>
<li>http://java.sun.com/javaee/5/docs/tutorial/doc/bnaph.html</li>
</ul>
<p>I got thru those pretty quickly and started looking thru examples and then used the JBoss Tools in eclipse to generate and deploy a test seam application using <a href="http://docs.jboss.com/seam/latest/reference/en-US/html/gettingstartedwithjbosstools.html">this page</a> as a guide. The tools interface is pretty nice.</p>
<p><a href="http://tarnaeluin.wordpress.com/files/2008/08/seam_tools.png"><img class="alignleft size-medium wp-image-194" src="http://tarnaeluin.wordpress.com/files/2008/08/seam_tools.png?w=300" alt="" width="300" height="244" /></a></p>
<p>The interface is pretty obvious if you are into Eclipse. In order to really work with seam you need to be in the right perspective. Once you are there the menu options for creating projects will have wizards and stuff. In this shot I've generated my basic project and deployed it within the environment to my jboss AS. The console output is right in the window. On the right are various widgets for the UI layout views. In the lower left is the properties panel - to me that's in an odd place, but you can move it around.</p>
<p>I was able to deploy and then re-deploy this to my jboss server. You can make incremental updates to some kinds of things like xhtml docments and see the changes in the running app server. Other things in typical J2EE fashion require a full restart or a re-deploy action.</p>
<p>Now that I've got that working I'm onto my first attempt to use the application generation tools to reverse engineer a complete application. What I have is a MySQL database with a bunch of tables and relations and I want to generate some basic user interfaces from that. The process is pretty simple, just click click on your project and pick off "Generate Seam Entities" and off it will go. You can review some settings in your project if things do not work right. The output of this will be a complete set of hibernate objects, POJOs to work against them and a set of web content and forms to display and show data.</p>
<p>Doing this against my schema had some mixed results. Immediately following the generation I had several compile issues. In one class an annotation was duplicated for some reason. I deleted the second copy and that was solved. Another issue proved more difficult. I happen to have a table called "Messages" in my schema. When seam RE's the table it names the object "Messages" of couse, but this causes a conflict with some internal objects in Seam itself called "Messages". I refactored my objects to "BerenMessages", but this does not fix all the references in the XHTML so I've got more work to do there. Here's a shot of that:</p>
<p><a href="http://tarnaeluin.wordpress.com/files/2008/08/messages.png"><img class="alignleft size-medium wp-image-195" src="http://tarnaeluin.wordpress.com/files/2008/08/messages.png?w=300" alt="" width="300" height="219" /></a></p>
<p>I can't see why that would cause an issue. I even fully qualified all the packages to see if that would fix the issue. I guess I'll have to dig into this a bit more. In any case I got around this temporarily by just deleting the method and then removing the message functions from the xhtml menuing that was generated so that I wouldn't get any errors at deploy time. With that done my application will deploy to the JBoss server with no errors.</p>
<p>What is produced is a bare bones set of DAOs, POJOs, controller logic, and a set of xHTML screens and forms for data entry/manipulation. There's also a sample authentication mechanism that is while functional not actually authenticating against anything in particular, but it does show how sessions work.</p>
<p><a href="http://tarnaeluin.wordpress.com/files/2008/08/seam_app_t5.png"><img class="alignleft size-medium wp-image-198" src="http://tarnaeluin.wordpress.com/files/2008/08/seam_app_t5.png?w=300" alt="" width="300" height="214" /></a></p>
<p>So well - hey that's pretty darn cool. In about 2 hours a relatively ignorant person can generate an app like this? Not too bad.I suspect that my issues with the initial generation are due to using some MySQL specific things (like the enum type) and then perhaps some back luck with tables and things that are unfortunately named.</p>
<p>I'm going to play around with this and see how to get a few portal gadets working and I'll post my "part three" on this topic.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Leer un archivo properties desde un proyecto web + JSF]]></title>
<link>http://cafelojano.wordpress.com/?p=275</link>
<pubDate>Fri, 15 Aug 2008 20:51:28 +0000</pubDate>
<dc:creator>christmo</dc:creator>
<guid>http://cafelojano.wordpress.com/?p=275</guid>
<description><![CDATA[Hola en este post voy a mostrar como se debe hacer para leer un archivo *.properties de java, puesto]]></description>
<content:encoded><![CDATA[<p style="text-align:justify;">Hola en este post voy a mostrar como se debe hacer para leer un archivo *.properties de java, puesto dentro de un proyecto web JSF, es interesante mencionar que la forma de llamar a estos archivos difiere un poco de como se lo hace comúnmente en un proyecto swing de escritorio común y corriente,  ya que en este solo se pone el path relativo desde el pack del proyecto y ya, pero en un proyecto web no funciona así, por eso he decidido mostrarlo a continuación, esta es la forma que descubrí para hacerlo y me funcionó, pero si existe una forma mejor o más optima de realizarlo res ruego comentarlo para así aprender todos algo más.</p>
<p style="text-align:justify;">Dentro de nuestro proyecto web se nos crean comunmente las páginas jsp, y su contraparte en código java dentro de un paquete en la carpeta Source Packages, dentro de ese paquete vamos a colocar el archivo .properties, teniendo en cuenta que este se va a llamar igual que la clase que lo va a leer, (por ejemplo: En mi paquete tengo una clase llamada Reportes.java, dentro del mismo paquete pondré un archivo de propiedades llamado reportes.properties), el código para ller este archivo quedaria así:</p>
<pre class="jive-pre"><code class="jive-code jive-java">
  String nombrePROP = Reportes.class.getSimpleName().toLowerCase() + ".properties";
  Properties props = new Properties();
  props.load(Reportes.class.getResourceAsStream(nombrePROP));
  String strPathOrigen = props.getProperty("pathORI");
  String strPathXLS = props.getProperty("pathXLS");
<span style="color:navy;">
</span></code></pre>
<p style="text-align:justify;">Con esto ya podriamos leer las propiesades que se tenga dentro de nuestro archivo properties.</p>
<p style="text-align:justify;">Seguir leyendo en <a title="christmo" href="http://christmo99.wordpress.com/2008/08/15/leer-un-archivo-properties-desde-un-proyecto-web-jsf/">christmo99.wordpress.com</a></p>
<p style="text-align:justify;">Saludos...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Leer un archivo properties desde un proyecto web + JSF]]></title>
<link>http://christmo99.wordpress.com/?p=86</link>
<pubDate>Fri, 15 Aug 2008 20:41:21 +0000</pubDate>
<dc:creator>christmo</dc:creator>
<guid>http://christmo99.wordpress.com/?p=86</guid>
<description><![CDATA[Hola en este post voy a mostrar como se debe hacer para leer un archivo *.properties de java, puesto]]></description>
<content:encoded><![CDATA[<p style="text-align:justify;">Hola en este post voy a mostrar como se debe hacer para leer un archivo *.properties de java, puesto dentro de un proyecto web JSF, es interesante mencionar que la forma de llamar a estos archivos difiere un poco de como se lo hace comúnmente en un proyecto swing de escritorio común y corriente,  ya que en este solo se pone el path relativo desde el pack del proyecto y ya, pero en un proyecto web no funciona así, por eso he decidido mostrarlo a continuación, esta es la forma que descubrí para hacerlo y me funcionó, pero si existe una forma mejor o más optima de realizarlo res ruego comentarlo para así aprender todos algo más.</p>
<p style="text-align:justify;">Dentro de nuestro proyecto web se nos crean comunmente las páginas jsp, y su contraparte en código java dentro de un paquete en la carpeta Source Packages, dentro de ese paquete vamos a colocar el archivo .properties, teniendo en cuenta que este se va a llamar igual que la clase que lo va a leer, (por ejemplo: En mi paquete tengo una clase llamada Reportes.java, dentro del mismo paquete pondré un archivo de propiedades llamado reportes.properties), el código para ller este archivo quedaria así:</p>
<pre class="jive-pre"><code class="jive-code jive-java">
  String nombrePROP = Reportes.class.getSimpleName().toLowerCase() + ".properties";
  Properties props = new Properties();
  props.load(Reportes.class.getResourceAsStream(nombrePROP));
  String strPathOrigen = props.getProperty("pathORI");
  String strPathXLS = props.getProperty("pathXLS");
<span style="color:navy;">
</span></code></pre>
<p style="text-align:justify;">Con esto ya podriamos leer las propiesades que se tenga dentro de nuestro archivo properties.</p>
<p style="text-align:justify;">Ahora para poder poner las propiedades sacadas del archivos en variables globales, tendremos que hacer lo siguiente, fuera de cualquier método y dentro de la clase vamos a poner esto, como un método más.</p>
<pre class="jive-pre"><code class="jive-code jive-java">
  private static String strPathOrigen;
  private static String strPathXLS;

  static {
      try {
         String nombrePROP = Reportes.class.getSimpleName().toLowerCase() + ".properties";
         Properties props = new Properties();
         props.load(Reportes.class.getResourceAsStream(nombrePROP));
         strPathOrigen = props.getProperty("pathORI");
         strPathXLS = props.getProperty("pathXLS");
      } catch (IOException ex) {
         Logger.getLogger(Reportes.class.getName()).log(Level.SEVERE, null, ex);
      }
  }<span style="color:navy;">

</span></code></pre>
<p style="text-align:justify;">Así todo lo que se saque del archivo properties se almacenará globalmente y se podrá usar dentro de toda la clase si es necesario.</p>
<p style="text-align:justify;">Espero que les haya servido...</p>
<p style="text-align:justify;">Saludos christmo...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Descargar un archivo .XLS o .PDF con JSF]]></title>
<link>http://cafelojano.wordpress.com/?p=269</link>
<pubDate>Fri, 15 Aug 2008 15:12:40 +0000</pubDate>
<dc:creator>christmo</dc:creator>
<guid>http://cafelojano.wordpress.com/?p=269</guid>
<description><![CDATA[
Hola había tenido problemas al tratar de descargar un archivo desde el servidor, para que sea visu]]></description>
<content:encoded><![CDATA[<div class="snap_preview">
<p style="text-align:justify;">Hola había tenido problemas al tratar de descargar un archivo desde el servidor, para que sea visualizado en los computadores clientes del sistema usando JSF, pero buscando un poco por allí pude encontrar como hacerlo, este método sirve para descargar archivos *.XLS y *.PDF con los que he probado, pero me imagino que debe funcionar para cualquier tipo de archivo, lo importante es reconocer que MIME Type tiene este archivo eso lo podremos encontrar en esta <a title="MIMES" href="http://www.w3schools.com/media/media_mimeref.asp" target="_blank">página</a>.</p>
<pre class="jive-pre"><code class="jive-code jive-java">File ficheroXLS = <span style="color:navy;"><strong>new</strong></span> File(strPathXLS);
FacesContext ctx = FacesContext.getCurrentInstance();
FileInputStream fis = <span style="color:navy;"><strong>new</strong></span> FileInputStream(ficheroXLS);
<span style="color:navy;"><strong>byte</strong></span>[] bytes = <span style="color:navy;"><strong>new</strong></span> <span style="color:navy;"><strong>byte</strong></span>[1000];
<span style="color:navy;"><strong>int</strong></span> read = 0;

<span style="color:navy;"><strong>if</strong></span> (!ctx.getResponseComplete()) <span style="color:navy;">{</span>
   String fileName = ficheroXLS.getName();
   String contentType = <span style="color:red;">"application/vnd.ms-excel"</span>;
   <span style="color:darkgreen;">//String contentType = "application/pdf";</span>
   HttpServletResponse response =(HttpServletResponse) ctx.getExternalContext().getResponse();
   response.setContentType(contentType);
   response.setHeader(<span style="color:red;">"Content-Disposition"</span>,<span style="color:red;">"attachment;filename=\""</span> + fileName + <span style="color:red;">"\""</span>);
   ServletOutputStream out = response.getOutputStream();

   <span style="color:navy;"><strong>while</strong></span> ((read = fis.read(bytes)) != -1) <span style="color:navy;">{</span>
        out.write(bytes, 0, read);
   <span style="color:navy;">}</span>

   out.flush();
   out.close();
   System.out.println(<span style="color:red;">"\nDescargado\n"</span>);
   ctx.responseComplete();
<span style="color:navy;">}
</span></code></pre>
<p>Saludos <a title="christmo" href="http://christmo99.wordpress.com/" target="_blank">christmo</a></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Descargar un archivo .XLS o .PDF con JSF]]></title>
<link>http://christmo99.wordpress.com/?p=76</link>
<pubDate>Fri, 15 Aug 2008 15:10:13 +0000</pubDate>
<dc:creator>christmo</dc:creator>
<guid>http://christmo99.wordpress.com/?p=76</guid>
<description><![CDATA[Hola había tenido problemas al tratar de descargar un archivo desde el servidor, para que sea visua]]></description>
<content:encoded><![CDATA[<p style="text-align:justify;">Hola había tenido problemas al tratar de descargar un archivo desde el servidor, para que sea visualizado en los computadores clientes del sistema usando JSF, pero buscando un poco por allí pude encontrar como hacerlo, este método sirve para descargar archivos *.XLS y *.PDF con los que he probado, pero me imagino que debe funcionar para cualquier tipo de archivo, lo importante es reconocer que MIME Type tiene este archivo eso lo podremos encontrar en esta <a title="MIMES" href="http://www.w3schools.com/media/media_mimeref.asp" target="_blank">página</a>.</p>
<pre class="jive-pre"><code class="jive-code jive-java">File ficheroXLS = <span style="color:navy;"><strong>new</strong></span> File(strPathXLS);
FacesContext ctx = FacesContext.getCurrentInstance();
FileInputStream fis = <span style="color:navy;"><strong>new</strong></span> FileInputStream(ficheroXLS);
<span style="color:navy;"><strong>byte</strong></span>[] bytes = <span style="color:navy;"><strong>new</strong></span> <span style="color:navy;"><strong>byte</strong></span>[1000];
<span style="color:navy;"><strong>int</strong></span> read = 0;

<span style="color:navy;"><strong>if</strong></span> (!ctx.getResponseComplete()) <span style="color:navy;">{</span>
   String fileName = ficheroXLS.getName();
   String contentType = <span style="color:red;">"application/vnd.ms-excel"</span>;
   <span style="color:darkgreen;">//String contentType = "application/pdf";</span>
   HttpServletResponse response =
   (HttpServletResponse) ctx.getExternalContext().getResponse();

   response.setContentType(contentType);

   response.setHeader(<span style="color:red;">"Content-Disposition"</span>,
                      <span style="color:red;">"attachment;filename=\""</span> + fileName + <span style="color:red;">"\""</span>);

   ServletOutputStream out = response.getOutputStream();

   <span style="color:navy;"><strong>while</strong></span> ((read = fis.read(bytes)) != -1) <span style="color:navy;">{</span>
        out.write(bytes, 0, read);
   <span style="color:navy;">}</span>

   out.flush();
   out.close();
   System.out.println(<span style="color:red;">"\nDescargado\n"</span>);
   ctx.responseComplete();
<span style="color:navy;">}

</span></code></pre>
<p>Saludos y espero que sea de utilidad para ustedes...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ Php script for email form ]]></title>
<link>http://scriptforall.wordpress.com/?p=29</link>
<pubDate>Wed, 13 Aug 2008 12:45:30 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/?p=29</guid>
<description><![CDATA[ &lt;?php
$fileatt = &#8220;&#8221;; // Path to the file
$fileatt_type = &#8220;application/octet-st]]></description>
<content:encoded><![CDATA[<p><code style="white-space:nowrap;"><code><span style="color:#000000;"> <span style="color:#0000bb;">&#60;?php<br />
$fileatt </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Path to the file<br />
</span><span style="color:#0000bb;">$fileatt_type </span><span style="color:#007700;">= </span><span style="color:#dd0000;">"application/octet-stream"</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// File Type<br />
</span><span style="color:#0000bb;">$fileatt_name </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Filename that will be used for the file as the attachment</span></span></code></code></p>
<p><span style="color:#0000bb;">$email_from </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Who the email is from<br />
</span><span style="color:#0000bb;">$email_subject </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// The Subject of the email<br />
</span><span style="color:#0000bb;">$email_message </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Message that the email has in it</span></p>
<p><span style="color:#0000bb;">$email_to </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Who the email is too</span></p>
<p><span style="color:#0000bb;">$headers </span><span style="color:#007700;">= </span><span style="color:#dd0000;">"From: "</span><span style="color:#007700;">.</span><span style="color:#0000bb;">$email_from</span><span style="color:#007700;">;</span></p>
<p><span style="color:#0000bb;">$semi_rand </span><span style="color:#007700;">= </span><span style="color:#0000bb;">md5</span><span style="color:#007700;">(</span><span style="color:#0000bb;">time</span><span style="color:#007700;">());<br />
</span><span style="color:#0000bb;">$mime_boundary </span><span style="color:#007700;">= </span><span style="color:#dd0000;">"==Multipart_Boundary_x{$semi_rand}x"</span><span style="color:#007700;">;</span></p>
<p><span style="color:#0000bb;">$headers </span><span style="color:#007700;">.= </span><span style="color:#dd0000;">"\nMIME-Version: 1.0\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"Content-Type: multipart/mixed;\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">" boundary=\"{$mime_boundary}\""</span><span style="color:#007700;">;</span></p>
<p><span style="color:#0000bb;">$email_message </span><span style="color:#007700;">.= </span><span style="color:#dd0000;">"This is a multi-part message in MIME format.\n\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"--{$mime_boundary}\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"Content-Type:text/html; charset=\"iso-8859-1\"\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"Content-Transfer-Encoding: 7bit\n\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#0000bb;">$email_message </span><span style="color:#007700;">. </span><span style="color:#dd0000;">"\n\n"</span><span style="color:#007700;">;</span></p>
<p><span style="color:#ff8000;">/********************************************** First File ********************************************/</span></p>
<p><span style="color:#0000bb;">$fileatt </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Path to the file<br />
</span><span style="color:#0000bb;">$fileatt_type </span><span style="color:#007700;">= </span><span style="color:#dd0000;">"application/octet-stream"</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// File Type<br />
</span><span style="color:#0000bb;">$fileatt_name </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Filename that will be used for the file as the attachment</span></p>
<p><span style="color:#0000bb;">$file </span><span style="color:#007700;">= </span><span style="color:#0000bb;">fopen</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$fileatt</span><span style="color:#007700;">,</span><span style="color:#dd0000;">'rb'</span><span style="color:#007700;">);<br />
</span><span style="color:#0000bb;">$data </span><span style="color:#007700;">= </span><span style="color:#0000bb;">fread</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$file</span><span style="color:#007700;">,</span><span style="color:#0000bb;">filesize</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$fileatt</span><span style="color:#007700;">));<br />
</span><span style="color:#0000bb;">fclose</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$file</span><span style="color:#007700;">);</span></p>
<p><span style="color:#0000bb;">$data </span><span style="color:#007700;">= </span><span style="color:#0000bb;">chunk_split</span><span style="color:#007700;">(</span><span style="color:#0000bb;">base64_encode</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$data</span><span style="color:#007700;">));</span></p>
<p><span style="color:#0000bb;">$email_message </span><span style="color:#007700;">.= </span><span style="color:#dd0000;">"--{$mime_boundary}\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"Content-Type: {$fileatt_type};\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">" name=\"{$fileatt_name}\"\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#ff8000;">//"Content-Disposition: attachment;\n" .<br />
//" filename=\"{$fileatt_name}\"\n" .<br />
</span><span style="color:#dd0000;">"Content-Transfer-Encoding: base64\n\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#0000bb;">$data </span><span style="color:#007700;">. </span><span style="color:#dd0000;">"\n\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"--{$mime_boundary}--\n"</span><span style="color:#007700;">;<br />
unset(</span><span style="color:#0000bb;">$data</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$file</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$fileatt</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$fileatt_type</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$fileatt_name</span><span style="color:#007700;">)</span></p>
<p><span style="color:#ff8000;">/********************************************** Second File ********************************************/</span></p>
<p><span style="color:#0000bb;">$fileatt </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Path to the file<br />
</span><span style="color:#0000bb;">$fileatt_type </span><span style="color:#007700;">= </span><span style="color:#dd0000;">"application/octet-stream"</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// File Type<br />
</span><span style="color:#0000bb;">$fileatt_name </span><span style="color:#007700;">= </span><span style="color:#dd0000;">""</span><span style="color:#007700;">; </span><span style="color:#ff8000;">// Filename that will be used for the file as the attachment</span></p>
<p><span style="color:#0000bb;">$file </span><span style="color:#007700;">= </span><span style="color:#0000bb;">fopen</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$fileatt</span><span style="color:#007700;">,</span><span style="color:#dd0000;">'rb'</span><span style="color:#007700;">);<br />
</span><span style="color:#0000bb;">$data </span><span style="color:#007700;">= </span><span style="color:#0000bb;">fread</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$file</span><span style="color:#007700;">,</span><span style="color:#0000bb;">filesize</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$fileatt</span><span style="color:#007700;">));<br />
</span><span style="color:#0000bb;">fclose</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$file</span><span style="color:#007700;">);</span></p>
<p><span style="color:#0000bb;">$data </span><span style="color:#007700;">= </span><span style="color:#0000bb;">chunk_split</span><span style="color:#007700;">(</span><span style="color:#0000bb;">base64_encode</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$data</span><span style="color:#007700;">));</span></p>
<p><span style="color:#0000bb;">$email_message </span><span style="color:#007700;">.= </span><span style="color:#dd0000;">"--{$mime_boundary}\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"Content-Type: {$fileatt_type};\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">" name=\"{$fileatt_name}\"\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#ff8000;">//"Content-Disposition: attachment;\n" .<br />
//" filename=\"{$fileatt_name}\"\n" .<br />
</span><span style="color:#dd0000;">"Content-Transfer-Encoding: base64\n\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#0000bb;">$data </span><span style="color:#007700;">. </span><span style="color:#dd0000;">"\n\n" </span><span style="color:#007700;">.<br />
</span><span style="color:#dd0000;">"--{$mime_boundary}--\n"</span><span style="color:#007700;">;<br />
unset(</span><span style="color:#0000bb;">$data</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$file</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$fileatt</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$fileatt_type</span><span style="color:#007700;">)<br />
unset(</span><span style="color:#0000bb;">$fileatt_name</span><span style="color:#007700;">)</span></p>
<p><span style="color:#ff8000;">/********************************************** End of File Config ********************************************/</span></p>
<p>// To add more files just copy the file section again, but make sure they are all one after the other! If they are not it will not work!</p>
<p><span style="color:#0000bb;">$ok </span><span style="color:#007700;">= @</span><span style="color:#0000bb;">mail</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$email_to</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$email_subject</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$email_message</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$headers</span><span style="color:#007700;">);</span></p>
<p>if(<span style="color:#0000bb;">$ok</span><span style="color:#007700;">) {<br />
echo </span><span style="color:#dd0000;">"&#60;font face=verdana size=2&#62;The file was successfully sent!&#60;/font&#62;"</span><span style="color:#007700;">;<br />
} else {<br />
die(</span><span style="color:#dd0000;">"Sorry but the email could not be sent. Please go back and try again!"</span><span style="color:#007700;">);<br />
}<br />
</span><span style="color:#0000bb;">?&#62;</span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[A new blog...]]></title>
<link>http://matthiaswessendorf.wordpress.com/?p=96</link>
<pubDate>Wed, 13 Aug 2008 07:41:27 +0000</pubDate>
<dc:creator>matthiaswessendorf</dc:creator>
<guid>http://matthiaswessendorf.wordpress.com/?p=96</guid>
<description><![CDATA[I recently joined the Oracle Developer Tools Blog, a blog about JDeveloper, ADF, TopLink and Eclipse]]></description>
<content:encoded><![CDATA[<p>I recently joined the <a href="http://blogs.oracle.com/devtools/">Oracle Developer Tools Blog</a>, a blog about JDeveloper, ADF, TopLink and Eclipse.</p>
<p>My first post is <a href="http://blogs.oracle.com/devtools/2008/08/apache_myfaces_trinidad_129_re.html">this</a>, on Trinidad 1.2.9.</p>
<p>This does <strong>NOT </strong>mean I give up this private blog. Just once in a while I'll post some news/entries there ;-)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Conversores en JSF]]></title>
<link>http://fetishcode.wordpress.com/?p=204</link>
<pubDate>Tue, 12 Aug 2008 17:09:55 +0000</pubDate>
<dc:creator>fetishcode</dc:creator>
<guid>http://fetishcode.wordpress.com/?p=204</guid>
<description><![CDATA[En Jdevloperla publicamos un nuevo articulo, dentro de la secciona JSF, Conversores en JSF, donde se]]></description>
<content:encoded><![CDATA[<p>En Jdevloperla publicamos un nuevo articulo, dentro de la secciona JSF, <a rel="nofollow" href="http://jdeveloperla.com/joomla/index.php?option=com_content&#38;view=article&#38;id=63:conversores-en-jsf&#38;catid=41:jsf&#38;Itemid=69" target="_blank"><strong>Conversores en JSF</strong></a>, donde se trata el tema de las conversiones estandars en JSF y como crear nuestros propios conversores.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[New Trinidad release]]></title>
<link>http://matthiaswessendorf.wordpress.com/?p=89</link>
<pubDate>Mon, 11 Aug 2008 14:42:30 +0000</pubDate>
<dc:creator>matthiaswessendorf</dc:creator>
<guid>http://matthiaswessendorf.wordpress.com/?p=89</guid>
<description><![CDATA[I did it again&#8230; There is now a new release of Apache MyFaces Trinidad available. For JSF 1.1 t]]></description>
<content:encoded><![CDATA[<p>I did it again... There is now a new release of Apache MyFaces Trinidad available. For JSF 1.1 take the 1.0.9 version and the JSF 1.2 use the 1.2.9 version of Trinidad.</p>
<p>1.0.9 release notes are <a href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310661&#38;styleName=Html&#38;version=12313158">here</a>.</p>
<p>1.2.9 release notes are <a href="https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310661&#38;styleName=Html&#38;version=12313157">here</a>.</p>
<p>If you are using Trinidad it would be great if you add your company / client to this <a href="http://wiki.apache.org/myfaces/Companies_using_Trinidad">wiki page</a>.</p>
<p>For Feedback, questions or bug reports the <a href="http://myfaces.apache.org/trinidad/mail-lists.html">Trinidad community</a> is a great resource!</p>
]]></content:encoded>
</item>

</channel>
</rss>
