You maybe familiar with the EGL JSF Shopping cart application that is a sample available in Rational Business Developer (RBD). While there is an open request for enhancement (8855) to create a similar sample for Rich UI, I thought why can't I create one myself?
So here it is! A Rich UI Shopping cart application (well without the cart part actually... this is the first version...to be continued).
This application has been developed using RBD 8.0.1 and 188.8.131.52 and runs on WebSphere Application Server 7.0.
It gives possible solutions to some general concerns like:
- a usual layout Top/Left/Main/Bottom frames (using DojoBorderContainer)
- display of different “pages”
- calling EGL business logic (generated to Java)
- display images from a BLOB column in Rich UI
- managing errors
- multilingual (English and French are available)
This is my own development and shouldn't be considered as *the* recommended IBM way of coding Rich UI.
Here's the instructions:
- Download the egl.rui.shoppingcart.20111220.zip from the Files section of the EGL group.
- Download the associated Derby database or get it from EGL JSF Shopping cart sample in RBD.
Follow the steps below: (You can also follow along with the steps in this video. Unzip it and open shoppingcartsetup_viewlet_swf.html in a Web browser.)
- unzip the derby database in C:\temp\eglredbkdb
- create a new EGL Rich UI Dojo project to make sure the needed dependencies are available in your workspace (com.ibm.egl.rui_2.0.0 and com.ibm.egl.rui.dojo.*)
- import the projects into RBD 184.108.40.206: menu File > Import > Existing project then check From an archive file and select the attached zip file
- modify com.ibm.egl.rui.shopcart\WebContent\properties\ruishopcartconf.properties to match your WebSphere TCP port (localhost:9080)
- start WebSphere Application Server and publish the EGLShoppingCartWebEAR project
- Open com.ibm.egl.rui.shopcart\EGLSource\com\ibm\egl\rui\shopcart\handlers\ShoppingCart.egl in the EGL RichUI editor and select the Preview tab
To deploy it to WebSphere Application Server
If you want to deploy the RichUI project com.ibm.egl.rui.shopcart to WebSphere Application Server you can follow the same steps as on the Mortgage tutorial on the Information center. Then run <your Web project>\WebContent\ShoppingCart-en_US.html
- Layout http://www.packtpub.com/article/layout-in-dojo-part-1 and EGL DojoBorderContainer
I hope it will help developers to get started with Rich UI. Comments (bad and good) are welcomed, including suggested improvements.