Skip to main content

Secondary window using MapID

7 replies [Last post]
hairyveggie
Offline
Joined: 2006-02-17
Points: 0

Hello, javahelp gods and godettes.
I am linking to other helpset/topics and displaying secondary windows using the tag and a URL per the JHUG, and this works great. However, the user guide says I can use a MapID instead of a URL, which would be great because the URLs are generated and rather meaningless.
My question is, what is this "MapID" it's referring to? Does it mean the from the map file? If so, I can't make it work. I have tried just about everything, including the string representation of "ID: mapId, Help Set Name" that is returned when calling "javax.help.Map.ID.create(id, hs)".
Has anyone successfully called a popup/secondary window using a MapID? If so, please shed me a little light.

I am currently using JH2.0_1 and j2sdk1.4.1_0, and my helpsets are located in subdirectories in the same jar file. (We tried having each helpset in separate jars, but that was next to impossible.)

Thanks a million!

Reply viewing options

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

At 04:18 PM 11/4/2003, java-help@JAVADESKTOP.ORG wrote:
>Thanks, Roger.
>
>I'm still a bit confused about the format of the string, however. I've
>tried using the "target" attribute as the mapID to call, but it
>didn't work. Also, most of my links will be in different helpsets, so I
>don't know how to specify that either.
>
>If you could be just a bit more specific about exactly what it needs in
>that string, I swear I'll leave you alone for at least a few hours. :D
>
>Thanks again!

In your original post, you said:

> I am linking to other helpset/topics and displaying
> secondary windows using the

tag and a URL > per the JHUG, and this works great. However, the > user guide says I can use a MapID instead of a URL, > which would be great because the URLs are generated > and rather meaningless. Are you trying to use a mapID from an tag in a help topic? If so, as far as I know, it won't work--you must use the relative URL. In the Java program that uses your helpset, it's possible with JH 2.0 to specify the mapID and specify a secondary window. You can also specify a secondary window and mapID from a TOC or index navigator, but not from an HTML topic. -Paul ******************************************************************************** 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.
Roger Brinkley

Paul Fussell wrote:
> In your original post, you said:
>
> > I am linking to other helpset/topics and displaying
> > secondary windows using the

tag and a URL > > per the JHUG, and this works great. However, the > > user guide says I can use a MapID instead of a URL, > > which would be great because the URLs are generated > > and rather meaningless. > > Are you trying to use a mapID from an tag in a help topic? If so, > as far as I know, it won't work--you must use the relative URL. In the Java > program that uses your helpset, it's possible with JH 2.0 to specify the > mapID and specify a secondary window. You can also specify a secondary > window and mapID from a TOC or index navigator, but not from an HTML topic. Actually instead of using "content" use "id" instead. Sorry it looks like the docs are just a little bit off. That will use an id correctly. 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.
hairyveggie
Offline
Joined: 2006-02-17
Points: 0

I just wanted to say thanks again, guys, the "id" attribute works so well, it's almost too easy!


I just ran into an issue specific to our setup, so I thought I'd ask just one more question.

We have a single jar file containing a whole lotta helpsets. There is a dataless master helpset file at the top level, and the rest of the helpsets are in their respective subdirectories inside the jar file. It's quite marvelous that I only need to specify a mapID in one html topic to find another, but could be problematic because our mapId's can sometimes duplicate between helpsets. My quick test found that if there were more than one mapID, it didn't show either of them.

So, to my question:
Does the

tag for a secondary window have any parameters for specifying helpset? Or maybe a path for the mapID? Thanks one more time! Message was edited by: hairyveggie
brinkley
Offline
Joined: 2003-06-06
Points: 0

> We have a single jar file containing a whole lotta
> helpsets. There is a dataless master helpset file at
> the top level, and the rest of the helpsets are in
> their respective subdirectories inside the jar file.
> It's quite marvelous that I only need to specify a
> a mapID in one html topic to find another, but could
> be problematic because our mapId's can sometimes
> duplicate between helpsets. My quick test found that
> if there were more than one mapID, it didn't show
> either of them.
>
> So, to my question:
> Does the

tag for a secondary window have any > parameters for specifying helpset? Or maybe a path > for the mapID? ID's really need to be unique across multiple helpsets. It's first come first serve. This problem will bite you in other places as well. For instance in the TOC if you have an ID of the same name in multiple helpsets it will map to first one it finds which may or may not be what you intend (probability of getting it correct are 1/n where n is the number of helpsets with same id). Moral of the story: use unique IDs across all helpsets. Binky
brinkley
Offline
Joined: 2003-06-06
Points: 0

> Hello, javahelp gods and godettes.
> I am linking to other helpset/topics and displaying
> secondary windows using the

tag and a URL > per the JHUG, and this works great. However, the > user guide says I can use a MapID instead of a URL, > which would be great because the URLs are generated > and rather meaningless. > My question is, what is this "MapID" it's referring > to? Does it mean the from the map file? If > so, I can't make it work. I have tried just about > everything, including the string representation of > "ID: mapId, Help Set Name" that is returned when > calling "javax.help.Map.ID.create(id, hs)". > Has anyone successfully called a popup/secondary > window using a MapID? If so, please shed me a little > light. > > I am currently using JH2.0_1 and j2sdk1.4.1_0, and my > helpsets are located in subdirectories in the same > jar file. (We tried having each helpset in separate > jars, but that was next to impossible.) The Map.ID is just a string. It should map to an item in your map file. Binky
hairyveggie
Offline
Joined: 2006-02-17
Points: 0

Thanks, Roger.

I'm still a bit confused about the format of the string, however. I've tried using the "target" attribute as the mapID to call, but it didn't work. Also, most of my links will be in different helpsets, so I don't know how to specify that either.

If you could be just a bit more specific about exactly what it needs in that string, I swear I'll leave you alone for at least a few hours. :D

Thanks again!

Roger Brinkley

java-help@JAVADESKTOP.ORG wrote:
> Thanks, Roger.
>
> I'm still a bit confused about the format of the string, however.
> I've tried using the "target" attribute as the mapID to call,
> but it didn't work. Also, most of my links will be in different
> helpsets, so I don't know how to specify that either.
>
> If you could be just a bit more specific about exactly what it needs
> in that string, I swear I'll leave you alone for at least a few
> hours.

Straight text, for instance if I wanted to display something in the
history of the holidays it would be "hallowen" for the hallowen.html
file. On the Helpset the target "hallowen" would have to be somewhere in
the master helpset for this to work.

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.