[richfaces-issues] [JBoss JIRA] (RF-13550) Refactor bridge-base so that it will allow bridges to extend widgets

Lukáš Fryč (JIRA) issues at jboss.org
Fri Feb 14 14:28:28 EST 2014


Lukáš Fryč created RF-13550:
-------------------------------

             Summary: Refactor bridge-base so that it will allow bridges to extend widgets
                 Key: RF-13550
                 URL: https://issues.jboss.org/browse/RF-13550
             Project: RichFaces
          Issue Type: Enhancement
      Security Level: Public (Everyone can see)
          Components: component
    Affects Versions: 5.0.0.Alpha3
            Reporter: Lukáš Fryč


This will allow bridges to extend widget API and make it more natural for JSF users, e.g.:

Editor is now:
{code}
$.widget('rf.editorBridge', $.rf.bridgeBase,
{code}

but we want:
{code}
$.widget('rf.editorBridge', $.rich.editor,
{code}

On multiple inheritance in jQuery Widget Factory:
https://forum.jquery.com/topic/how-to-extend-a-widget-factory-widget-with-multiple-base-widgets

The way of extending API should be designed in that way that user calls e.g.:

{code}
#{r:component('editor')}.setValue();
{code}

but editor has (or rather should have) only a method which is named in jQuery Widget Factory style:
{code}
data('editor').value() / data('editor').value(newValue)
editor('value') / editor('value', newValue)
{code}

So, we want bridge to add the setValue/getValue API:
{code}
$.extend(widget), { setValue: ..., getValue: ...};
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list