Skip to main content

[JAVAHELP] helpBroker's setCurrentId problem

1 reply [Last post]
Anonymous

Hi all,

When I launch the javaHelp , I dont want to show the first page of help
document(html help document) , instead I want to show the 3 rd chapter
of help document .
The chapter wise mapping is coming from TOC.xml.
To do this , I used the helpBroker's setCurrentID(string mapID) , & this
mapiD is from Help's jhm file (FTP.jhm).
But this is always opening the top level of help document.

HelpSet m_hs;
HelpBroker m_hb;

ClassLoader loader = this.getClass().getClassLoader();
URL url;
try {
url = HelpSet.findHelpSet(loader, HELPSETNAME);
m_hs = new HelpSet(loader, url);
m_hb = m_hs.createHelpBroker();
// m_hb.enableHelpKey(getRootPane(), "top", m_hs);
m_hb.setCurrentID("PutButton");
}
catch (Exception ex) { ex.printStackTrace(); }

Is this the correct way of doing.
Should I set the view or other parameters to do this.

Please do guide.

Thanks in advance,
Geetha

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

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.
[att1.html]

Reply viewing options

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

Sorry & Thanks as I could fix the problem.
after setting the mapId for the helpBroker , I need to set its view to
true as:

helpBrokerInstance.setDisplayed(true);

This will open the help document with the mapID set.

Regards,
Geetha

On Thu, 2004-10-07 at 13:26, Geetha B wrote:

> Hi all,
>
> When I launch the javaHelp , I dont want to show the first page of
> help document(html help document) , instead I want to show the 3 rd
> chapter of help document .
> The chapter wise mapping is coming from TOC.xml.
> To do this , I used the helpBroker's setCurrentID(string mapID) , &
> this mapiD is from Help's jhm file (FTP.jhm).
> But this is always opening the top level of help document.
>
> HelpSet m_hs;
> HelpBroker m_hb;
>
> ClassLoader loader = this.getClass().getClassLoader();
> URL url;
> try {
> url = HelpSet.findHelpSet(loader, HELPSETNAME);
> m_hs = new HelpSet(loader, url);
> m_hb = m_hs.createHelpBroker();
> // m_hb.enableHelpKey(getRootPane(), "top", m_hs);
> m_hb.setCurrentID("PutButton");
> }
> catch (Exception ex) { ex.printStackTrace(); }
>
>
> Is this the correct way of doing.
> Should I set the view or other parameters to do this.
>
> Please do guide.
>
> Thanks in advance,
> Geetha
>
>
> ********************************************************************************
>
> 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.

--
Geetha B
Tejas Networks

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

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.
[att1.html]