Ignore:
Timestamp:
2024-03-18T20:37:34+13:00 (2 months ago)
Author:
anupama
Message:
  1. Running webswing-phind as an application instead of as an applet, so we can finally pass in the variable collection and library parameters. This required altering webswing.config.in (to launch JPhind as application instead of applet) and webswing-phind.xsl (to pass in the additional parameters). 2. When run as applet, clicking leaf nodes in the search results list opened the clicked url result in a browser window/tab but this wasn't happening when run as application. The easiest solution was to handle it when JPhind is run as a webswing application: in that case, it just requires registering a new eventhandler called openURL in the webswing-phind.xsl's JavaScript code, then calling this from the Java code. In JPhind.java, we now pass in a webswing command line parameter set to 1 to indicate JPhind is run as by webswing and as an application. (The webswing cmdline arg will default to 0 if not set, such as for applets or if run from the commandline without being set.) If run as an applet, JPhind uses the inherited AppletContext object as before to open a URL in the browser where the applet is being run. But now, if run as a webswing Application, it calls the new webswing custom eventhandler called openURL (for which JPhind needs to be compiled against the webswing-api.jar now) and passes the URL and any target window where the URL is to be opened. Finally, webswing.config.in passes in the new webswing parameter set to 1, since we're running the phind webswing as an application and also needs the webswing-api.jar in its classpath for phind.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r38806 r38848  
    822822    <pathelement location="${lib.jni}/mg.jar"/>
    823823    <pathelement location="${lib.jni}/mgpp.jar"/>
     824
     825    <pathelement location="${web.writablehome}/ext/webswing/api/webswing-api.jar"/>   
    824826   
    825827    <!-- Include all elements that Tomcat exposes to applications -->
Note: See TracChangeset for help on using the changeset viewer.