Changing the WebFacing Project Template


When you create a WebFacing project, the project template is copied from the product installation directory to the Development Studio Client workspace. If you have files you want to add to all WebFacing projects, you can in fact change the WebFacing template rather than copy files into each of the projects that you create. You might want to do this if you create a JavaScript function or if you have a graphic that you want available to all new WebFaced projects.

In the example here, I added a my.js JavaScript file and a wuicon1.gif graphic file to the template. I then created a WebFacing project in the workbench.

The directory structure for locating the template is as follows : WDSC \iseries\eclipse\plugins\com.ibm.etools.iseries.webfacing_5.0.0\ProjectTemplate\. WDSC is the default product directory. (If you chose a different name during installation just use it instead of WDSC.)

Inside the ProjectTemplate directory, you can see the directory structure of the WebFacing project. In there, you can add the file that should be added permanently to all new WebFacing projects. Figure 17.38 shows the my.js file added to the template directory.

click to expand
Figure 17.38: File my.js added to the ClientScript\usr template directory
Important:  

When installing a Service Pack for WDSC, the com.ibm.etools.iseries.webfacing_5.0.0 name will change to 5.x.y, depending on the Service Pack level you install. You then have to update the template in this new directory with your changes. The first Service Pack at general availability of the product will be 5.0.1. Since it is strongly suggested that you apply this Service Pack immediately after installing the product, I suggest you make any changes to the 5.0.1 template after updating the product to that level.

In Figure 17.39, you can see the WebFacing project structure created from a modified template.

click to expand
Figure 17.39: New WebFacing project created from modified template with additional files

The two files and the generated directory have been automatically added to the WebFacing project in the workbench.




Understanding the IBM WebFacing Tool. A Guided Tour
Understanding the IBM WebFacing Tool: A Guided Tour (IBM Illustrated Guide series)
ISBN: 1931182094
EAN: 2147483647
Year: 2003
Pages: 153

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net