[richfaces-issues] [JBoss JIRA] Reopened: (RF-2302) Component control generates unnecessary JavaScript on page when attachTo attribute is not defined

Mikhail Vitenkov (JIRA) jira-events at lists.jboss.org
Tue Apr 14 10:09:23 EDT 2009


     [ https://jira.jboss.org/jira/browse/RF-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Vitenkov reopened RF-2302:
----------------------------------

      Assignee: Nick Belaevski  (was: Tsikhon Kuprevich)


Unnecessary code still rendered:
<a href="#" onclick="Richfaces.componentControl.performOperation(event,'#myModalPanel','show',{},true)">
My Link
<script type="text/javascript"><!--
//<![CDATA[
 Richfaces.onAvailable('', function()
{
    Richfaces.componentControl.attachEvent('#', 'onclick', '#myModalPanel', 'show', function() { return {}; }, true);
 });//]]>
//--></script></a>

> Component control generates unnecessary JavaScript on page when attachTo attribute is not defined
> -------------------------------------------------------------------------------------------------
>
>                 Key: RF-2302
>                 URL: https://jira.jboss.org/jira/browse/RF-2302
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.1.4
>         Environment: jboss-4.2.2.GA
>            Reporter: Michael Case
>            Assignee: Nick Belaevski
>            Priority: Minor
>             Fix For: 3.3.1
>
>
> Per the Component Control docs (http://livedemo.exadel.com/richfaces-demo/richfaces/componentControl.jsf?c=componentControl) when the attachTo attribute is not defined the event is attached to the parent component.  While this behavior does work correctly it still appends the "Richfaces.componentControl.attachEvent........." JavaScript code which is completely unnecessary.
> Example Source:
> <h:outputLink value="#">
> My Link
> <rich:componentControl for="myModalPanel" operation="show" event="onclick" disableDefault="true"/>
> </h:outputLink>
> Example Expected Result:
> <a href="#" onclick="Richfaces.componentControl.performOperation(event,'#myModalPanel','show',{},true)">My Link</a>
> Example Actual Result:
> <a href="#" onclick="Richfaces.componentControl.performOperation(event,'#myModalPanel','show',{},true)">My Link<script type="text/javascript">//<![CDATA[
>  {
> Richfaces.componentControl.attachEvent(
> 	'#', 'onclick', '#myModalPanel', 'show', {}, true );
>  
> }
> //]]></script></a>
>  

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

        



More information about the richfaces-issues mailing list