Monday, May 28, 2007

How to assign the javascript variable with the managed-bean property ( JSF )?

JSF hacking.

using <h:output> tag to output bean member.make sure that JavaScript code is in <f:view tag>. This an example:

<f:view>
....
<script>
var b = '<h:outputText value="#{MyBean.name}"/>';
// other script code
</script>
....
</f:view>

Friday, March 23, 2007

Status Report for 2006 Feb 20th to 2007 Mar 20th

1. Finished Simplex2 portlet development work.
The old Simplex portlet in QuakeSim1 is programmed with plain JSP pages. The new version Simplex portlet is using JSF framework and gridsphere portal container, We used MVC model to do the new portlet instead of old JSP pages. All the logic code is in java back-bean. The view layer code is using plain JSF, it is easy to update and deploy.

The following was done in this project:
* 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/Simplex
The demo page is here:
user: testuser
password: testuser
http://gf1.ucs.indiana.edu:13080/gridsphere/

3. Future work
I will start to develop the new Disloc portlet after Marlon throw away some legacy things in old Disloc portlet.

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.

Wednesday, January 17, 2007

Status Report for 2006 Dec 24th to 2007 Jan 17

1. Finished MeshGenerator development work.
I spend a lot of time on the development work of Meshgenerator.
I've added those thing to Quakesim2 portal now.

2. Working on GeoFest development work.
Try to finished this thing as soon as possible.

3. optimize Context Manager service (Future work).
Try to use a OO database tool to store context data for Java bean.

Follow the programming process, I really know a lot of about JSF.
JSF is really powerful(vs struts), I like it.
Of course , you can use both JSF and Struts to develop one project, those thing are not conflict.
Last week , Professor Fox gave us a presentation about "web 2.0 vs portal". A question is here:
How can we build a nice framework to combine those server-side technologies and rich-client technologies.

Thursday, December 14, 2006

Status Report for Dec 6th to Dec 13th

Currently I’m working on Geofest portlet development.
After a short break for my final exam, I still keep on work for step 1 and step 2.
I found that the JSF is a really nice event-driven model framework.
I also have some experience on struts( anothor MVC framework).
Now I want to say I really like JSF.
Especially, JSF tags is quite simple and beautiful to deal with complicated pages
( There are many logic tags in Structs Model).

JavaServer Faces (JSF) vs Struts:
http://websphere.sys-con.com/read/46516.htm?CFID=1353130&CFTOKEN=F61E0DD4-1078-89BA-DAFD15461810F32D

Wednesday, December 06, 2006

Status Report for Nov 30th to Dec 6th

Keep on develop Geofest portlet.

Step 1. Create view layer
status: working

Step 2. Create model layer
status: started working on this step.

Everything is fine now.
I also prapare for my two final exams.
After next week I will try to finish step 1 in one week.