<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pakzilla &#187; JSF</title>
	<atom:link href="http://www.pakzilla.com/tag/jsf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pakzilla.com</link>
	<description>A blog on Programming, Web and Technology</description>
	<lastBuildDate>Sat, 04 Feb 2012 22:25:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Popular Web Frameworks</title>
		<link>http://www.pakzilla.com/2007/09/07/popular-web-frameworks/</link>
		<comments>http://www.pakzilla.com/2007/09/07/popular-web-frameworks/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 02:33:17 +0000</pubDate>
		<dc:creator>Tahir Akram</dc:creator>
				<category><![CDATA[JavaServer Faces]]></category>
		<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://itoday.wordpress.com/2007/09/07/fastest-growing-web-framework/</guid>
		<description><![CDATA[A post was made on Javalobby in the response of Rick Hightower observation on fastest growing frameworks. According to graph it is clear that there are more jobs of JSF and its demand is increasing as compared to other web frameworks. Luckily I got chance to work on JSF in my previous job, and I [...]
Related posts:<ol>
<li><a href='http://www.pakzilla.com/2007/07/25/the-open-source-frameworks-i-use/' rel='bookmark' title='The Open Source Frameworks I use'>The Open Source Frameworks I use</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.javalobby.org/java/forums/t101110.html">post</a> was made on Javalobby in the response of <a href="http://www.jroller.com/RickHigh/date/20070904">Rick Hightower</a> observation on fastest growing frameworks. According to graph it is clear that there are more jobs of <a class="answerlink" href="http://www.answers.com/topic/javaserver-faces?nafid=22">JSF</a> and its demand is increasing as compared to other web frameworks.</p>
<p>Luckily I got chance to work on JSF in my previous job, and I really enjoy the work of JSF blended with some controls of Tomahawk. The framework is great to work.</p>
<p><img class="alignnone size-full wp-image-199" title="jobgraph" src="http://www.pakzilla.com/wp-content/upload/jobgraph.png" alt="jobgraph" width="540" height="300" /></p>
<p>And let me tell you, in <a class="answerlink" href="http://www.answers.com/topic/pakistan?nafid=22">Pakistan</a> there are a lot of jobs that require skills in JSF. In my current job I am working on Struts, and I really missing JSF very much.Because in JSF things are very automated, clear and easy to configure rather in Struts. JSF is developed for <span class="answerlink">RAD</span>, and if you are creating a new application prefer JSF because JSF is built with integration and extensibility in mind. Strategically, JSF should be the target of new applications.I cant say anything about Rubby, Spring and Tapestry because I did not work in them. But I will surely express my experience if I got chance to dirty my hands on later said frameworks.</p>
<p>Related posts:<ol>
<li><a href='http://www.pakzilla.com/2007/07/25/the-open-source-frameworks-i-use/' rel='bookmark' title='The Open Source Frameworks I use'>The Open Source Frameworks I use</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.pakzilla.com/2007/09/07/popular-web-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing a selected row from h:dataTable</title>
		<link>http://www.pakzilla.com/2007/04/08/accessing-a-selected-row-from-hdatatable/</link>
		<comments>http://www.pakzilla.com/2007/04/08/accessing-a-selected-row-from-hdatatable/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 06:45:27 +0000</pubDate>
		<dc:creator>Tahir Akram</dc:creator>
				<category><![CDATA[JavaServer Faces]]></category>
		<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://itoday.wordpress.com/2007/04/08/accessing-a-selected-row-from-hdatatable/</guid>
		<description><![CDATA[Javascript to Select One Radio Button JSF Code of h:dataTable Table on JSP Page We will use valueChangeListener for this, as when user check the radio button we will get the binded value of bean. It is one column. NOTE: Please remove all spaces after : sign. In f and h tags. Page Bean Code [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p><strong>Javascript to Select One Radio Button</strong></p>
<pre class="brush: jscript; title: ; notranslate">

function selectOne(form, button) {
turnOffRadioForForm(form);
button.checked = true;
}
function turnOffRadioForForm(form) {
for (var i = 0; i &lt; form.elements.length; i++) {
form.elements[i].checked = false;
}
}
</pre>
<p><strong>JSF Code of h:dataTable Table on JSP Page</strong><br />
We will use valueChangeListener for this, as when user check the radio button we will get the binded value of bean. It is one column. NOTE: Please remove all spaces after : sign. In f and h tags.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;h:column&gt;
&lt;f:facet name=”header”&gt;
&lt;f:verbatim&gt;Select&lt;/f:verbatim&gt;
&lt;/f:facet&gt;
&lt;h:selectOneRadio id=&quot;selectRadio&quot; value=&quot;#{depositMoneyPageBean.creditCardDataBean.cardId}&quot;
valueChangeListener=&quot;#{depositMoneyPageBean.handleRadioValueChange}&quot;
onclick=&quot;selectOne(this.form , this)&quot; &gt;
&lt;f:selectItem itemValue=&quot;#{creditCardData.cardId}&quot; itemLabel=&quot; &quot; /&gt;
&lt;/h:selectOneRadio&gt;
&lt;/h:column&gt;
</pre>
<p><strong>Page Bean Code</strong></p>
<p>This is the page bean code, and here is the valueChangeListener method.</p>
<pre class="brush: java; title: ; notranslate">public void handleRadioValueChange(ValueChangeEvent valueChangedEvent){
try	{
// here we got the selected row of dataTable
this.creditCardDataBean = (CreditCardDataBean)getTable1().getRowData();
selectedCardId = creditCardDataBean.getCardId();
}catch (Exception e){
e.printStackTrace();
}
}
public HtmlDataTable getTable1(){
if (table1 == null) {
table1 = (HtmlDataTable) findComponentInRoot(&amp;quot;table1&amp;quot;);
}
return table1;
}

public static UIComponent findComponentInRoot(String id) {
UIComponent ret = null;
FacesContext context = FacesContext.getCurrentInstance();
if (context != null) {
UIComponent root = context.getViewRoot();
ret = findComponent(root, id);
}
return ret;
}

public static UIComponent findComponent(UIComponent base, String id) {

// Is the &amp;quot;base&amp;quot; component itself the match we are looking for?
if (id.equals(base.getId())) {
return base;
}

// Search through our facets and children
UIComponent kid = null;
UIComponent result = null;
Iterator kids = base.getFacetsAndChildren();
while (kids.hasNext() &amp;amp;amp;&amp;amp;amp; (result == null)) {
kid = (UIComponent) kids.next();
if (id.equals(kid.getId())) {
result = kid;
break;
}
result = findComponent(kid, id);
if (result != null) {
break;
}
}
return result;
}</pre>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.pakzilla.com/2007/04/08/accessing-a-selected-row-from-hdatatable/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting and setting Managed Bean objects in JSF</title>
		<link>http://www.pakzilla.com/2007/04/08/getting-and-setting-managed-bean-session-scoped-objects-in-jsf/</link>
		<comments>http://www.pakzilla.com/2007/04/08/getting-and-setting-managed-bean-session-scoped-objects-in-jsf/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 06:41:57 +0000</pubDate>
		<dc:creator>Tahir Akram</dc:creator>
				<category><![CDATA[JavaServer Faces]]></category>
		<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://itoday.wordpress.com/2007/04/08/getting-and-setting-managed-bean-session-scoped-objects-in-jsf/</guid>
		<description><![CDATA[Get appplication from FacesContext FacesContext ctx = FacesContext.getCurrentInstance(); Application app = ctx.getApplication(); Setting in Managed Bean Object app.createValueBinding("#appSessionBean.userDataBean}").setValue(ctx, userDataBean); Getting Managed Bean Object(s) AppSessionBean appSessionBean = (AppSessionBean)app.createValueBinding("#{appSessionBean}").getValue(ctx); userDataBean = (UserDataBean)appSessionBean.getUserDataBean(); where userDataBean is object in ApplicationSessionBean class and this said class is in faces-config with session scope. Related posts: Getting HTTP Session in JSF Getting [...]
Related posts:<ol>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-http-session-in-jsf/' rel='bookmark' title='Getting HTTP Session in JSF'>Getting HTTP Session in JSF</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-request-parameters-from-a-jsf-page/' rel='bookmark' title='Getting request parameters in JSF'>Getting request parameters in JSF</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/faces-console-a-utility-for-jsf-configurations/' rel='bookmark' title='Faces Console: A utility for JSF configurations'>Faces Console: A utility for JSF configurations</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>Get appplication from FacesContext</strong></p>
<pre lang="java">FacesContext ctx = FacesContext.getCurrentInstance();
Application app = ctx.getApplication();</pre>
<p><strong>Setting in Managed Bean Object</strong></p>
<pre lang="java">app.createValueBinding("#appSessionBean.userDataBean}").setValue(ctx, userDataBean);</pre>
<p><strong>Getting Managed Bean Object(s)</strong></p>
<pre lang="java">AppSessionBean appSessionBean = (AppSessionBean)app.createValueBinding("#{appSessionBean}").getValue(ctx);
userDataBean = (UserDataBean)appSessionBean.getUserDataBean();</pre>
<p>where userDataBean is object in ApplicationSessionBean class and this said class is in faces-config with session scope.</p>
<p>Related posts:<ol>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-http-session-in-jsf/' rel='bookmark' title='Getting HTTP Session in JSF'>Getting HTTP Session in JSF</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-request-parameters-from-a-jsf-page/' rel='bookmark' title='Getting request parameters in JSF'>Getting request parameters in JSF</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/faces-console-a-utility-for-jsf-configurations/' rel='bookmark' title='Faces Console: A utility for JSF configurations'>Faces Console: A utility for JSF configurations</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.pakzilla.com/2007/04/08/getting-and-setting-managed-bean-session-scoped-objects-in-jsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting HTTP Session in JSF</title>
		<link>http://www.pakzilla.com/2007/04/08/getting-http-session-in-jsf/</link>
		<comments>http://www.pakzilla.com/2007/04/08/getting-http-session-in-jsf/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 06:39:36 +0000</pubDate>
		<dc:creator>Tahir Akram</dc:creator>
				<category><![CDATA[JavaServer Faces]]></category>
		<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://itoday.wordpress.com/2007/04/08/getting-http-session-in-jsf/</guid>
		<description><![CDATA[Related posts: How to use and retain Twitter4J OAuth access token Getting request parameters in JSF Accessing a selected row from h:dataTable
Related posts:<ol>
<li><a href='http://www.pakzilla.com/2010/03/01/how-to-use-and-retain-twitter4j-oauth-access-token/' rel='bookmark' title='How to use and retain Twitter4J OAuth access token'>How to use and retain Twitter4J OAuth access token</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-request-parameters-from-a-jsf-page/' rel='bookmark' title='Getting request parameters in JSF'>Getting request parameters in JSF</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/accessing-a-selected-row-from-hdatatable/' rel='bookmark' title='Accessing a selected row from h:dataTable'>Accessing a selected row from h:dataTable</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<pre class="brush: java; title: ; notranslate">
import javax.faces.context.FacesContext;

public void addInSession() {
MySession mySession = new MySession();
mySession.setName(getMsg());

/* .getSession(boolean), true if we want to create new session, if want touse oldsession then false*/
FacesContext context = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession) context.getExternalContext().getSession(false);
session.setAttribute(&amp;quot;sessionObj&amp;quot;, mySession);

if (session.getAttribute(&amp;quot;sessionObj&amp;quot;) != null) {
MySession mySavedSession = (MySession) session.getAttribute(&amp;quot;sessionObj&amp;quot;);
System.out.println(&amp;quot;HTTP Session: &amp;quot; + mySavedSession.getName());
} else {
// do something
}
}
</pre>
<p>Related posts:<ol>
<li><a href='http://www.pakzilla.com/2010/03/01/how-to-use-and-retain-twitter4j-oauth-access-token/' rel='bookmark' title='How to use and retain Twitter4J OAuth access token'>How to use and retain Twitter4J OAuth access token</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-request-parameters-from-a-jsf-page/' rel='bookmark' title='Getting request parameters in JSF'>Getting request parameters in JSF</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/accessing-a-selected-row-from-hdatatable/' rel='bookmark' title='Accessing a selected row from h:dataTable'>Accessing a selected row from h:dataTable</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.pakzilla.com/2007/04/08/getting-http-session-in-jsf/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting request parameters in JSF</title>
		<link>http://www.pakzilla.com/2007/04/08/getting-request-parameters-from-a-jsf-page/</link>
		<comments>http://www.pakzilla.com/2007/04/08/getting-request-parameters-from-a-jsf-page/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 06:37:23 +0000</pubDate>
		<dc:creator>Tahir Akram</dc:creator>
				<category><![CDATA[JavaServer Faces]]></category>
		<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://itoday.wordpress.com/2007/04/08/getting-request-parameters-from-a-jsf-page/</guid>
		<description><![CDATA[Here is the way, how we get request parameters from a JSP page (which is JSF enabled) in a HTTP request object. Where formName is refer to the id of your form and controlId is referred to the id of your control. Related posts: Getting HTTP Session in JSF How to use and retain Twitter4J [...]
Related posts:<ol>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-http-session-in-jsf/' rel='bookmark' title='Getting HTTP Session in JSF'>Getting HTTP Session in JSF</a></li>
<li><a href='http://www.pakzilla.com/2010/03/01/how-to-use-and-retain-twitter4j-oauth-access-token/' rel='bookmark' title='How to use and retain Twitter4J OAuth access token'>How to use and retain Twitter4J OAuth access token</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/accessing-a-selected-row-from-hdatatable/' rel='bookmark' title='Accessing a selected row from h:dataTable'>Accessing a selected row from h:dataTable</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here is the way, how we get request parameters from a JSP page (which is JSF enabled) in a HTTP request object.</p>
<pre class="brush: java; title: ; notranslate">import javax.faces.context.FacesContext;
//…your code
HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
String controlName = request.getParameter(&amp;quot;formId:controlId&amp;quot;);</pre>
<p>Where formName is refer to the id of your form and controlId is referred to the id of your control.</p>
<p>Related posts:<ol>
<li><a href='http://www.pakzilla.com/2007/04/08/getting-http-session-in-jsf/' rel='bookmark' title='Getting HTTP Session in JSF'>Getting HTTP Session in JSF</a></li>
<li><a href='http://www.pakzilla.com/2010/03/01/how-to-use-and-retain-twitter4j-oauth-access-token/' rel='bookmark' title='How to use and retain Twitter4J OAuth access token'>How to use and retain Twitter4J OAuth access token</a></li>
<li><a href='http://www.pakzilla.com/2007/04/08/accessing-a-selected-row-from-hdatatable/' rel='bookmark' title='Accessing a selected row from h:dataTable'>Accessing a selected row from h:dataTable</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.pakzilla.com/2007/04/08/getting-request-parameters-from-a-jsf-page/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Faces Console: A utility for JSF configurations</title>
		<link>http://www.pakzilla.com/2007/04/08/faces-console-a-utility-for-jsf-configurations/</link>
		<comments>http://www.pakzilla.com/2007/04/08/faces-console-a-utility-for-jsf-configurations/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 06:32:31 +0000</pubDate>
		<dc:creator>Tahir Akram</dc:creator>
				<category><![CDATA[JavaServer Faces]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://itoday.wordpress.com/2007/04/08/faces-console-a-utility-for-jsf-configurations/</guid>
		<description><![CDATA[Faces Console is a free utility get integrated in many IDEs as plugin and provide JSF (faces-config.xml) configuration facility in a GUI. if you are using NetBeans5.0 or Eclipse3.x you must try it. http://www.jamesholmes.com/JavaServerFaces/console/ No related posts.
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Faces Console is a free utility get integrated in many IDEs as plugin and provide JSF (faces-config.xml)  configuration facility in a GUI. if you are using NetBeans5.0 or Eclipse3.x you must try it.</p>
<p><a href="http://www.jamesholmes.com/JavaServerFaces/console/">http://www.jamesholmes.com/JavaServerFaces/console/</a></p>
<p><a title="faces-console.gif" href="http://www.pakzilla.com/wp-content/upload/faces-console.gif"><img class="aligncenter size-full wp-image-393" title="faces-console" src="http://www.pakzilla.com/wp-content/upload/faces-console.gif" alt="faces-console" width="584" height="438" /><br />
</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.pakzilla.com/2007/04/08/faces-console-a-utility-for-jsf-configurations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

