[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635983#action_12635983
 ] 

Paul Rivera commented on TOMAHAWK-1343:
---------------------------------------

Hi Leonardo,

I've updated to the latest revision that has the changes you've committed and 
retested for both table and div layout.  I don't seem to find anything wrong 
with either of them.  I've attached test cases above for both div and table 
layouts which test almost all of its attributes.

The output for div layout is:
<div class="mystyleClass" style="mystyle;position: relative;" 
ondblclick="writeEvent('double click event');" 
onmousedown="writeEvent('mousedown event');" onmouseup="writeEvent('mouseup 
event');" onmouseover="writeEvent('mouseover event');" 
onmousemove="writeEvent('mousemove event');" onmouseout="writeEvent('mouseout 
event');" onkeypress="writeEvent('keypress event');" 
onkeydown="writeEvent('keydown event');" onkeyup="writeEvent('keyup event');" 
onclick="writeEvent('click event');" dir="ltr">...

The output for table layout is:
<table class="mystyleClass" style="mystyle;position: relative;border-collapse: 
collapse;" ondblclick="writeEvent('double click event');" 
onmousedown="writeEvent('mousedown event');" onmouseup="writeEvent('mouseup 
event');" onmouseover="writeEvent('mouseover event');" 
onmousemove="writeEvent('mousemove event');" onmouseout="writeEvent('mouseout 
event');" onkeypress="writeEvent('keypress event');" 
onkeydown="writeEvent('keydown event');" onkeyup="writeEvent('keyup event');" 
onclick="writeEvent('click event');" dir="ltr" cellpadding="0" 
cellspacing="0">...

They seem to have been rendered correctly.  Is there anything I'm missing?

Just an added note, if you use table layout, you should not supply a value for 
the size attribute (i.e. size should be null).  If size is not null, 
HtmlRoundedDivRenderer will render a div tag instead.  See code below from 
AbstractHtmlRoundedDiv.

    public Object getValue()
    {
        if ("table".equalsIgnoreCase(getLayout()) && getSize() == null)
        {
            return "table";
        }
        return "div";
    }

Perhaps this is what you are encountering?


> roundedDiv does not render passthrough attributes
> -------------------------------------------------
>
>                 Key: TOMAHAWK-1343
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1343
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8-SNAPSHOT
>         Environment: myfaces 1.1.7-snapshot
> tomahawk 1.1.8-snapshot
> tomahawk sandbox 1.1.8-snapshot
> tomcat 6.0.16
> java 1.6.0
>            Reporter: Paul Rivera
>            Assignee: Andrew Robinson
>         Attachments: HtmlRoundedDivRenderer.patch
>
>
> Except for style and styleClass, most of the passthrough attributes of 
> roundedDiv declared in the myfaces_sandbox.tld do not get rendered:
> Dir, lang, title,onclick, ondblclick, onkeydown, onkeypress, onkeyup, 
> onmousedown, onmousemove, onmouseout, onmouseover, onmouseup.
> Given this jsf code:
>   <s:roundedDiv
>       backgroundColor="#000000"
>       borderColor="#5599AA"
>       borderWidth="1"
>       color="#559911"
>       radius="100"
>       layout="table"
>       onmouseover="alert('mouseover event');"
>       onclick="alert('click event');"
>       style="mystyle"
>       styleClass="mystyleClass">
>       <h:outputText value="Contents" />
>   </s:roundedDiv>
> passthrough attributes onmouseover and onclick do not get rendered.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to