Stripes

layout-component without content doesn't override layout-component from layout page

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.4.3
  • Fix Version/s: None
  • Component/s: Tag Library
  • Labels:
    None
  • Environment:
    Tomcat 5.5

Description

For example. There's layout.jsp and two pages: page1.jsp and page2.jsp.

layout.jsp is simple

<s:layout-definition>
<s:layout-component name="com1">FIRST COMPONENT <br></s:layout-component>
<s:layout-component name="com2">SECOND COMPONENT <br></s:layout-component>
<s:layout-component name="content"/>
</s:layout-definition>

The idea is for page1.jsp to show both components (com1 and com2) and own content.
For page2.jsp idea is to show only com2 and not to show com1 component.

So for page1.jsp i'm doing following and it's working ok.

<s:layout-render name="/layout.jsp">
<s:layout-component name="content">PAGE1</s:layout-component>
</s:layout-render>

For page2.jsp i was going to do

<s:layout-render name="/layout.jsp">
<s:layout-component name="com1"/>
<s:layout-component name="content">PAGE2</s:layout-component>
</s:layout-render>

Since i've overriden the com1 component with empty tag i assumed the com1 won't be shown in resulting HTML.
But it is shown. To make it be hidden i needed to put some content into layout-component tag like this
<s:layout-component name="com1"> </s:layout-component>

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    27/Jun/07 5:06 AM
    Updated:
    19/Jan/08 2:47 PM