cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34802] New: - PageLabelLinkService genereate wrong url when using 3 layer tab combine showallnav.
Date Sun, 08 May 2005 07:52:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34802>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34802

           Summary: PageLabelLinkService genereate wrong url when using 3
                    layer tab combine showallnav.
           Product: Cocoon 2
           Version: Current SVN 2.1
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: blocks
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: roy_huang@nbmgroup.com


I want portal using Windows-like menu,follow define in cocoon.xconf,I have 
define 3 tab like:
			<layout 
class="org.apache.cocoon.portal.layout.impl.CompositeLayoutImpl" item-
class="org.apache.cocoon.portal.layout.NamedItem" name="tab">
				<renderers default="tab">
					<renderer name="tab" />
				</renderers>
			</layout>
			<layout 
class="org.apache.cocoon.portal.layout.impl.CompositeLayoutImpl" item-
class="org.apache.cocoon.portal.layout.NamedItem" name="tab2">
				<renderers default="tab2">
					<renderer name="tab2" />
				</renderers>
			</layout>
			<layout 
class="org.apache.cocoon.portal.layout.impl.CompositeLayoutImpl" item-
class="org.apache.cocoon.portal.layout.NamedItem" name="tab3">
				<renderers default="tab3">
					<renderer name="tab3" />
				</renderers>
			</layout>
and 
		<renderer 
class="org.apache.cocoon.portal.layout.renderer.impl.AspectRenderer" 
logger="portal" name="tab">
			<aspects>
				<aspect type="xslt">
					<parameter name="style" value="{portal-
skin:skin.basepath}/styles/tab.xsl"/>
	
				</aspect>
				<aspect type="parameter">
					<parameter name="tag-name" value="tab-
layout" />
				</aspect>
				<aspect type="history" />
				<aspect type="tab-content">
					<parameter name="root-tag" 
value="false" />
					<parameter name="store" 
value="session" />
					<parameter name="child-tag-name" 
value="tab2-layout" />
				</aspect>
			</aspects>
		</renderer>
		<renderer 
class="org.apache.cocoon.portal.layout.renderer.impl.AspectRenderer" 
logger="portal" name="tab2">
			<aspects>
				<aspect type="xslt">
					<parameter name="style" value="{portal-
skin:skin.basepath}/styles/tab2.xsl"/>
					
				</aspect>
				<aspect type="parameter">
					<!--parameter name="tag-name" 
value="tab-layout"/-->
					<parameter name="tag-name" value="tab2-
layout" />
				</aspect>
				<aspect type="history" />
				<aspect type="tab-content">
					<parameter name="root-tag" 
value="false" />
					<parameter name="store" 
value="session" />
					<parameter name="child-tag-name" 
value="tab3-layout" />
				</aspect>
			</aspects>
		</renderer>
		<renderer 
class="org.apache.cocoon.portal.layout.renderer.impl.AspectRenderer" 
logger="portal" name="tab3">
			<aspects>
				<aspect type="xslt">
					<parameter name="style" value="{portal-
skin:skin.basepath}/styles/tab3.xsl"/>
				</aspect>
				<aspect type="parameter">
					<!--parameter name="tag-name" 
value="tab-layout"/-->
					<parameter name="tag-name" value="tab3-
layout" />
				</aspect>
				<aspect type="history" />
				<aspect type="tab-content">
					<parameter name="root-tag" 
value="false" />
					<parameter name="store" 
value="session" />
				</aspect>
			</aspects>
		</renderer>

I use 3 layer menu,like 
1 1.1 1.1.1 2 2.1 2.1.1 ...
If the first layer isn't selected,all's fine.
But if the first layer is selected,for example:
current selected tab is 2.1.1
then 2.1.2 is ok
but 2.2.1 is wrong,it's url is:
http://localhost:8080/v2/dev/portal?pageLabel=2.1
missing the first layer 2.
I studied the source PageLableLinkService.java in current SVN,line 166,change
    value.append(((NamedItem)item).getName());
to:
                    if(value.length()>0)
                    	value.append(((NamedItem)item).getName());
                    else{
                        StringBuffer key = new StringBuffer("");
                	getKey(item, key);
                	value.append(key.toString());
                    }
can solve this problem.Please check it out and find if there a better solution.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message