
|
If you were logged in you would be able to see more operations.
|
|
|
WebWork
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
|
|
|
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.
|
|
Description
|
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. |
Show » |
|