Bugs item #1010133, was opened at 2004-08-16 16:49
Message generated for change (Comment added) made by garpinc
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=1010133&group_id=73068
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Garry (garpinc)
Assigned to: Nobody/Anonymous (nobody)
Summary: Dynamic Multiple tables on one page not working
Initial Comment:
Temporary work around for rc2
1) change tld file to point to your new class
<tagclass>org.displaytag.tags.TableTag2</tagclass>
2) add attribute
<attribute>
<!--An implicit variable of this name will be created and
placed into NESTED scope. The object is also
added to pageContext under this name.-->
<name>tableId</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
3) Put below class in your project
-----------------------
NB: Developers should implement fix differently probably
in
private String encodeParameter(String parameterName);
method
/*
* TableTag2.java
*
* Copyright 2004 by Electronic Data Systems
* Corporation. All rights reserved.
*
* An unpublished work created Aug 5, 2004, 2004. This
work is a
* trade secret of EDS and unauthorized use or copying
* is prohibited.
*
*/
package org.displaytag.tags;
import java.lang.reflect.Field;
import org.displaytag.util.ParamEncoder;
/**
* @author jztb88
*
* TODO To change the template for this generated
type comment go to
* Window - Preferences - Java - Code Style - Code
Templates
*/
public class TableTag2 extends TableTag {
private String tableId;
/**
* @return Returns the tableId.
*/
public String getTableId() {
return tableId;
}
/**
* @param tableId The tableId to set.
*/
public void setTableId(String tableId) {
try {
Field fld =
TableTag.class.getDeclaredField("paramEncoder");
fld.setAccessible(true);
if (fld.get(this) == null) {
fld.set(this,new
ParamEncoder(this.id + this.tableId));
}
} catch (SecurityException e) {
// TODO Auto-generated
catch block
e.printStackTrace();
} catch (NoSuchFieldException e) {
// TODO Auto-generated
catch block
e.printStackTrace();
} catch (IllegalArgumentException e)
{
// TODO Auto-generated
catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated
catch block
e.printStackTrace();
}
this.tableId = tableId;
}
}
----------------------------------------------------------------------
>Comment By: Garry (garpinc)
Date: 2004-08-16 16:51
Message:
Logged In: YES
user_id=712000
Sorry about the copyright notice. Obviously not applicable....
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=1010133&group_id=73068
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel