<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8157348752580167254</id><updated>2012-02-02T01:33:22.372+01:00</updated><category term='jdeveloper'/><category term='apex'/><category term='jsf'/><category term='general java'/><category term='validation'/><category term='oracle'/><category term='adf'/><title type='text'>My thoughts on Java, Linux and Oracle products</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8157348752580167254.post-4023271257459099034</id><published>2007-08-20T20:30:00.000+02:00</published><updated>2007-08-20T20:40:50.956+02:00</updated><title type='text'>It's been a while...</title><content type='html'>... since my last post. There is still some code waiting to be published, but I still don't have time to document it properly :( Currently I'm working on a data transformation project for one of our customers. I won't be writing any Java code in the near future. I'm changing my focus to Business Intelligence, so that will probably be the main topic of my future posts. Stay tuned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8157348752580167254-4023271257459099034?l=januszmarchewa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/4023271257459099034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8157348752580167254&amp;postID=4023271257459099034' title='47 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/4023271257459099034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/4023271257459099034'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/2007/08/its-been-while.html' title='It&apos;s been a while...'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>47</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8157348752580167254.post-7077277644318221085</id><published>2007-06-23T13:47:00.000+02:00</published><updated>2007-06-23T14:55:41.517+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adf'/><category scheme='http://www.blogger.com/atom/ns#' term='apex'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Our first ADF application is production-ready!</title><content type='html'>As you might have noticed, my last post was written over a month ago. The reason is simple: I was quite busy finishing our first ADF application that is now production-ready! :) Whew...&lt;br /&gt;&lt;br /&gt;We've learned a lot about ADF and JDeveloper. Hopefully we'll be able to leverage the power of this framework in future applications. Did everything go smoothly? Well, no. We are still not comfortable with ADF Security (we had to remove the authorization support), because it does throw weird exceptions in some situations and the ADF Security wizard in JDeveloper is a problem itself (it's hard to do any teamwork with this wizard).&lt;br /&gt;&lt;br /&gt;Another conclusion is that the JPA+EJB3+ADF stack is not as productive as we thought. I'm going to have another look at ADF BC in the near future.&lt;br /&gt;&lt;br /&gt;Finally, a few things worth mentioning:&lt;br /&gt;1. If you have a problem with locales (e.g. the default ADF messages show up in a different locale than your messages), you should have a look &lt;a href="http://www.oracle.com/technology/products/jdev/101/howtos/jsfinter/index.html#Internationalize_your_application"&gt;here&lt;/a&gt;.&lt;br /&gt;2. If you are using Oracle XE and Firefox and you cannot edit SQL scripts in the web interface, &lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1847723&amp;#1847723"&gt;this message&lt;/a&gt; will lead you to a solution.&lt;br /&gt;3. I've enhanced Frank Nimphius's solution (&lt;a href="http://www.orablogs.com/fnimphius/archives/001925.html"&gt;JSF login form for container-managed authentication in Java Server Faces&lt;/a&gt;) to make it more useful. I'll publish my modifications as soon as I find some spare time. Stay tuned ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8157348752580167254-7077277644318221085?l=januszmarchewa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/7077277644318221085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8157348752580167254&amp;postID=7077277644318221085' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/7077277644318221085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/7077277644318221085'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/2007/06/our-first-adf-application-is-production.html' title='Our first ADF application is production-ready!'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8157348752580167254.post-6839742286013893910</id><published>2007-05-17T08:47:00.000+02:00</published><updated>2007-05-17T09:54:14.614+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='general java'/><title type='text'>Classpath conflicts</title><content type='html'>One problem kept bugging me for three weeks. It was quite irrational - I couldn't extend the functionality of the application, because changes in services (that were EJB3 session beans) were not visible. The problem occurred when deploying to embedded OC4J, but, surprisingly, not when deploying to OC4J standalone...&lt;br /&gt;&lt;br /&gt;After getting lots of JBO-25221 (method not supported) and java.lang.NoSuchMethodError I thought I would investigate the class used at runtime. I found that the method that should be there wasn't there at runtime. So I decided to find out where did the class come from. Bertrand Delacretaz has an &lt;a href="http://www.codeconsult.ch/bertrand/archives/000767.html"&gt;example&lt;/a&gt; of checking when was a Java class compiled. Small modifications to his example and the mysterious class is unmasked:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;MyClass.class.getResource( "MyClass.class" ).openConnection().getURL().toString()&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I was shocked when I saw the output - it turned out that another project that should have a small 2-class jar in my application had packed also a bunch of classes from the same model. The model was referenced by both projects as a dependency and the deployment profile had a magic checkbox selected:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_SIEoUWl_w4I/RkwJEJUZ98I/AAAAAAAAAAM/wlFA3zq0ZeI/s1600-h/project-deps.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_SIEoUWl_w4I/RkwJEJUZ98I/AAAAAAAAAAM/wlFA3zq0ZeI/s400/project-deps.png" alt="" id="BLOGGER_PHOTO_ID_5065433647710599106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That resulted in a silent classpath conflict I was not aware of... Finally, the problem is gone :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8157348752580167254-6839742286013893910?l=januszmarchewa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/6839742286013893910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8157348752580167254&amp;postID=6839742286013893910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/6839742286013893910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/6839742286013893910'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/2007/05/classpath-conflicts.html' title='Classpath conflicts'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_SIEoUWl_w4I/RkwJEJUZ98I/AAAAAAAAAAM/wlFA3zq0ZeI/s72-c/project-deps.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8157348752580167254.post-1445014788832522789</id><published>2007-05-15T20:49:00.000+02:00</published><updated>2007-05-16T07:58:24.054+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adf'/><category scheme='http://www.blogger.com/atom/ns#' term='jdeveloper'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>... is not a registered tag in that namespace?</title><content type='html'>Today JDeveloper broke my project. I don't know what exactly happened, but putting an ADF Faces tag inside a page resulted in JSP compilation errors, e.g.:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;Error: http://xmlns.oracle.com/adf/faces:panelPage is not a registered tag in that namespace.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After a few minutes of trying different things I opened the web.xml file and found the problem:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;    &amp;lt;taglib&gt;&lt;br /&gt;        &amp;lt;taglib-uri&gt;&lt;br /&gt;            http://java.sun.com/jsf/core&lt;br /&gt;        &amp;lt;/taglib-uri&gt;&lt;br /&gt;        &amp;lt;taglib-location&gt;&lt;br /&gt;            /WEB-INF/lib/jsf-impl.jar&lt;br /&gt;        &amp;lt;/taglib-location&gt;&lt;br /&gt;    &amp;lt;/taglib&gt;&lt;br /&gt;    &amp;lt;taglib&gt;&lt;br /&gt;        &amp;lt;taglib-uri&gt;&lt;br /&gt;            http://xmlns.oracle.com/adf/faces&lt;br /&gt;        &amp;lt;/taglib-uri&gt;&lt;br /&gt;        &amp;lt;taglib-location&gt;&lt;br /&gt;            /WEB-INF/lib/adf-faces-impl.jar&lt;br /&gt;        &amp;lt;/taglib-location&gt;&lt;br /&gt;    &amp;lt;/taglib&gt;&lt;br /&gt;    &amp;lt;taglib&gt;&lt;br /&gt;        &amp;lt;taglib-uri&gt;&lt;br /&gt;            http://xmlns.oracle.com/adf/faces/html&lt;br /&gt;        &amp;lt;/taglib-uri&gt;&lt;br /&gt;        &amp;lt;taglib-location&gt;&lt;br /&gt;            /WEB-INF/lib/adf-faces-impl.jar&lt;br /&gt;        &amp;lt;/taglib-location&gt;&lt;br /&gt;    &amp;lt;/taglib&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now that was confusing... Removing that piece of code helped. But how did it appear here? JDev only knows...&lt;br /&gt;&lt;br /&gt;One OT to mention here: the code you see above was escaped (to be displayed properly by Blogger) using a very simple and effective tool I've come across recently. Check out Dietmar Aust's &lt;a href="http://daust.blogspot.com/2007/03/small-tool-to-escape-html-text-for.html"&gt;blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8157348752580167254-1445014788832522789?l=januszmarchewa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/1445014788832522789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8157348752580167254&amp;postID=1445014788832522789' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/1445014788832522789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/1445014788832522789'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/2007/05/is-not-registered-tag-in-that-namespace.html' title='... is not a registered tag in that namespace?'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8157348752580167254.post-2225103046510802332</id><published>2007-05-11T17:14:00.000+02:00</published><updated>2007-05-15T22:25:14.335+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adf'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Extending ADF's FacesPageLifecycle</title><content type='html'>Recently I've encountered strange exceptions while testing my application. I pressed the &lt;span style="font-style:italic;"&gt;Submit&lt;/span&gt; button and sometimes everything was fine, while at times the action bound to the button was not invoked, but errors were reported:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;JBO-29000: null&lt;br /&gt;java.lang.NullPointerException&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Unfortunately, there was no trace of this exception and I didn't even know where should I look for it. Then I came up with and idea: let's decorate the process of displaying errors and find out more about this exception. To achieve this, I had to extend ADF's &lt;span style="font-style:italic;"&gt;FacesPageLifecycle&lt;/span&gt;:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;package januszm.adf.util;&lt;br /&gt;&lt;br /&gt;import javax.faces.context.FacesContext;&lt;br /&gt;&lt;br /&gt;import oracle.adf.controller.faces.lifecycle.FacesPageLifecycle;&lt;br /&gt;&lt;br /&gt;import oracle.binding.AttributeBinding;&lt;br /&gt;&lt;br /&gt;public class MyPageLifecycle extends FacesPageLifecycle {&lt;br /&gt;    protected void addMessage(FacesContext context, AttributeBinding binding,&lt;br /&gt;                              Throwable error) {&lt;br /&gt;        super.addMessage( context, binding, error );&lt;br /&gt;        // the easiest thing we can do here&lt;br /&gt;        error.printStackTrace();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Another question is: how can we tell ADF to use our lifecycle? That's easy too - we extend &lt;span style="font-style:italic;"&gt;ADFPhaseListener&lt;/span&gt;:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;package januszm.adf.util;&lt;br /&gt;&lt;br /&gt;import oracle.adf.controller.faces.lifecycle.ADFPhaseListener;&lt;br /&gt;import oracle.adf.controller.v2.lifecycle.PageLifecycle;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class MyPhaseListener extends ADFPhaseListener {&lt;br /&gt;    protected PageLifecycle createPageLifecycle() {&lt;br /&gt;        return new MyPageLifecycle();   &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Finally, we need to substitute the original ADFPhaseListener with our class in &lt;span style="font-style:italic;"&gt;faces-config.xml&lt;/span&gt;:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;  &amp;lt;lifecycle&amp;gt;&lt;br /&gt;    &amp;lt;phase-listener&amp;gt;januszm.adf.util.MyPhaseListener&amp;lt;/phase-listener&amp;gt;&lt;br /&gt;  &amp;lt;/lifecycle&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That allowed me to locate the problem - the exception was thrown in the line containing:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;this.someField.toString()&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;because sometimes the field wasn't set... &lt;br /&gt;&lt;br /&gt;The conclusion is simple - &lt;span style="font-weight:bold;"&gt;if a library throws a weird exception, don't blame the library, but check YOUR code first&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8157348752580167254-2225103046510802332?l=januszmarchewa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/2225103046510802332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8157348752580167254&amp;postID=2225103046510802332' title='86 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/2225103046510802332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/2225103046510802332'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/2007/05/extending-adfs-facespagelifecycle.html' title='Extending ADF&apos;s FacesPageLifecycle'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>86</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8157348752580167254.post-8998802926060309466</id><published>2007-05-08T09:41:00.000+02:00</published><updated>2007-05-16T07:56:44.757+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jdeveloper'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>JDeveloper 11g Tech Preview is out!</title><content type='html'>Check out Shay Shmeltzer's blog for details: &lt;a href="http://blogs.oracle.com/shay/2007/05/07#a365"&gt;http://blogs.oracle.com/shay/2007/05/07#a365&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8157348752580167254-8998802926060309466?l=januszmarchewa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/8998802926060309466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8157348752580167254&amp;postID=8998802926060309466' title='142 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/8998802926060309466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/8998802926060309466'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/2007/05/jdeveloper-11g-tech-preview-is-out.html' title='JDeveloper 11g Tech Preview is out!'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>142</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8157348752580167254.post-7565275366226155436</id><published>2007-05-05T21:25:00.000+02:00</published><updated>2007-05-15T22:26:07.499+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adf'/><category scheme='http://www.blogger.com/atom/ns#' term='validation'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Checking if passwords are equal in ADF</title><content type='html'>After spending some time trying to get Tomahawk's &lt;a style="font-style: italic;" href="http://myfaces.apache.org/tomahawk/validateEqual.html"&gt;validateEqual&lt;/a&gt; working in ADF Faces (works perfectly in JSF, though) I've decided to implement a custom validation method. The second &lt;span style="font-style: italic;"&gt;af:inputText&lt;/span&gt; wasn't connected to any ADF binding and this turned out to be the main troublemaker  of the day. With the help of the &lt;a href="http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtAnchor.sthref1417/vtTopicFile.adfdevguide%7Cweb_val%7Ehtm/"&gt;Dev Guide&lt;/a&gt; validation started working quickly, but I've encountered a bunch of annoying little problems...&lt;br /&gt;&lt;br /&gt;1. The error message would not display as expected. I expected something like "Repeat password - Passwords are not equal", but all I got was "com.sun.faces.el.ValueBindingImpl@9af3ee - Passwords are not equal". Fortunately, a quick forum search saved me this time (namely &lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1736396"&gt;this thread&lt;/a&gt; and &lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1564912"&gt;this one&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;2. Both &lt;span style="font-style: italic;"&gt;af:inputText&lt;/span&gt; components did not behave as expected after validation failure. JSF &lt;span style="font-style: italic;"&gt;h:inputSecret&lt;/span&gt; has a &lt;span style="font-style: italic;"&gt;redisplay&lt;/span&gt; attribute, but I didn't notice anything similar for &lt;span style="font-style: italic;"&gt;af:inputText&lt;/span&gt;. When &lt;span style="font-style: italic;"&gt;secret&lt;/span&gt; was set to &lt;span style="font-style: italic;"&gt;true&lt;/span&gt;, something weird happened - after each validation failure the value of both components was initially set to &lt;span style="font-style: italic;"&gt;******&lt;/span&gt;, but it disappeared after pressing a key inside the component. After digging for a while I still don't know why the initial value is set to six stars, but I found the function that removes them:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;function _clearPassword(a0,a1)&lt;br /&gt;{&lt;br /&gt;if(window.event!=(void 0))&lt;br /&gt;a1=window.event;&lt;br /&gt;if(a0.value!="******")&lt;br /&gt;return true;&lt;br /&gt;if((a1.keyCode==8)||&lt;br /&gt;((a1.keyCode&gt;=46)&amp;&amp;(a1.keyCode&lt;112)))&lt;br /&gt;a0.value="";&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now that's interesting... Anyway, I tried to get rid of those stars for a long time. The first component that was bound to the password attribute was easier, because binding the component to the backing bean that performs validation and setting the value to &lt;span style="font-style: italic;"&gt;null&lt;/span&gt; did the trick.&lt;br /&gt;&lt;br /&gt;The second component kept setting its value to &lt;span style="font-style: italic;"&gt;******&lt;/span&gt; despite setting it to &lt;span style="font-style: italic;"&gt;null&lt;/span&gt; in the backing bean. After many unsuccessful attempts I removed those stars with a small JavaScript workaround inside the &lt;span style="font-style:italic;"&gt;afh:body&lt;/span&gt; tag:&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;onload="_getElementById(document, 'repeatedUserPassword').value = '';"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8157348752580167254-7565275366226155436?l=januszmarchewa.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://januszmarchewa.blogspot.com/feeds/7565275366226155436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8157348752580167254&amp;postID=7565275366226155436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/7565275366226155436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8157348752580167254/posts/default/7565275366226155436'/><link rel='alternate' type='text/html' href='http://januszmarchewa.blogspot.com/2007/05/checking-if-passwords-are-equal-in-adf.html' title='Checking if passwords are equal in ADF'/><author><name>Janusz Marchewa</name><uri>http://www.blogger.com/profile/18020831963977487522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
