Now that you have created a Web interaction JSP file that uses input and output parameters, you need to customize the JSP file so that it also works with the WebFacing component. You need to enter code to create a link from your WebFacing application to invoke this Web interaction. To do this you need to add a JavaScript function in the webface.js file so that you can call the DetailPageServlet servlet with the PRODNO parameter in a new window.
To create the link:
var mywindow function next(app) { mywindow = window.open(app,"Details","RESIZABLE=YES, HEIGHT=700, WIDTH=800"); }
If you want to create an application similar to SV000501 in the future, you also need to change a Web setting in your DDS source to enable the image you added, and also enable the close-window link for the JavaScript function.
The RPG code included in this application is altered to show the change, however, you would need to manually make the change in future applications. Furthermore, after changing the Web settings, you would need to reconvert the DDS source.
You can check the code to duplicate the result.
To view the DDS source:
A PRODNO R 0 5 6 A PRODNAME R 0 5 16 A IMAGESRC 19A 0 5 33 A*%%WB 13 FLD 100|100|&{IMAGESRC} A*%%WB 12 FLD 1 javascript:next('/Project501/DetailPageServlet?PRODNO=&{PRODNO}')
Note especially that Project501 is specified in the last line. As mentioned earlier, if you want to run the SV000501 application again, you would need to change the Project501 value back to SV000501.
For more information on how to work with DDS Source, switch to the Help perspective of the workbench and see the IBM WebFacing Tool documentation.
Copyright IBM Corporation 1992, 2003. All Rights Reserved.