You would also need to modify the code that generates the HTML for the 
tag. That change you made makes the TableTag object aware of the new 
attribute, but unless you add code to use that value somewhere, it won't 
be used.


On Tue, 27 Jan 2004, Mehta, Jasmin wrote:

> Hi,
> 
> Right now the the display table tag is like <display:table 
> name="sessionScope.projectList" pagesize="10">. It has 'pagesize' and 'name' 
> parameters. Now I want to add my own new parameter 'bodyHeight'. I have added one 
> class variable and method in TableTag.java file.
> 
> /**
>      *  TBODY height - reset in doEndTag()
>      *  Added by Jasmin Mehta
>      */
>     private int mBodyHeight = 0;
> 
>  /**
>      * Method setBodyHeight
>      * @param pStringValue String
>      * @throws InvalidTagAttributeValueException if value is not a valid integer
>      */
>     public void setBodyHeight(String pStringValue) throws 
> InvalidTagAttributeValueException
>     {
> 
>         try
>         {
>             mBodyHeight = Integer.parseInt(pStringValue);
>         }
>         catch (NumberFormatException e)
>         {
>             throw new InvalidTagAttributeValueException(getClass(), "bodyHeight", 
> pStringValue);
>         }
> 
>     }
> 
> 
> I was expecting that if I write below line in my JSP file than
> 
>   <display:table name="sessionScope.projectList" bodyHeight="100" class="tblMain">   
>                           
> 
> It should be converted in below line if I do view source on generated HTML code
> 
> <table bodyHeight="100" bodyHeight="100" class="tblMain">.
> 
> But it is not adding the parameter 'bodyHeight' in <table> tag, its just genereating
> 
> <table bodyHeight="100" class="tblMain"> 
> 
> tag instead.
> 
> After modifying TableTag.java file as above, I have updated displaytag-1.0-b1.jar 
> file. 
> 
> Where else, what other classes do I need to modify in order to get my expected 
> result.
> 
> Thanks
> Jasmin
>                                
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> displaytag-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/displaytag-devel
> 

-- 
John York
Software Engineer
CareerSite Corporation



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to