<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: Un-Documented JSF: Reference</title> <atom:link href="http://ocpsoft.com/java/undocumented-jsf/feed/" rel="self" type="application/rss+xml" /><link>http://ocpsoft.com/java/undocumented-jsf/</link> <description>&#34;Simple Software&#34;</description> <lastBuildDate>Mon, 26 Jul 2010 23:17:02 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <item><title>By: Peter Mularien</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-632</link> <dc:creator>Peter Mularien</dc:creator> <pubDate>Fri, 15 May 2009 17:20:46 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-632</guid> <description>After having implemented a pretty major JSF 1.x project about 6 months ago, I had a laundry list of issues that we ran into and ultimately surmounted. Some of the highlights:- h:commandButton does not support onclick in certain versions of JSF (1.0 at least)
- Many issues with nested h:dataTables containing h:commandButton or h:commandLink
- Issues binding the rendered attribute to an expression that involves request-scoped data. Important to note with binding expressions on the rendered attribute is that if a component is not rendered, it is not part of the tree at the time actions are evaluated. We ran into a number of strange cases with h:commandLink or commandButtons nested inside dynamically rendered components. If the parent component didn&#039;t evaluate to rendered=&quot;true&quot; at the time the &quot;Invoke Application&quot; phase occurred, the action wouldn&#039;t fire.
- Many, many cases where native JSF logging is insufficient to describe what is actually going on when something doesn&#039;t work as expected. This includes: commands not firing, validation not working, validation failures (with, in some cases, nothing going into FacesMessage), many many many NullPointerExceptions (or other exceptions) from the JSF code when incorrect value expressions are provided.
- Errors in the faces-config file will not always be caught or reported in meaningful ways. We ran into many cases where missing brackets or simple typos would result in meaningless exceptions.
- Obviously, the usual issues around use of arbitrary HTML in JSF 1.x applications.That said, the application was very complex, and once we worked our way around some of the weird issues of JSF, some of the component magic was actually very helpful.I think one of the big issues that developers have with JSF is that understanding the request and component lifecycle (and its bugs and quirks in implementation) can be very difficult to wrap your head around.</description> <content:encoded><![CDATA[<p>After having implemented a pretty major JSF 1.x project about 6 months ago, I had a laundry list of issues that we ran into and ultimately surmounted. Some of the highlights:</p><p>- h:commandButton does not support onclick in certain versions of JSF (1.0 at least)<br
/> - Many issues with nested h:dataTables containing h:commandButton or h:commandLink<br
/> - Issues binding the rendered attribute to an expression that involves request-scoped data. Important to note with binding expressions on the rendered attribute is that if a component is not rendered, it is not part of the tree at the time actions are evaluated. We ran into a number of strange cases with h:commandLink or commandButtons nested inside dynamically rendered components. If the parent component didn&#8217;t evaluate to rendered=&#8221;true&#8221; at the time the &#8220;Invoke Application&#8221; phase occurred, the action wouldn&#8217;t fire.<br
/> - Many, many cases where native JSF logging is insufficient to describe what is actually going on when something doesn&#8217;t work as expected. This includes: commands not firing, validation not working, validation failures (with, in some cases, nothing going into FacesMessage), many many many NullPointerExceptions (or other exceptions) from the JSF code when incorrect value expressions are provided.<br
/> - Errors in the faces-config file will not always be caught or reported in meaningful ways. We ran into many cases where missing brackets or simple typos would result in meaningless exceptions.<br
/> - Obviously, the usual issues around use of arbitrary HTML in JSF 1.x applications.</p><p>That said, the application was very complex, and once we worked our way around some of the weird issues of JSF, some of the component magic was actually very helpful.</p><p>I think one of the big issues that developers have with JSF is that understanding the request and component lifecycle (and its bugs and quirks in implementation) can be very difficult to wrap your head around.</p> ]]></content:encoded> </item> <item><title>By: eustache</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-481</link> <dc:creator>eustache</dc:creator> <pubDate>Fri, 08 May 2009 07:18:06 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-481</guid> <description>Thanks Lincoln. I&#039;ve even kept all the beans to request scope.... Still the same</description> <content:encoded><![CDATA[<p>Thanks Lincoln. I&#8217;ve even kept all the beans to request scope&#8230;. Still the same</p> ]]></content:encoded> </item> <item><title>By: Lincoln</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-429</link> <dc:creator>Lincoln</dc:creator> <pubDate>Wed, 06 May 2009 18:23:13 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-429</guid> <description>It sounds like you have some bean-scoping issues.Beans should be request-scoped by default, and changed to session scoped only if you want to share data between requests.If you have an application-scoped bean, data stored in that bean will be shared between ALL users.</description> <content:encoded><![CDATA[<p>It sounds like you have some bean-scoping issues.</p><p>Beans should be request-scoped by default, and changed to session scoped only if you want to share data between requests.</p><p>If you have an application-scoped bean, data stored in that bean will be shared between ALL users.</p> ]]></content:encoded> </item> <item><title>By: eustache</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-274</link> <dc:creator>eustache</dc:creator> <pubDate>Tue, 28 Apr 2009 15:49:38 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-274</guid> <description>Hi, I&#039;m quite new to J2EE/JSF. I&#039;m writing an application using JSF/MyFaces and Richfaces technologies. The application is running well. However, i&#039;ve noticed a wierd behavior I can&#039;t solve. In the application, when a user successfully connects, he gets access to some features of the application related to his role; read from a database.
The problem:
When a user X connects from a given browser, his profile gets updated/modifier if another user connect Y connects from another workstation. The session for user X is replaced by the last connected user Y, without even a re-login. Any help will much be appreciated, as I&#039;ve failed to troubleshoot. I&#039;m using IBM Websphere Application Server community edition (WASCE)
Regards</description> <content:encoded><![CDATA[<p>Hi, I&#8217;m quite new to J2EE/JSF. I&#8217;m writing an application using JSF/MyFaces and Richfaces technologies. The application is running well. However, i&#8217;ve noticed a wierd behavior I can&#8217;t solve. In the application, when a user successfully connects, he gets access to some features of the application related to his role; read from a database.<br
/> The problem:<br
/> When a user X connects from a given browser, his profile gets updated/modifier if another user connect Y connects from another workstation. The session for user X is replaced by the last connected user Y, without even a re-login. Any help will much be appreciated, as I&#8217;ve failed to troubleshoot. I&#8217;m using IBM Websphere Application Server community edition (WASCE)<br
/> Regards</p> ]]></content:encoded> </item> <item><title>By: Rafael Ponte</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-272</link> <dc:creator>Rafael Ponte</dc:creator> <pubDate>Tue, 28 Apr 2009 02:45:04 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-272</guid> <description>A lot of developers think it&#039;s impossible to use &lt;b&gt;h:commandLink&lt;/b&gt; or &lt;b&gt;h:commandButton&lt;/b&gt; components in &lt;b&gt;h:dataTable&lt;/b&gt; when the managed bean is on request-scope.That&#039;s not impossible if you ensure that EL evaluted on &lt;b&gt;h:dataTable&lt;/b&gt; from the managed bean on request-scope always will return the same value.</description> <content:encoded><![CDATA[<p>A lot of developers think it&#8217;s impossible to use &lt;b&gt;h:commandLink&lt;/b&gt; or &lt;b&gt;h:commandButton&lt;/b&gt; components in &lt;b&gt;h:dataTable&lt;/b&gt; when the managed bean is on request-scope.</p><p>That&#8217;s not impossible if you ensure that EL evaluted on &lt;b&gt;h:dataTable&lt;/b&gt; from the managed bean on request-scope always will return the same value.</p> ]]></content:encoded> </item> <item><title>By: Ingo Jobling</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-230</link> <dc:creator>Ingo Jobling</dc:creator> <pubDate>Mon, 09 Mar 2009 01:39:32 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-230</guid> <description>Validation is the Achilles heal of Java Server Faces.Form-level validations are a catch-22.  If you perform them in an action method, where it is convenient to compare values, the validation phase has already completed.From an action method, when validating values contained in a data table, it is virtually impossible to generate faces messages for a component (in a certain table row), and to set that component&#039;s invalid attribute.On the other hand, when performing form-level validations during the validation phase, it is difficult to obtain the values of the other components on the page.  Again, when dealing with a data table the problem is compounded.As another example, validations are not invoked if a field is empty.  This makes is extremely complicated to implement common validations  such as comparing two fields (e-mails, passwords).One last example: implementing validations for unique constraints.All of these difficulties are essentially undocumented, although, to be fair, &quot;Core Java Server Faces&quot; and &quot;JSF Complete Reference&quot;, do discuss them to some extent.</description> <content:encoded><![CDATA[<p>Validation is the Achilles heal of Java Server Faces.</p><p>Form-level validations are a catch-22.  If you perform them in an action method, where it is convenient to compare values, the validation phase has already completed.</p><p>From an action method, when validating values contained in a data table, it is virtually impossible to generate faces messages for a component (in a certain table row), and to set that component&#8217;s invalid attribute.</p><p>On the other hand, when performing form-level validations during the validation phase, it is difficult to obtain the values of the other components on the page.  Again, when dealing with a data table the problem is compounded.</p><p>As another example, validations are not invoked if a field is empty.  This makes is extremely complicated to implement common validations  such as comparing two fields (e-mails, passwords).</p><p>One last example: implementing validations for unique constraints.</p><p>All of these difficulties are essentially undocumented, although, to be fair, &#8220;Core Java Server Faces&#8221; and &#8220;JSF Complete Reference&#8221;, do discuss them to some extent.</p> ]]></content:encoded> </item> <item><title>By: jeff</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-214</link> <dc:creator>jeff</dc:creator> <pubDate>Thu, 26 Feb 2009 02:20:21 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-214</guid> <description>Customizing validation error messages should be clearer and better documented. Answer: Find them in javax/faces/Messages.properties in jsf-api.jar. Refer to your resources property with the following XML in your faces-config.xml:
&lt;code&gt;&lt;application&gt;
&lt;message-bundle&gt;com.ocpsoft.foo.overriddenMessages&lt;/message-bundle&gt;
&lt;/application&gt;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Customizing validation error messages should be clearer and better documented. Answer: Find them in javax/faces/Messages.properties in jsf-api.jar. Refer to your resources property with the following XML in your faces-config.xml:<br
/> <code>&lt;application&gt;<br
/> &lt;message-bundle&gt;com.ocpsoft.foo.overriddenMessages&lt;/message-bundle&gt;<br
/> &lt;/application&gt;</code></p> ]]></content:encoded> </item> <item><title>By: Anton</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-206</link> <dc:creator>Anton</dc:creator> <pubDate>Wed, 18 Feb 2009 08:49:03 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-206</guid> <description>If you are looking for  JSF component look on myFaces sandbox - it has such component</description> <content:encoded><![CDATA[<p>If you are looking for  JSF component look on myFaces sandbox &#8211; it has such component</p> ]]></content:encoded> </item> <item><title>By: Anton</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-205</link> <dc:creator>Anton</dc:creator> <pubDate>Wed, 18 Feb 2009 08:47:53 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-205</guid> <description>Using Guice with JSF 1.2public clas JSFBean{
@Inject
private transient Service service;@PostConstruct
void post(){
getInjector.inject(this);
}
}</description> <content:encoded><![CDATA[<p>Using Guice with JSF 1.2</p><p>public clas JSFBean{<br
/> @Inject<br
/> private transient Service service;</p><p> @PostConstruct<br
/> void post(){</p><p> getInjector.inject(this);<br
/> }<br
/> }</p> ]]></content:encoded> </item> <item><title>By: Fabien Mars</title><link>http://ocpsoft.com/java/undocumented-jsf/#comment-204</link> <dc:creator>Fabien Mars</dc:creator> <pubDate>Wed, 18 Feb 2009 01:53:40 +0000</pubDate> <guid
isPermaLink="false">http://ocpsoft.com/?p=42#comment-204</guid> <description>All action listeners which are childen of an ActionSource (commandButton, commandLink) will be trigerred AFTER the ActionSource&#039;s listener (since JSF1.2). I accept that fact, but I have to say 2 things:1) In my opinion the spec isn&#039;t clear enough about that. The javadoc is also misleading.2) f:setPropertyActionListener is (logically) also bound to that behavior and I believe its benefit is much reduced because o that. Take the typical usecase of deleting a row in a table using a button, you need to be able to manipulate the row in the actionListener behind the button. Maaaany people try and discover that they can&#039;t use setPropertyActionListener to set the row in a defined variable. It would be set too late, after the listener is called. Instead developers must use in their listener: ((UIData)actionEvent.getComponent()).getRowData() and cast the result again... &quot;Why do easy when you can to difficult?&quot; as some say.</description> <content:encoded><![CDATA[<p>All action listeners which are childen of an ActionSource (commandButton, commandLink) will be trigerred AFTER the ActionSource&#8217;s listener (since JSF1.2). I accept that fact, but I have to say 2 things:</p><p>1) In my opinion the spec isn&#8217;t clear enough about that. The javadoc is also misleading.</p><p>2) f:setPropertyActionListener is (logically) also bound to that behavior and I believe its benefit is much reduced because o that. Take the typical usecase of deleting a row in a table using a button, you need to be able to manipulate the row in the actionListener behind the button. Maaaany people try and discover that they can&#8217;t use setPropertyActionListener to set the row in a defined variable. It would be set too late, after the listener is called. Instead developers must use in their listener: ((UIData)actionEvent.getComponent()).getRowData() and cast the result again&#8230; &#8220;Why do easy when you can to difficult?&#8221; as some say.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: ocpsoft.com @ 2010-07-29 17:22:04 by W3 Total Cache -->