Skip to main content

RE: [JAVAHELP] Dilemma for cross-helpset links

1 reply [Last post]
Anonymous

Thanks Binky!

I was able to get the 'content' parameter for the JHSecondaryViewer to recognize the 'jar:file:' syntax so that is working fine. And I did try to put the 'jar:file' syntax in the map file for a target but I only got garbage displayed in the secondary window. It was probably something wrong with my syntax or something in the map file.

Binky, one more question that might make your head hurt a little more! Do you know which code gets executed when a user clicks on a link in the JEditorPane? One that either takes them to another topic within the same helpset or to another topic in another helpset. I'm guessing that is all code in the 'javax.swing.text.html' package and nothing JavaHelp specific. Thanks!

-----Original Message-----
From: Discussion list of JavaHelp [mailto:JAVAHELP-INTEREST@JAVA.SUN.COM] On Behalf Of Roger Brinkley
Sent: Tuesday, February 21, 2006 9:14 AM
To: JAVAHELP-INTEREST@JAVA.SUN.COM
Subject: Re: [JAVAHELP] Dilemma for cross-helpset links

David Cagle wrote:
> So I started looking at the Lightweight Components described in the JHUG.
> The JHSecondaryViewer looks promising but I don't think we can use it
> straight out of the box. For one thing, the 'content' parameter says
> it has to be relative from the base address of the containing topic.
> And, the id parameter looks like it has to be in the Map file for that helpset.

The id would have to be in the map file for the master helpset. First come first serve though so don't use the same id.

> So I have some simple questions about the JHSecondaryViewer...
> - Can it be extended to override the content parameter so it can look
> for a loose file or a file within a Jar file?

Yes that is possible.

> - Is it possible to have the Jar syntax in the map file for an id
> which points to an id in another helpset?

An id in another helpset no; a file in another helpset yes. Of course you have to know where the jar is going to reside which can be a little tricky.

> Something else that crossed my mind was maybe I could write a
> lightweight component which implements the current behavior now of
> when I click a link it displays the topic. But my component would
> search for a file within a Jar file first and then fall back onto a
> loose file. But, I don't know where to start on this one.
>

Ouch my head is hurting thinking about this one.

binky

********************************************************************************

You may leave the list at any time by sending message with no subject and "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Roger Brinkley

David Cagle wrote:
> Binky, one more question that might make your head hurt a little
> more! Do you know which code gets executed when a user clicks on a
> link in the JEditorPane? One that either takes them to another topic
> within the same helpset or to another topic in another helpset. I'm
> guessing that is all code in the 'javax.swing.text.html' package and
> nothing JavaHelp specific. Thanks!

Not entirely. There is a hyperlinkUpdate in BasicContentViewerUI.java
that gets called when the link is updated.

What are you trying to do?

binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.