<?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: ADF 11g Rich Faces: focus on field after button press or PPR &#8211; Including JavaScript in PPR response and ClientListeners (Client Side programming in ADF Faces Rich Client Components Part 2)</title>
	<atom:link href="http://technology.amis.nl/blog/2771/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2/feed" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/blog/2771/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2</link>
	<description>Weblog for the AMIS Technology corner</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:47:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bhargav</title>
		<link>http://technology.amis.nl/blog/2771/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2/comment-page-1#comment-480776</link>
		<dc:creator>Bhargav</dc:creator>
		<pubDate>Fri, 29 Jul 2011 15:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=2771#comment-480776</guid>
		<description>Hi,

I used code @ &lt;a href=&quot;http://manieshsailoz.blogspot.com/2010/04/how-to-set-focus-using-javascript-and.html&quot; rel=&quot;nofollow&quot;&gt;http://manieshsailoz.blogspot.com/2010/04/how-to-set-focus-using-javascript-and.html&lt;/a&gt; for setting focus on a component after tab out &amp; it works fine.

In my second usecase I have around 20 inputText field &amp; one single valuechangelistener for all. In this listener based on certain condition I want to throw exception &amp; after exception want to highlight the field which caused the exception. What I observe using above code is the focus is moved to next component as I tab out. If I don&#039;t throw the exception then the setFocus is working fine. Its only after throwing exception the focus is not set correctly.

Any suggestions ?

Thanks,
Bhargav</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I used code @ <a href="http://manieshsailoz.blogspot.com/2010/04/how-to-set-focus-using-javascript-and.html" rel="nofollow">http://manieshsailoz.blogspot.com/2010/04/how-to-set-focus-using-javascript-and.html</a> for setting focus on a component after tab out &amp; it works fine.</p>
<p>In my second usecase I have around 20 inputText field &amp; one single valuechangelistener for all. In this listener based on certain condition I want to throw exception &amp; after exception want to highlight the field which caused the exception. What I observe using above code is the focus is moved to next component as I tab out. If I don&#8217;t throw the exception then the setFocus is working fine. Its only after throwing exception the focus is not set correctly.</p>
<p>Any suggestions ?</p>
<p>Thanks,<br />
Bhargav</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: venusa</title>
		<link>http://technology.amis.nl/blog/2771/adf-11g-rich-faces-focus-on-field-after-button-press-or-ppr-including-javascript-in-ppr-response-and-clientlisteners-client-side-programming-in-adf-faces-rich-client-components-part-2/comment-page-1#comment-451094</link>
		<dc:creator>venusa</dc:creator>
		<pubDate>Thu, 03 Mar 2011 20:14:26 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=2771#comment-451094</guid>
		<description>The method:
public void commandButton1(ActionEvent actionEvent) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ExtendedRenderKitService service =
        (ExtendedRenderKitService)Service.getRenderKitService(facesContext,
        ExtendedRenderKitService.class);
        UIComponent ip = facesContext.getViewRoot().findComponent(&quot;inputText2&quot;);
        String clientId = ip.getClientId(facesContext);
        service.addScript(facesContext,
                          &quot;setFocusId(&#039;&quot;+clientId+&quot;::content&#039;);&quot;);
    }
work ok.
Thank.
</description>
		<content:encoded><![CDATA[<p>The method:<br />
public void commandButton1(ActionEvent actionEvent) {<br />
        FacesContext facesContext = FacesContext.getCurrentInstance();<br />
        ExtendedRenderKitService service =<br />
        (ExtendedRenderKitService)Service.getRenderKitService(facesContext,<br />
        ExtendedRenderKitService.class);<br />
        UIComponent ip = facesContext.getViewRoot().findComponent(&#8220;inputText2&#8243;);<br />
        String clientId = ip.getClientId(facesContext);<br />
        service.addScript(facesContext,<br />
                          &#8220;setFocusId(&#8216;&#8221;+clientId+&#8221;::content&#8217;);&#8221;);<br />
    }<br />
work ok.<br />
Thank.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

