Manage this page

0. Feedback

1. Display

Books

JSF from Manning, 2005

ALl books on jsf

Java Links

jsf 1.0 apis

1. An introduction to the java logging api from O'Reilly

2. java forums from sun

142 api

142 api Cheat sheat

jstl 1.1 docs

Forums

at sun

ibm jsf forum

Articles

jstl 101

jstl 102

Tutorial

A 5 minute tutorial to JSF

Supporting docs

  1. Help on CSS
  2. JSF tutorials
  3. java script help
  4. Sample jsf tags
  5. last item

Satya - Friday, October 28, 2005 10:59:00 PM

home page

jsf home page

Satya - Friday, October 28, 2005 11:02:50 PM

sun tutorial

Refer to chapter 17 and 18

Satya - Friday, October 28, 2005 11:04:09 PM

What level of JSF can I run with jdk 1.4.x

With jdk 1.4 or websphere 5.x what is the latest jsf spec I can run?

Satya - Friday, October 28, 2005 11:05:21 PM

Can I use sun studio creator?

Can I create jsf with sun studio creator and run the resulting apps under websphere?

Satya - Friday, October 28, 2005 11:06:37 PM

See what websphere says about jsf?

Collect some jsf articles in reference to websphere. What release of jsf supports? What are their recommendations?

Satya - Friday, October 28, 2005 11:09:32 PM

Minimal requirements for jsf

servlets 2.3 and jsp 1.2

Satya - Friday, October 28, 2005 11:11:54 PM

Intro to jsf

Seem like a good introductory article

Satya - Saturday, October 29, 2005 12:01:17 AM

JSF 1.x reference page

Use this page for referencing jsf related tags

Satya - Saturday, October 29, 2005 12:13:42 AM

Is there a concept of a page object in JSF?

If a page is a collection of UI objects, is there a page class that I can write where the ui components are member variables. This will allow me to programmatically set the components.

Looks like the managed bean object is similar to a page object. It can define all the actions on that page. Nevertheless questions remain.

Can I have member properties that are directly tied to UI components so that I can change their appearnce? Or am I limited to mainly data bound to that UI component.

Satya - Saturday, October 29, 2005 12:15:21 AM

jsf 1.1 tag reference

JSF tag reference

The proficiency in JSF may be directly related to knowing its tags and what is possible with those tags. The good news is there seem to be only a limited set of tags.

Satya - Saturday, October 29, 2005 11:49:03 PM

Download page for JSF

try downloading 1.1 of jsf

Satya - Saturday, October 29, 2005 11:53:51 PM

A sample application sample code and an article

article at jsf site docs

Seem promising.

Satya - Sunday, October 30, 2005 10:55:46 AM

Downloading 1.1 jsf

You can go to the download page specified above and download the 1.1 jsf. It is about 11m. Comes with

docs
javadocs
lib
metadata
renderkitdocs
samples
tlddocs

The samples include

cardemo
components
guessnumber
nonjsp

Satya - Sunday, October 30, 2005 11:12:39 AM

Is there a concept of an onload for a page ...

Is there a concept of an unload for a page object? That would allow me to prime my ui components programmatically.

Satya - Sunday, October 30, 2005 11:17:21 AM

What is the life cycle of a page rendering?

As the page gets loaded through faces, when does the model object gets created? I am especially interested in things like can I gather data before entering the painting phase as typically done by controller servlets. Or the norm, like asp.net, is you do this in action events of that page, including the onload. In that sense is onload playing the following rules

1. validate fields
2. validate security
3. Gather page data

Satya - Sunday, October 30, 2005 11:27:01 AM

How do I invoke a jsf page ?

Looks like it is just invoking a regular jsp page. As the jsp is expanded if the tag is a jsf tag the relative acitions are accordingly performed.

It will be interesting to follow what happens when a jsf button is pressed! probably it is tied to an action. the action probably will return a hint where to go next. Or may be validate will get kicked off returing a hint where to go next. Or may be the navigation rules will play a part.

Satya - Monday, October 31, 2005 2:37:48 PM

IBMs life cycle article

Read the article

Satya - Thursday, November 03, 2005 10:49:08 AM

Other implementations of JSF

myfaces from apache
Smile - not sure what this is yet

Satya - Thursday, November 03, 2005 10:51:17 AM

Where do the jsf jar files go?

It is possible the jsf jar files could have gone to a system class path. But the Manning book seem to suggest that these will go into web-inf/lib directory along with the application jars and also the jstl jars

As per the Manning book, at the moment the RI implementaion does not support shared libraries. So they have to be in the web-inf/lib directory.

Satya - Thursday, November 03, 2005 10:53:31 AM

Required jsf jar files

jsf-api.jar
jsf-impl.jar
jstl.jar - jstl api
standard.jar - jstl implementation

Satya - Thursday, November 03, 2005 10:55:37 AM

Suns RI does not come with jstl jar files

You may hav to load them from somewhere else.

Satya - Thursday, November 10, 2005 5:30:41 PM

What are faces context parameters in the web.xml?

1. What are context paramters in web.xml?

2. What are the required context paramters for faces application

What are the following

state saving method
validate xml in the faces config xml file
verify objects

Satya - Friday, November 11, 2005 11:11:49 AM

Search for source code

Koders.com

Not sure how good it is though. I coudln't find the FacesServle.java from here

Satya - Friday, November 11, 2005 11:15:36 AM

Release notes of JSF

worthwhile reading release notes for any known issues

Satya - Friday, November 11, 2005 11:53:14 AM

Problem with FacesServlet.java 144 nullpointer exception

Read this thread

Problem code

try {
ApplicationFactory applicationFactory = (ApplicationFactory)
FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
144 application = applicationFactory.getApplication();
} catch (FacesException e) {
Throwable rootCause = e.getCause();
if (rootCause == null) {
throw e;
} else {
throw new ServletException(e.getMessage(), rootCause);
}
}

Satya - Friday, November 11, 2005 4:09:53 PM

You will need the following entry in web.xml

(listener)
    (listener-class)com.sun.faces.config.ConfigureListener(/listener-class)
(/listener)

Note. I have used braces for angular brackets for my convenience here. But you get the idea.

Satya - Friday, November 11, 2005 4:10:36 PM

What does com.sun.faces.config.ConfigureListener do?

Apparently there is some description in the release notes about what this does.

Satya - Friday, November 11, 2005 4:29:40 PM

What release of jstl does jsf use?

For jsf 1.1 use jstl 1.0

Satya - Saturday, November 12, 2005 2:12:34 PM

What are page templates in JSF?

What are page templates in JSF?

Satya - Saturday, November 12, 2005 2:13:05 PM

What are jsp fragments?

What are jsp fragments?

Satya - Tuesday, November 15, 2005 11:27:47 AM

jsf tags demonstrated

access the page

This is a quick templatized look up of html and equivalent jsf controls. quite useful

Satya - Tuesday, December 27, 2005 4:50:40 PM

Getting a session object from jsf facescontext

public class SWAppSession 
{
   static HttpSession getSession()
   {
      HttpSession session = 
         (HttpSession)FacesContext
            .getCurrentInstance()
               .getExternalContext()
                  .getSession(false);
      if (session == null)
      {
         throw new RuntimeException(
             "Sorry. Got a null session from facescontext");
      }
      return session;
   }
}

Satya - Thursday, December 29, 2005 1:52:40 PM

Why is the "value" attribute of a selectitem is an object and not a string?

Apparently jsf uses a configurable converter to translate between your object and a string to populate this "value" attribute. Specifically it doesn't use the java serialization to save that object and bring it back but only expected to serialize the keys.

Satya - Friday, December 30, 2005 9:43:54 AM

JSF recommends session scope for backing beans

1. JSF seem to recommend using session scope when ever there is a postback

2. script collector can indicate a postback

In your page you can include this at the top of the body

hx:scriptCollector id="scriptCollector1" 
preRender="#{pc_MyAgencies.onPageLoadBegin}" 
decode="#{pc_MyAgencies.onPagePost}"

In your java code behind

YourPageBehind.onPagePost()
{
     bPostBackDetected = true;

}

YourPageBehind.onPageLoad()
{
	if ( bPostBackDetected == true)
	{
		//postback detected
		//No need to load data
		return;
	}
	//case: Initial load
	loadData();
}

Satya - Friday, December 30, 2005 10:12:08 AM

There is a problem withe the above code

You have to reset the postback otherwise the session scope says it is a postback all the time

Satya - Friday, December 30, 2005 10:13:13 AM

Read this if you are planning on updating models based on valuechanged

updating a backing bean from value changed

Satya - Friday, December 30, 2005 3:46:50 PM

More on postback

more on post back using phase listeners

Satya - Friday, December 30, 2005 5:13:36 PM

HtmlDataTable not updating HtmlSelectOneListBox model values

I have a table with multiple rows of model objects in a list. One of the controls in the row is a selectone list box with its own list of selectItem objects

On submit and back, any text controls I have in the table and also in the form are retaining their state and updating the model values

But the selctone list box is not updating the models?

If I follow the phase events I see the update model phase passing through. Not sure why the data in the ui is not submitted to the model

If I locate the ui control and ask its selected value I see the changed value. But this is not communicated to the the model.

Satya - Friday, December 30, 2005 5:15:10 PM

How does dataTable.getRowIndex() work?

How is this index set? If I click on a control that is outside the table I am getting a -1. What is the idea of a current row for a table?

Satya - Friday, December 30, 2005 5:18:21 PM

How does dataTable.findComponent() work?

This takes an id of the control. But if the control is repeated, How is it finding the control on the selected row?

Satya - Friday, December 30, 2005 6:21:51 PM

More on post back: a thread from jsf forums

post back info

Another web log entry that uses renderresponse for figuring out

Satya - Friday, December 30, 2005 6:41:24 PM

JSF source code

Things you resort to when all else fails

Satya - Saturday, December 31, 2005 8:53:58 AM

Another jsf resource from jamesholmes.com

From a jsf book autor

Satya - Saturday, December 31, 2005 9:20:02 AM

jsf for non believers the 4 part series

Rich hightower series at ibm

Conceptually JSF got to be easier to learn than struts. But the details of JSF seem to drown you pretty quickly. See if this series is of some help!

The most difficult parts are

1. understanding and effectively using each ui component. One can blame the component designers for it and not necessarily the jsf itself.

2. Managing the state is goofy. Only ui state is stored forcing session scope lot of the times.

3. Navigating the table rows seem to be convoluted.

These are my initiali thoughts. I am hoping I will change my mind in the next couple of weeks.

Satya - Saturday, December 31, 2005 10:59:25 AM

Styling table rows dynamically

A forum topic

seems difficult to do at the row level. Suggestion is to do it at the component level

Satya - Saturday, December 31, 2005 11:39:42 AM

How can I put multiple controls in a single table cell?

How can I put multiple controls in a single table cell?

Satya - Monday, January 02, 2006 3:56:33 PM

High level JSF discussion

on jsf forum

See if it touches on some central points in jsf

Satya - Tuesday, January 24, 2006 8:08:19 AM

What is the verbatim tag used for?

See the scope and utility of this tag

Satya - Tuesday, January 24, 2006 9:08:00 AM

Can I put jsp tags inside jsf tags?

Can I put jsp tags inside jsf tags? Especially I want to use the plain old jsp expressions. will that work? Should I put these inside verbatim?

Satya - Tuesday, January 24, 2006 12:48:33 PM

How to work with httpservletrequest in jsf environment

How to work with httpservletrequest in jsf environment

Satya - Tuesday, January 24, 2006 3:42:21 PM

How to hide divs: Some jsf work arounds

How to hide divs: Some jsf work arounds

Satya - Wednesday, February 01, 2006 1:11:47 PM

How to write your own jsf components

http://www.exadel.com/tutorial/jsf/HowToWriteYourOwnJSFComponents.pdf

I haven't checked it out. So I can't say how good it is.

Satya - Wednesday, February 01, 2006 1:13:28 PM

How do you write header tags using JSF?

I can't find a clear answer on this. Would one use output text?

Satya - Saturday, March 04, 2006 8:23:08 AM

Is there any way to tell JSF how to print stack trace..

JSF when encounters a run time exception just prints the message and not the stack trace. Is there any way to do this?

Perhaps more importantnly, is there any way to tell it to redirect to another page? See if you can check out the source code and see how are exceptions handled in JSF.

Satya - Saturday, March 04, 2006 8:27:07 AM

When an exception occurs ...

Looks like if a JSF component throws an exception during a pre render phase, jsf seem to paint the exception and ignore any JSP painting that may happen before or after. This is a good thing. At least one will not see part of the page painted and then an exception.

Satya - Saturday, March 04, 2006 8:36:10 AM

A redirect will work during pre render as well..

Another good thing while dealing with exception. A send redirect will work during pre render as well. I have just tested it.

It will be interesting to see if one can use a forward, instead for this purpose that way the current object tree will be in scope.

Satya - Saturday, March 04, 2006 10:11:07 AM

Problems with forward ..

From the pre render phase forward works only if the target page is a non jsf page. I get a servlet exception if it is a jsf page.

Some key words to do research and see why this is happening

responseComplete()
jsf dispatch()
skip page

Satya - Saturday, March 04, 2006 12:32:49 PM

Odd problem with forward ..

If I have some jsp above and below jsf on a page, the prerender gets called when I go the page for the first time. So the exception forward works fine.

If I go to the page again, the jsp above the jsf seem to be executed first. The implication is that the background page should have no exceptions or if it does needs to have its own rerouting mechanism.

Satya - Saturday, March 04, 2006 2:25:14 PM

What does renderresponse do?

Examples in forums seem to suggest to call the renderresponse after a jsf dispatch. What does it really do?

Satya - Saturday, March 04, 2006 2:25:42 PM

How does JSF dispatch differ from servlet dispatch?

What is the difference ..

Satya - Saturday, March 04, 2006 2:27:10 PM

Study FacesServlet for any filter like capabilities ...

See how configurable the faces servlet is. See if one can write listeners to drop objects on the pipeline. See if one can intercept actions and deal with exceptions globally..

Satya - Saturday, March 04, 2006 2:31:24 PM

See what enhancements are planned for the next release of JSF

See if any of the following will be addressed a) monolithic faces servlet b) exceptions c) tiles or back ground pages d) integration with sitemesh or similar technologies

Go to the JSF site and see what the direction is and when the next release drop is

satya - Friday, October 06, 2006 4:02:23 PM

Here is the source code for jsf

http://www.sun.com/software/communitysource/jsf/download.xml