You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Vicent Mas <uv...@gmail.com> on 2009/03/27 08:54:06 UTC

problem with site.xml and tabs.xml: empty menus

Hi,

I'm a newbie. I recently intalled forrest-0.90 from svn and started playing
with it. First I tried the skin approach. After some reading, I decided that
using dispatcher was the way to go so I did. Now I've some problems that
I don't know how to fix.

The first problem is related with site.xml and tabs.xml. When a tab has no
visible content if I click on that tab then it is expanded showing an empty
menu. However the expected behavior should be just  select the tab and do not
expand it, simply display the file referenced in the indexfile attribute. This
is in fact what happens using the skin approach.

My site.xml and tabs.xml are:

<tabs software="The Forresters"
			title="The Forresters"
			copyright="The Apache Software Foundation"
			xmlns:xlink="http://www.w3.org/1999/xlink">
  <tab id="home" label="Home" dir="" indexfile="index.html"/>
  <tab id="screenshots" label="Screenshots" dir="screenshots"
indexfile="screenshots.html"/>
	<tab id="download" label="Download" dir="download" indexfile="download.html"/>
	<tab id="development" label="Development" dir="development"
indexfile="development.html"/>
	<tab id="reading" label="Documentation" dir="reading"
indexfile="documentation.html"/>
</tabs>


<site label="The Forresters" href=""
xmlns="http://apache.org/forrest/linkmap/1.0" tab=""
			xmlns:xi="http://www.w3.org/2001/XInclude">
	
	<overview tab="home">
		<index href="index.html" description="Overview of the project"/>
	</overview>

	<screenshots tab="screenshots" href="screenshots/">
		<index href="screenshots.html" description="Videos and Screenshots"/>
	</screenshots>

	<development tab="development" href="development/">
		<index  href="development.html" description="Project development"/>
	</development>
	
	<download tab="download" label="Getting ViTables" href="download/"
description="How to get software packages">
		<from_project label="From here" href="download.html"/>
		<distros label="From other sources" href="distros/distros.html"/>
	</download>

	<reading tab="reading" label="Docs" href="reading/"
description="Documentation about the project">
		<index label="Index" href="documentation.html"/>
		<testimonials label="Testimonials" href="testimonials/testimonials.html"/>
		<faq label="FAQ" href="faq/faq.html"/>
	</reading>
	
...
</site>
	
With the above layout, clicking on the tabs labeled as Home, Screenshots and
Development the tab is expanded showing an empty menu.

Am I doing something wrong? Is it a bug? The different behavior of the skin and
the dispatcher approaches make me think that there is a bug somewhere.

Any help will be appreciated.


Vicent

PS: if in the site.xml I replace the entries

	<overview tab="home">
		<index href="index.html" description="Overview of the project"/>
	</overview>

	<screenshots tab="screenshots" href="screenshots/">
		<index href="screenshots.html" description="Videos and Screenshots"/>
	</screenshots>

	<development tab="development" href="development/">
		<index  href="development.html" description="Project development"/>
	</development>

with

	<overview href="index.html" description="Overview of the project"/>
	<screenshots "screenshots/screenshots.html" description="Videos and
Screenshots"/>
	<development href="development/development.html" description="Project
development"/>

then clicking on those tabs show a menu that contains the menus of
both Documentation
and Download tabs
.
-- 
Share what you know, learn what you don't.

Re: problem with site.xml and tabs.xml: empty menus

Posted by Vicent Mas <uv...@gmail.com>.
Hi,

> Hi Vicent,
>
> normally Ross points out the importance to NOT TOP POST!
>
> Why?
>
> http://www.caliburn.nl/topposting.html
> http://en.wikipedia.org/wiki/Posting_style
>
> "A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?"
>
>
>

Sorry, I simply didn't know about the preferred style in this mailing list. As
a user of gmail I'm used to top posting. Anyway, is the recommendation against
top posting somewhere in the forrest website? I've not seen such recommendation
in the Mailing lists section (it may be my fault). A few lines there
could save Ross
lots of work.

>> ...

> > To give you a quick feedback, please can you send/point me to the
> > responsible code in skins that work.
>> ...
> Meaning please see the code of skins that's treats this part of the
> navigation. Further please point me to the dispatcher contract that you
> patched. I am sorry that ATM I cannot be a bigger help and debug it
> myself, but too much other commitments are eating my time.
>

I've not yet looked at the skins code (I'm very busy here too). As I said in
my previous mails:

- in pelt-html.leftbar.panel.xml I've commented out the call to the
nav-section-round-bottom contract
- in nav-section.ft, I've added a template with the same functionality than the
nav-section-round-bottom contract. I've added too a conditional call to this
template: it is called from <xsl:template match='/'> when the condition
<xsl:if test="$nav-section/navigation/menu != ''"> is fulfilled

My patched version is attached.

Thanks a lot for your advices and for your time.

Vicent

> salu2
> --
> Thorsten Scherler <thorsten.at.apache.org>
> Open Source <consulting, training and solutions>
>
>



-- 
Share what you know, learn what you don't.

Re: problem with site.xml and tabs.xml: empty menus

Posted by Thorsten Scherler <th...@apache.org>.
On Thu, 2009-04-02 at 13:17 +0200, Vicent Mas wrote: 
> Hi,

Hi Vicent,

normally Ross points out the importance to NOT TOP POST!

Why?

http://www.caliburn.nl/topposting.html
http://en.wikipedia.org/wiki/Posting_style

"A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?"



> I've attached minimal versions of site.xml and tabs.xml. Tabs with id 'home',
> 'screenshots' and 'development' have no navigation section (no menu appears
> when they are selected). The rounded bottom line is not added to them. The
> other two tabs show a menu when they are selected. The rounded bottom line is
> added to these menus.
> 
> Please, tell me if you need some more info.
> 

Hmm, see what I asked for: 

> Vicent
> 
> 2009/4/2 Thorsten Scherler <th...@juntadeandalucia.es>:
> > On Wed, 2009-04-01 at 16:41 +0200, Vicent Mas wrote:
> >> Hi,
> >>...
> > To give you a quick feedback, please can you send/point me to the
> > responsible code in skins that work.
> >
> > You should be able to do exactly the same in the dispatcher then in
> > skins. It seems some devs fixed the skins but did not apply the fix to
> > the dispatcher.

Meaning please see the code of skins that's treats this part of the
navigation. Further please point me to the dispatcher contract that you
patched. I am sorry that ATM I cannot be a bigger help and debug it
myself, but too much other commitments are eating my time.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source <consulting, training and solutions>


Re: problem with site.xml and tabs.xml: empty menus

Posted by Vicent Mas <uv...@gmail.com>.
Hi,

I've attached minimal versions of site.xml and tabs.xml. Tabs with id 'home',
'screenshots' and 'development' have no navigation section (no menu appears
when they are selected). The rounded bottom line is not added to them. The
other two tabs show a menu when they are selected. The rounded bottom line is
added to these menus.

Please, tell me if you need some more info.

Vicent

2009/4/2 Thorsten Scherler <th...@juntadeandalucia.es>:
> On Wed, 2009-04-01 at 16:41 +0200, Vicent Mas wrote:
>> Hi,
>>
>> finally I've fixed my problem. In my customisation layer I've done the
>> following changes:
>>
>> - in pelt-html.leftbar.panel.xml I've commented out the call to the
>> nav-section-round-bottom contract
>> - in nav-section.ft, I've added a template with the same functionality than the
>> nav-section-round-bottom contract. I've added too a conditional call to this
>> template: it is called from <xsl:template match='/'> when the condition
>> <xsl:if test="$nav-section/navigation/menu != ''"> is fulfilled
>>
>> In a few words, if a tab doesn't contain a navigation menu then the bottom is
>> not rounded. Probably this can be achieved in a much easier way (it works
>> fine if I use the skinconfig approach instead of the dispatcher) but, as a good
>> newbie, I cannot find it. Please tell me if you know a better solution.
>
> To give you a quick feedback, please can you send/point me to the
> responsible code in skins that work.
>
> You should be able to do exactly the same in the dispatcher then in
> skins. It seems some devs fixed the skins but did not apply the fix to
> the dispatcher.
>
> salu2
> --
> Thorsten Scherler <thorsten.at.apache.org>
> Open Source Java <consulting, training and solutions>
>
> Sociedad Andaluza para el Desarrollo de la Sociedad
> de la Información, S.A.U. (SADESI)
>
>
>
>
>



-- 
Share what you know, learn what you don't.

Re: problem with site.xml and tabs.xml: empty menus

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Wed, 2009-04-01 at 16:41 +0200, Vicent Mas wrote:
> Hi,
> 
> finally I've fixed my problem. In my customisation layer I've done the
> following changes:
> 
> - in pelt-html.leftbar.panel.xml I've commented out the call to the
> nav-section-round-bottom contract
> - in nav-section.ft, I've added a template with the same functionality than the
> nav-section-round-bottom contract. I've added too a conditional call to this
> template: it is called from <xsl:template match='/'> when the condition
> <xsl:if test="$nav-section/navigation/menu != ''"> is fulfilled
> 
> In a few words, if a tab doesn't contain a navigation menu then the bottom is
> not rounded. Probably this can be achieved in a much easier way (it works
> fine if I use the skinconfig approach instead of the dispatcher) but, as a good
> newbie, I cannot find it. Please tell me if you know a better solution.

To give you a quick feedback, please can you send/point me to the
responsible code in skins that work.

You should be able to do exactly the same in the dispatcher then in
skins. It seems some devs fixed the skins but did not apply the fix to
the dispatcher.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





Re: problem with site.xml and tabs.xml: empty menus

Posted by Vicent Mas <uv...@gmail.com>.
Hi,

finally I've fixed my problem. In my customisation layer I've done the
following changes:

- in pelt-html.leftbar.panel.xml I've commented out the call to the
nav-section-round-bottom contract
- in nav-section.ft, I've added a template with the same functionality than the
nav-section-round-bottom contract. I've added too a conditional call to this
template: it is called from <xsl:template match='/'> when the condition
<xsl:if test="$nav-section/navigation/menu != ''"> is fulfilled

In a few words, if a tab doesn't contain a navigation menu then the bottom is
not rounded. Probably this can be achieved in a much easier way (it works
fine if I use the skinconfig approach instead of the dispatcher) but, as a good
newbie, I cannot find it. Please tell me if you know a better solution.

Vicent

2009/3/31 Vicent Mas <uv...@gmail.com>:
> Hi,
>
> lately I've been reading a lot, struggling with the problem and I've
> now a better understanding of what the real issue is. My description
> was not correct. Tabs with no content (other than the file referenced
> by indexfile attribute) are not expanded when they are selected and do
> not show an empty menu. What is happening is that the round bottom of
> navigation menus is *always* added to the bottom of the selected tab,
> even if no menu has been expanded (it doesn't happen with the skin
> approach).
>
> I realized of that when I was editing a local copy of
> pelt-html.leftbar.panel.xml in order to do some customisations of my
> website. So I think that the essence of the problem is that the
> nav-section-round-bottom contract should be able to find out if a menu
> is being displayed (with whatever content, toc, message of the day...)
> or not. Unfortunately I don't know how to achieve this goal (it seems
> to me a complex task).
>
> In my website I've both tabs with menus and tabs without menus, so
> commenting out the call to the nav-section-round-bottom contract
> doesn't work for me. In summary, I still need help.
>
> On the other hand, although I've been reading a lot (including the
> tips section about this topic) maybe I've not doing something obvious
> or maybe there is a simpler way for doing what I want. If this is the
> case, please tell me.
>
> Vicent
>
> PS: the site.xml and tabs.xml included in my previous mail are not
> very important, you can reproduce the problem yourself with much
> simpler files.
>
> 2009/3/31 David Crossley <cr...@apache.org>:
>> Vicent Mas wrote:
>>>
>>> I'm a newbie. I recently intalled forrest-0.90 from svn and started playing
>>> with it. First I tried the skin approach. After some reading, I decided that
>>> using dispatcher was the way to go so I did. Now I've some problems that
>>> I don't know how to fix.
>>
>> Sorry, i don't have time yet to review your tabs and site config.
>>
>> Have you seen the tips about this general topic?
>> http://forrest.apache.org/faq.html#tab-site
>>
>> -David
>>
>
>
>
> --
> Share what you know, learn what you don't.
>



-- 
Share what you know, learn what you don't.

Re: problem with site.xml and tabs.xml: empty menus

Posted by Vicent Mas <uv...@gmail.com>.
Hi,

lately I've been reading a lot, struggling with the problem and I've
now a better understanding of what the real issue is. My description
was not correct. Tabs with no content (other than the file referenced
by indexfile attribute) are not expanded when they are selected and do
not show an empty menu. What is happening is that the round bottom of
navigation menus is *always* added to the bottom of the selected tab,
even if no menu has been expanded (it doesn't happen with the skin
approach).

I realized of that when I was editing a local copy of
pelt-html.leftbar.panel.xml in order to do some customisations of my
website. So I think that the essence of the problem is that the
nav-section-round-bottom contract should be able to find out if a menu
is being displayed (with whatever content, toc, message of the day...)
or not. Unfortunately I don't know how to achieve this goal (it seems
to me a complex task).

In my website I've both tabs with menus and tabs without menus, so
commenting out the call to the nav-section-round-bottom contract
doesn't work for me. In summary, I still need help.

On the other hand, although I've been reading a lot (including the
tips section about this topic) maybe I've not doing something obvious
or maybe there is a simpler way for doing what I want. If this is the
case, please tell me.

Vicent

PS: the site.xml and tabs.xml included in my previous mail are not
very important, you can reproduce the problem yourself with much
simpler files.

2009/3/31 David Crossley <cr...@apache.org>:
> Vicent Mas wrote:
>>
>> I'm a newbie. I recently intalled forrest-0.90 from svn and started playing
>> with it. First I tried the skin approach. After some reading, I decided that
>> using dispatcher was the way to go so I did. Now I've some problems that
>> I don't know how to fix.
>
> Sorry, i don't have time yet to review your tabs and site config.
>
> Have you seen the tips about this general topic?
> http://forrest.apache.org/faq.html#tab-site
>
> -David
>



-- 
Share what you know, learn what you don't.

Re: problem with site.xml and tabs.xml: empty menus

Posted by David Crossley <cr...@apache.org>.
Vicent Mas wrote:
> 
> I'm a newbie. I recently intalled forrest-0.90 from svn and started playing
> with it. First I tried the skin approach. After some reading, I decided that
> using dispatcher was the way to go so I did. Now I've some problems that
> I don't know how to fix.

Sorry, i don't have time yet to review your tabs and site config.

Have you seen the tips about this general topic?
http://forrest.apache.org/faq.html#tab-site

-David