[JBoss JIRA] (RF-13114) PoC: port RichFaces 4.5 UI Components to work with RichFaces 5
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13114?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13114:
---------------------------------
We must make sure that the RF 4.5 components' javascripts sources won't conflict with RF 5 ones and vice-versa - resource names are different, however at javascript level, objects will conflict mainly on {{RichFaces.ui}} object.
> PoC: port RichFaces 4.5 UI Components to work with RichFaces 5
> --------------------------------------------------------------
>
> Key: RF-13114
> URL: https://issues.jboss.org/browse/RF-13114
> Project: RichFaces
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Reporter: Lukáš Fryč
> Assignee: Michal Petrov
> Fix For: 5.0.0.Alpha2
>
> Original Estimate: 1 week
> Remaining Estimate: 1 week
>
> * open branches in own fork of
> ** richfaces5 (master)
> ** richfaces-components (4.5.x)
> ** richfaces-showcase (master)
> * modifications required
> ** change RF5 namespace -> http://richfaces.org/core
> ** change parents/bom in components 4.5 to depend on RF5 framework / build-bom
> *** remove all dependencies on 4.3.x (4.3.3-SNAPSHOT)
> ** change Java API of Components 4.5 to depend on RF5 Core API
> ** use the RF5 and RF4.5 UI Components in Showcase branch (4.5.0-SNAPSHOT)
--
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
12 years, 7 months
[JBoss JIRA] (RF-12936) Use jQuery in non-conflicting way
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-12936?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč updated RF-12936:
----------------------------
Description:
The {{richfaces.js}} references both, {{jQuery}} from closure and global {{$}} - this issue is addressed in RF-12833.
However jQuery should not be used directly, rather from closures - prefered way is to use {{$}} but its naming now conflicts with {{RichFaces.$}} for component references.
I suggest to use following trick:
{code:title=richfaces.js}
RichFaces.jQuery = RichFaces.jQuery || jQuery;
//encapsulation
(function($, rf) {
// free to use $ here
}(RichFaces.jQuery, RichFaces));
{code}
It will allow:
* provide own jQuery for RichFaces
* use libraries which make use of {{$}} (prototype, other jQuery versions) in no-conflicting way
was:
The {{richfaces.js}} references both, {{jQuery}} from closure and global {{$}} - this issue is addressed in RF-12833.
However jQuery should not be used directly, rather from closures - prefered way is to use {{$}} but its naming now conflicts with {{RichFaces.$}} for component references.
I suggest to use following trick:
{code:title=richfaces.js}
RichFaces.jQuery = RichFaces.jQuery || jQuery;
//encapsulation
(function($, RichFaces) {
// free to use $ here
}(RichFaces.jQuery, RichFaces));
{code}
It will allow:
* provide own jQuery for RichFaces
* use libraries which make use of {{$}} (prototype, other jQuery versions) in no-conflicting way
> Use jQuery in non-conflicting way
> ---------------------------------
>
> Key: RF-12936
> URL: https://issues.jboss.org/browse/RF-12936
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.3.1
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Fix For: 5.0.0.Alpha2
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> The {{richfaces.js}} references both, {{jQuery}} from closure and global {{$}} - this issue is addressed in RF-12833.
> However jQuery should not be used directly, rather from closures - prefered way is to use {{$}} but its naming now conflicts with {{RichFaces.$}} for component references.
> I suggest to use following trick:
> {code:title=richfaces.js}
> RichFaces.jQuery = RichFaces.jQuery || jQuery;
> //encapsulation
> (function($, rf) {
> // free to use $ here
> }(RichFaces.jQuery, RichFaces));
> {code}
> It will allow:
> * provide own jQuery for RichFaces
> * use libraries which make use of {{$}} (prototype, other jQuery versions) in no-conflicting way
--
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
12 years, 7 months
[JBoss JIRA] (RF-12930) Rename RichFaces.$ to less ambiguous RichFaces.component
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-12930?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-12930:
---------------------------------
{code}
git ls-files | xargs -L 1 sed -ri 's#RichFaces\.\$\(#RichFaces.component(#g'
git ls-files | xargs -L 1 sed -ri 's#richfaces\.\$\(#richfaces.component(#g'
git ls-files | xargs -L 1 sed -ri 's#rf\.\$\(#rf.component(#g'
{code}
> Rename RichFaces.$ to less ambiguous RichFaces.component
> --------------------------------------------------------
>
> Key: RF-12930
> URL: https://issues.jboss.org/browse/RF-12930
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: core
> Reporter: Brian Leathem
> Assignee: Lukáš Fryč
> Fix For: 5.0.0.Alpha2, 4.5.0.Alpha1
>
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> Possibly rename it to RichFaces.findComponent
--
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
12 years, 7 months