History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-591
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Mike Cannon-Brookes
Reporter: Florian Rosenberg
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

Wrong output when using nesting #bodytags (with a custom tag)

Created: 11/Jul/04 05:27 AM   Updated: 03/Jul/05 11:55 AM
Component/s: Views
Affects Version/s: 2.1
Fix Version/s: 2.2

Environment: Linux, Tomcat 5.0.18


 Description  « Hide
There is a problem with simple custom tags. I have a GroupingTag which encapsulates a simple fieldset tag from
html. Its derived from AbstractClosingUITag.

Here is the code:
=================
package com.foo.package;

import com.opensymphony.webwork.views.jsp.ui.AbstractClosingUITag;
import com.opensymphony.xwork.util.OgnlValueStack;

public class GroupingTag extends AbstractClosingUITag {

public final static String OPEN_TEMPLATE = "s1_grouping.vm";
  public final static String TEMPLATE = "s1_grouping_end.vm";

private String legend;

public String getDefaultOpenTemplate() {
     return OPEN_TEMPLATE;
  }

protected String getDefaultTemplate() {
     return TEMPLATE;
  }

public void setLegend(String legend) {
     this.legend = legend;
  }

protected void evaluateParams(OgnlValueStack stack) {
     super.evaluateParams(stack);
     if (legend != null) {
        addParameter("legend", findValue(legend, String.class));
     }
  }
}

This tag works fine for ordering and logical grouping of different
parts on my pages. I use them in this way:

#bodytag (Grouping "id=msGrp" "legend='The legend of the tag'" )
some stuff to be grouped togehter ;-)
#end

but when i try to use it the groupings in a NESTED way, the nested one
is at the beginning of the outer grouping not where it should
be..........in other words, the output is flattened not nested.

 All   Comments   Change History      Sort Order:
Patrick Lightbody - [21/Jul/04 12:46 PM ]
Mike was working on this and had fixed it for 2.1. Unfortunately, the fix broke a bunch of other stuff and we reverted the change. But I think Mike is planning to fix it correctly soon.

Patrick Lightbody - [03/Jul/05 11:55 AM ]
This has been for the WebWork UI tags _only_. For other JSP tags, we won't be supporting them. In fact, all the JSP tag support in Velocity is deprecated as of 2.2 and will be removed probably before 3.0. It is just too "flakey" to get working. We recommend you use FreeMarker if you need this.