Santosh Ramachandrula wrote:
> Hello,
> Can I pass a parameter to the constructor of a sub classed
> TableDecorator from JSP? If yes, how?
>
> For example
>
> <display:table name="collection" id="parent"
>
>
> decorator="com.SearchResultsTOWrapper(<parameter>)"
>
> >
>
> Thanks,
>
I don't think that you can. Depending on the cardinality of your
parameter you could create subclasses of your decorator that sets up the
class as if the parameter had been passed to the decorator:
public class MyDecorator {
protected String importantSetting = "";
public MyDecorator() {
importantSetting = "default";
}
//... rest of decorator's methods
}
public class MySpecialDecorator extends MyDecorator {
public MySpecialDecorator() {
importantSetting = "special";
}
}
Ed!
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user