Changeset 11646


Ignore:
Timestamp:
2006-04-12T09:26:58+12:00 (18 years ago)
Author:
shaoqun
Message:

if there is no screenview, clicking an collage image, the user will see the original image rather than the collage classifer pages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/java/org/nzdl/gsdl/GsdlCollageApplet/GsdlCollageApplet.java

    r11565 r11646  
    251251        try {
    252252        // displays the associated url in a new window
    253         URL from_url = new URL(cimage.from_url_  + "#" + cimage.name_);
     253                URL from_url = null;       
     254       
     255        java.util.regex.Pattern p = java.util.regex.Pattern.compile("cl=CL\\d(\\.\\d)*\\s");
     256        java.util.regex.Matcher m = p.matcher(cimage.from_url_.trim()+" ");
     257
     258                if (m.find() ){
     259           
     260            from_url = cimage.url_;
     261        }
     262        else{
     263           from_url =  new URL(cimage.from_url_  + "#" + cimage.name_);
     264        }
    254265        getAppletContext().showDocument(from_url,"gsdlDoc");
    255266        }
    256         catch (MalformedURLException e) {
     267        catch (MalformedURLException e) { 
    257268        e.printStackTrace();
    258269        }
     
    282293       
    283294            } catch (Exception e) {
    284             e.printStackTrace();
     295           
    285296            }
    286297        }
Note: See TracChangeset for help on using the changeset viewer.