Mailing List Archive

problem with incorrect tab selection
Hi,
Our project has it's documentation site generated with Apache Forrest
(v0.6). The site is up and running and in general everything is working
fine. However.. there is a slight problem that was noticed and I don't know
if this is a bug or something that we configured wrong in the xml files.

The issue is that, for some links, the currently selected tab is moved back
to the first one but the contents of the page remains correct. Practically,
the Design page is shown correctly, but not under the "Architecture" tab, as
it should, but under the "Release Notes" tab.

I tried to figure out what's different for those links compared with the
ones that work correctly and I noticed something:

<?xml version="1.0" encoding="UTF-8"?>
<site xmlns="http://apache.org/forrest/linkmap/1.0" label="Proj" href=""
tab="releasenotes">

<releaseInformation label="Release Information"
href="project/release_documentation/" tab="releasenotes">
<releaseOverview label="Welcome" href="index.html"/>
</releaseInformation>

<architecture label="Overview" href="project/architecture/"
tab="architecture">
<arcOverview label="Architecture Overview" href="index.html"/>
<arcDesign label="Design Patters" href="site:designPatterns"/>
</architecture>

<designPatterns href="general/documentation/designPatterns.html"/>

</site>

The structure of the folders is as follows:
<parentFolder>
project\release_documentation\
project\architecture\
general\documentation\

When I click on the "Design Patterns" link I'm taken to the right page, but
the Architecture tab do not remain selected, but instead the "Release Notes"
tab gets active.

It seems to me there is a problem with the indirect linking, but I can't
pinpoint it..

Thank you,
Ionut
Re: problem with incorrect tab selection [ In reply to ]
On Thu, Feb 11, 2010 at 8:36 AM, Ionut Scutaru <ionut.scutaru@gmail.com> wrote:
> Hi,
> Our project has it's documentation site generated with Apache Forrest
> (v0.6). The site is up and running and in general everything is working
> fine. However.. there is a slight problem that was noticed and I don't know
> if this is a bug or something that we configured wrong in the xml files.
>
> The issue is that, for some links, the currently selected tab is moved back
> to the first one but the contents of the page remains correct. Practically,
> the Design page is shown correctly, but not under the "Architecture" tab, as
> it should, but under the "Release Notes" tab.
>
> I tried to figure out what's different for those links compared with the
> ones that work correctly and I noticed something:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <site xmlns="http://apache.org/forrest/linkmap/1.0" label="Proj" href=""
> tab="releasenotes">
>
>     <releaseInformation label="Release Information"
> href="project/release_documentation/" tab="releasenotes">
>         <releaseOverview label="Welcome" href="index.html"/>
>     </releaseInformation>
>
>     <architecture label="Overview" href="project/architecture/"
> tab="architecture">
>         <arcOverview label="Architecture Overview" href="index.html"/>
>         <arcDesign label="Design Patters" href="site:designPatterns"/>
>     </architecture>
>
>     <designPatterns href="general/documentation/designPatterns.html"/>
>
> </site>
>
> The structure of the folders is as follows:
>     <parentFolder>
>         project\release_documentation\
>         project\architecture\
>         general\documentation\
>
> When I click on the "Design Patterns" link I'm taken to the right page, but
> the Architecture tab do not remain selected, but instead the "Release Notes"
> tab gets active.
>
> It seems to me there is a problem with the indirect linking, but I can't
> pinpoint it..

Can you share your tabs definition? I seem to remember some problems
with loosing context in 0.6 - have you had a chance to search JIRA for
old issues?

--tim
Re: problem with incorrect tab selection [ In reply to ]
Hi Tim,
Thanks for replying. Here's our tabs.xml file (modify a little, to maintain
the annonimity):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.1//EN" "
http://forrest.apache.org/dtd/tab-cocoon-v11.dtd">

<tabs software="proj"
title="Proj"
copyright="TheCompany"
xmlns:xlink="http://www.w3.org/1999/xlink">

<tab id="releasenotes" label="Release Overview"
dir="project/release_documentation"/>
<tab id="architecture" label="Architecture" dir="project/architecture"/>
</tabs>

I searched JIRA before, but I haven't found anything of use. On the other
hand maybe the search terms that I used were not appropriate (and it's
pretty
hard to express the problem that I am having in a few search terms).

Ionut



On Thu, Feb 11, 2010 at 4:28 PM, Tim Williams <williamstw@gmail.com> wrote:

> On Thu, Feb 11, 2010 at 8:36 AM, Ionut Scutaru <ionut.scutaru@gmail.com>
> wrote:
> > Hi,
> > Our project has it's documentation site generated with Apache Forrest
> > (v0.6). The site is up and running and in general everything is working
> > fine. However.. there is a slight problem that was noticed and I don't
> know
> > if this is a bug or something that we configured wrong in the xml files.
> >
> > The issue is that, for some links, the currently selected tab is moved
> back
> > to the first one but the contents of the page remains correct.
> Practically,
> > the Design page is shown correctly, but not under the "Architecture" tab,
> as
> > it should, but under the "Release Notes" tab.
> >
> > I tried to figure out what's different for those links compared with the
> > ones that work correctly and I noticed something:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <site xmlns="http://apache.org/forrest/linkmap/1.0" label="Proj" href=""
> > tab="releasenotes">
> >
> > <releaseInformation label="Release Information"
> > href="project/release_documentation/" tab="releasenotes">
> > <releaseOverview label="Welcome" href="index.html"/>
> > </releaseInformation>
> >
> > <architecture label="Overview" href="project/architecture/"
> > tab="architecture">
> > <arcOverview label="Architecture Overview" href="index.html"/>
> > <arcDesign label="Design Patters" href="site:designPatterns"/>
> > </architecture>
> >
> > <designPatterns href="general/documentation/designPatterns.html"/>
> >
> > </site>
> >
> > The structure of the folders is as follows:
> > <parentFolder>
> > project\release_documentation\
> > project\architecture\
> > general\documentation\
> >
> > When I click on the "Design Patterns" link I'm taken to the right page,
> but
> > the Architecture tab do not remain selected, but instead the "Release
> Notes"
> > tab gets active.
> >
> > It seems to me there is a problem with the indirect linking, but I can't
> > pinpoint it..
>
> Can you share your tabs definition? I seem to remember some problems
> with loosing context in 0.6 - have you had a chance to search JIRA for
> old issues?
>
> --tim
>
Re: problem with incorrect tab selection [ In reply to ]
Hello Ionut,

Search the FAQ:
http://forrest.apache.org/docs/faq.html#tab-site
"I need help with the interaction between tabs.xml and site.xml"

My guess it that there is something wrong in your site.xml file.
Such issues can be hard to resolve. Those tips might help.

If not, then please show us the snippet of your site.xml that
relates to this issue.

-David
Re: problem with incorrect tab selection [ In reply to ]
Hi David,

Before I posted the question on the forum, I looked in the FAQ list ..
Unfortunately I didn't find anything that could help me.

Regarding the snippet.. I already provided the entire site.xml file (which
is pretty small) and the tabs.xml file. Let me know if there is any other
file that I should post here..

Thank you,
Ionut


On Fri, Feb 12, 2010 at 1:40 AM, David Crossley <crossley@apache.org> wrote:

> Hello Ionut,
>
> Search the FAQ:
> http://forrest.apache.org/docs/faq.html#tab-site
> "I need help with the interaction between tabs.xml and site.xml"
>
> My guess it that there is something wrong in your site.xml file.
> Such issues can be hard to resolve. Those tips might help.
>
> If not, then please show us the snippet of your site.xml that
> relates to this issue.
>
> -David
>
Re: problem with incorrect tab selection [ In reply to ]
Hi,
I think I found the problem in this post:

http://www.mail-archive.com/user%40forrest.apache.org/msg01750.html

*"So (to my knowledge) _all_ files referenced within a menu element in
site.xml have to be in the same directory or also you will loose context
when opening that file in a different directory."*

Well.. in my site.xml, the "site:designPatterns" actually points to a file
outside the "project/architecture/" folder and this means the context is
lost when that link is clicked.

Regards,
Ionut





On Thu, Feb 11, 2010 at 3:36 PM, Ionut Scutaru <ionut.scutaru@gmail.com>wrote:

> Hi,
> Our project has it's documentation site generated with Apache Forrest
> (v0.6). The site is up and running and in general everything is working
> fine. However.. there is a slight problem that was noticed and I don't know
> if this is a bug or something that we configured wrong in the xml files.
>
> The issue is that, for some links, the currently selected tab is moved back
> to the first one but the contents of the page remains correct. Practically,
> the Design page is shown correctly, but not under the "Architecture" tab, as
> it should, but under the "Release Notes" tab.
>
> I tried to figure out what's different for those links compared with the
> ones that work correctly and I noticed something:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <site xmlns="http://apache.org/forrest/linkmap/1.0" label="Proj" href=""
> tab="releasenotes">
>
> <releaseInformation label="Release Information"
> href="project/release_documentation/" tab="releasenotes">
> <releaseOverview label="Welcome" href="index.html"/>
> </releaseInformation>
>
> <architecture label="Overview" href="project/architecture/"
> tab="architecture">
> <arcOverview label="Architecture Overview" href="index.html"/>
> <arcDesign label="Design Patters" href="site:designPatterns"/>
> </architecture>
>
> <designPatterns href="general/documentation/designPatterns.html"/>
>
> </site>
>
> The structure of the folders is as follows:
> <parentFolder>
> project\release_documentation\
> project\architecture\
> general\documentation\
>
> When I click on the "Design Patterns" link I'm taken to the right page, but
> the Architecture tab do not remain selected, but instead the "Release Notes"
> tab gets active.
>
> It seems to me there is a problem with the indirect linking, but I can't
> pinpoint it..
>
> Thank you,
> Ionut
>
Re: problem with incorrect tab selection [ In reply to ]
Ionut Scutaru wrote:
> The issue is that, for some links, the currently selected tab is moved back
> to the first one but the contents of the page remains correct. Practically,
> the Design page is shown correctly, but not under the "Architecture" tab, as
> it should, but under the "Release Notes" tab.
>
> I tried to figure out what's different for those links compared with the
> ones that work correctly and I noticed something:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <site xmlns="http://apache.org/forrest/linkmap/1.0" label="Proj" href=""
> tab="releasenotes">
>
> <releaseInformation label="Release Information"
> href="project/release_documentation/" tab="releasenotes">
> <releaseOverview label="Welcome" href="index.html"/>
> </releaseInformation>
>
> <architecture label="Overview" href="project/architecture/"
> tab="architecture">
> <arcOverview label="Architecture Overview" href="index.html"/>
> <arcDesign label="Design Patters" href="site:designPatterns"/>
> </architecture>
>
> <designPatterns href="general/documentation/designPatterns.html"/>
>
> </site>
>
> The structure of the folders is as follows:
> <parentFolder>
> project\release_documentation\
> project\architecture\
> general\documentation\
>
> When I click on the "Design Patterns" link I'm taken to the right page, but
> the Architecture tab do not remain selected, but instead the "Release Notes"
> tab gets active.

I reckon that is because the default "tab" attribute
of the "site" element of your site.xml is "releasenotes".

The "designPatterns" element needs a "tab=architecture"
attribute, rather than the default.

-David
Re: problem with incorrect tab selection [ In reply to ]
Thanks, David ! That was it !


On Fri, Feb 12, 2010 at 3:05 PM, David Crossley <crossley@apache.org> wrote:

> Ionut Scutaru wrote:
> > The issue is that, for some links, the currently selected tab is moved
> back
> > to the first one but the contents of the page remains correct.
> Practically,
> > the Design page is shown correctly, but not under the "Architecture" tab,
> as
> > it should, but under the "Release Notes" tab.
> >
> > I tried to figure out what's different for those links compared with the
> > ones that work correctly and I noticed something:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <site xmlns="http://apache.org/forrest/linkmap/1.0" label="Proj" href=""
> > tab="releasenotes">
> >
> > <releaseInformation label="Release Information"
> > href="project/release_documentation/" tab="releasenotes">
> > <releaseOverview label="Welcome" href="index.html"/>
> > </releaseInformation>
> >
> > <architecture label="Overview" href="project/architecture/"
> > tab="architecture">
> > <arcOverview label="Architecture Overview" href="index.html"/>
> > <arcDesign label="Design Patters" href="site:designPatterns"/>
> > </architecture>
> >
> > <designPatterns href="general/documentation/designPatterns.html"/>
> >
> > </site>
> >
> > The structure of the folders is as follows:
> > <parentFolder>
> > project\release_documentation\
> > project\architecture\
> > general\documentation\
> >
> > When I click on the "Design Patterns" link I'm taken to the right page,
> but
> > the Architecture tab do not remain selected, but instead the "Release
> Notes"
> > tab gets active.
>
> I reckon that is because the default "tab" attribute
> of the "site" element of your site.xml is "releasenotes".
>
> The "designPatterns" element needs a "tab=architecture"
> attribute, rather than the default.
>
> -David
>