It doesn't look like you can invoke the code in PopupTag directly. So you could refactor the code in PopupTag.java so that the HTML is written by a static method (e.g. 'public static String getHTML(page, linkText)'), or you could put the method elsewhere and have PopupTag.java invoke that. Of course you'd have to propogate this to newer versions of DSpace code. Perhaps we could make the change in the main DSpace source code to help you out.
However, right now, I would just carry on doing it the way you are. If we change the way that popups work from the hardcoding in PopupTag.java, you'd have to change your own code anyway. It's very simple code and not worth worrying about.
Robert Tansley / Hewlett-Packard Laboratories / (+1) 617 551 7624
From: Toves,Jenny [mailto:tovesj@...]
Sent: 21 August 2003 15:34
Subject: [Dspace-tech] Using dspace:popup tag in .jsp
In the jsp files I see how the dspace:popup tag is used. I also see where java code writes out html via a document.write() call.
What I want to be able to do is write out a dspace:popup reference from within the java code. I generally understand why it isn't working when I try it ... that the jsp code does not get a chance to touch what is being written by the document.write() call.
Currently, I am just writing the html that the dspace:popup would have generated but I don't think that is a good idea. I would like the box appearance to match others in the system and it seems wrong to hardcode this piece of html when there is code to generate it. Can I invoke the PopupTag.java class directly?