Friday, February 16, 2007

Status Report for 2006 Jan 24th to 2007 Feb 11th

1. Finished Meshgen/Geofest portlet development work.
We used MVC model to do the new portlet instead of old portlet. First, in the new portlet, we put all the logic code in java back-bean. The managed bean will do all the business logical work for the Geofest. we also separate all the view layer code from old jsp source codes.

In this project, I did the following:
* Create the web applications with the JSF framework enabled.
* Create the plain JSF pages that uses JSF components to get user input and generate output HTML.
* Configure page navigations.
* Create the JSF managed beans and read and write user/sevice input to the bean's properties.


2. Demo page and SVN directory
I have added GeoFEST part to SVN.
URL is here:
https://svn.sourceforge.net/svnroot/crisisgrid/QuakeSim2/jsf_standalone/MeshGenerator
The demo page is here:
user: testuser
password: testuser
http://gf1.ucs.indiana.edu:13080/gridsphere/

3. Optimize work
Optimize the the Meshgenerator portlet codes and try some JSF framework advanced future.

Monday, February 12, 2007

How to use URL to pass parameter to JSF page?

If you have this page:
URL: http://your_server/your_app/product.jsf?id=777
You can use the following code to get the value from back-bean:

FacesContext fc = FacesContext.getCurrentInstance();
String id = (String) fc.getExternalContext().getRequestParameterMap().get("id");

you also can use some pre-define viriable to get the same value from JSF page.

h:outputText value="#{param['id']}"

Note: you must invoke this jsf page directly, you also should use servlet mapping.