[ http://jira.codehaus.org/browse/DISPL-187?page=comments#action_42460 ] 

GongGunDoo commented on DISPL-187:
----------------------------------

Thanks!
This tip is very good for me.

It works fine.
But more source code will be needed.

Insert the following code also at   ..../org/displaytag/util/TagConstants.java 

    /**
     * html attribute <code>onmouseover</code>.
     */

    public static final String ATTRIBUTE_ONMOUSEOVER = "onmouseover"; 
//$NON-NLS-1$


Thanks!

- Gong


> Adding JavaScript event attribute support to display:column
> -----------------------------------------------------------
>
>          Key: DISPL-187
>          URL: http://jira.codehaus.org/browse/DISPL-187
>      Project: DisplayTag
>         Type: Improvement
>   Components: HTML Generation, Tag Library
>     Versions: 1.0
>     Reporter: Ben Shectman

>
> Original Estimate: 1 day
>         Remaining: 1 day
>
> I am attempting to extend the DisplayTag 1.0 library to include support for 
> JavaScript event attributes (e.g. onmouseover, onclick, etc/) to the 
> display:column tag.
> However, I have hit something of a road block.  After modifying the TLD, 
> ColumnTag.java and ColumnTagBeanInfo.java, I continue to receive an error 
> "Cannot find setter for attribute [x]".  What am I missing?  What else needs 
> to be changed?
> Here are examples of the changes I have made so far:
> In displaytag-12.tld, in the declarations for the column tag, I've added 
> attribute definitions like the following:
>       <attribute>
>             <name>onmouseover</name>
>             <required>false</required>
>             <rtexprvalue>true</rtexprvalue>
>             <type>java.lang.String</type>
>             <description>
>                 JavaScript onmouseover event attribute.
>             </description>
>         </attribute>
> In ColumnTag.java I've included setter methods for the various attributed, 
> like the following:
>     /**
>      * setter for the "onmouseover" tag attribute.
>      * @param value attribute value
>      */
>     public void setOnmouseover(String value)
>     {
>         this.attributeMap.put(TagConstants.ATTRIBUTE_ONMOUSEOVER, value);
>     }
> Finally, in the ColumnTagBeanInfo.java, I've included property descriptors, 
> like the following:
>     proplist.add(new PropertyDescriptor("onmouseover", //$NON-NLS-1$
>       ColumnTag.class, null, "setOnmouseover")); //$NON-NLS-1$ 
> Yet, I still get the setter not found exception when I try to use
>      
>      <display:column property="clientName" title="Company" sortable="true" 
> headerClass="t4 tableHeader" class="t5 tableCell" onmouseover="someFunc()" />
> Any help would be greatly appreciated!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to