You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Aleksandar Nikolov (JIRA)" <ji...@apache.org> on 2011/05/23 16:50:47 UTC

[jira] [Created] (TAP5-1530) Library of mixins

Library of mixins
-----------------

                 Key: TAP5-1530
                 URL: https://issues.apache.org/jira/browse/TAP5-1530
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.2.5
            Reporter: Aleksandar Nikolov


I had developed a library of several mixins in Tapestry v.5.1.0.5. Classes are packed by maven in a jar file and added to the main project as a maven dependency. It worked pretty well with Tapestry 5.1.0.5.
I followed the rules at http://tapestry.apache.org/component-libraries.html and the eldest http://tapestry.apache.org/tapestry5/cookbook/lib.html.


Now I am trying to migrate the library to Tapestry 5.2.5, but found a problem in loading mixins in the main project:


Case 1: When I use "core" library mapping in library module class:

    public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration) {
        configuration.add(new LibraryMapping("core", "com.mylib"));
    }

 and template code like this: "<t:pagelink page="index" t:mixins="myMixin">...</t:pagelink>" then the following exception is thrown:

Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Unable to resolve 'myMixin' to a mixin class name.
    at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$7.invoke(ComponentClassResolverImpl.java:516)
    at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$7.invoke(ComponentClassResolverImpl.java:511)
    at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
    at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.resolveMixinTypeToClassName(ComponentClassResolverImpl.java:509)
    at $ComponentClassResolver_1301a3347ae.resolveMixinTypeToClassName($ComponentClassResolver_1301a3347ae.java)
    at org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.<init>(EmbeddedComponentAssemblerImpl.java:110)
    at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.createEmbeddedAssembler(ComponentAssemblerImpl.java:276)
    ... 106 more

Case 2: When I use another (my own) library mapping name and template code like this: "<t:pagelink page="index" w:mixins="myMixin">...</t:pagelink>" then Tapestry acts as the mixins is not attached to the Pagelink. Just nothing happens.

The only workaround I found is to move the mixins from the library to the main project. Then all mixins can be attached. The problem appears only when the mixins are placed in external library.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (TAP5-1530) Library of mixins

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiago H. de Paula Figueiredo closed TAP5-1530.
-----------------------------------------------

    Resolution: Invalid

Hi!

Please post on the dev or user mailing list before posting a bug.

Since 5.2 it's not possible to add a library with a "core" mapping.
<t:pagelink page="index" w:mixins="myMixin">...</t:pagelink> is wrong: it should be t:mixins, not w:mixins.

Cheers!

Thiago

> Library of mixins
> -----------------
>
>                 Key: TAP5-1530
>                 URL: https://issues.apache.org/jira/browse/TAP5-1530
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.5
>            Reporter: Aleksandar Nikolov
>
> I had developed a library of several mixins in Tapestry v.5.1.0.5. Classes are packed by maven in a jar file and added to the main project as a maven dependency. It worked pretty well with Tapestry 5.1.0.5.
> I followed the rules at http://tapestry.apache.org/component-libraries.html and the eldest http://tapestry.apache.org/tapestry5/cookbook/lib.html.
> Now I am trying to migrate the library to Tapestry 5.2.5, but found a problem in loading mixins in the main project:
> Case 1: When I use "core" library mapping in library module class:
>     public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration) {
>         configuration.add(new LibraryMapping("core", "com.mylib"));
>     }
>  and template code like this: "<t:pagelink page="index" t:mixins="myMixin">...</t:pagelink>" then the following exception is thrown:
> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Unable to resolve 'myMixin' to a mixin class name.
>     at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$7.invoke(ComponentClassResolverImpl.java:516)
>     at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$7.invoke(ComponentClassResolverImpl.java:511)
>     at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
>     at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.resolveMixinTypeToClassName(ComponentClassResolverImpl.java:509)
>     at $ComponentClassResolver_1301a3347ae.resolveMixinTypeToClassName($ComponentClassResolver_1301a3347ae.java)
>     at org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.<init>(EmbeddedComponentAssemblerImpl.java:110)
>     at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.createEmbeddedAssembler(ComponentAssemblerImpl.java:276)
>     ... 106 more
> Case 2: When I use another (my own) library mapping name and template code like this: "<t:pagelink page="index" w:mixins="myMixin">...</t:pagelink>" then Tapestry acts as the mixins is not attached to the Pagelink. Just nothing happens.
> The only workaround I found is to move the mixins from the library to the main project. Then all mixins can be attached. The problem appears only when the mixins are placed in external library.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (TAP5-1530) Library of mixins

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiago H. de Paula Figueiredo closed TAP5-1530.
-----------------------------------------------

    Resolution: Invalid

Hi!

Please post on the dev or user mailing list before posting a bug.

Since 5.2 it's not possible to add a library with a "core" mapping.
<t:pagelink page="index" w:mixins="myMixin">...</t:pagelink> is wrong: it should be t:mixins, not w:mixins.

Cheers!

Thiago

> Library of mixins
> -----------------
>
>                 Key: TAP5-1530
>                 URL: https://issues.apache.org/jira/browse/TAP5-1530
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.5
>            Reporter: Aleksandar Nikolov
>
> I had developed a library of several mixins in Tapestry v.5.1.0.5. Classes are packed by maven in a jar file and added to the main project as a maven dependency. It worked pretty well with Tapestry 5.1.0.5.
> I followed the rules at http://tapestry.apache.org/component-libraries.html and the eldest http://tapestry.apache.org/tapestry5/cookbook/lib.html.
> Now I am trying to migrate the library to Tapestry 5.2.5, but found a problem in loading mixins in the main project:
> Case 1: When I use "core" library mapping in library module class:
>     public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration) {
>         configuration.add(new LibraryMapping("core", "com.mylib"));
>     }
>  and template code like this: "<t:pagelink page="index" t:mixins="myMixin">...</t:pagelink>" then the following exception is thrown:
> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Unable to resolve 'myMixin' to a mixin class name.
>     at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$7.invoke(ComponentClassResolverImpl.java:516)
>     at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$7.invoke(ComponentClassResolverImpl.java:511)
>     at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
>     at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.resolveMixinTypeToClassName(ComponentClassResolverImpl.java:509)
>     at $ComponentClassResolver_1301a3347ae.resolveMixinTypeToClassName($ComponentClassResolver_1301a3347ae.java)
>     at org.apache.tapestry5.internal.pageload.EmbeddedComponentAssemblerImpl.<init>(EmbeddedComponentAssemblerImpl.java:110)
>     at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.createEmbeddedAssembler(ComponentAssemblerImpl.java:276)
>     ... 106 more
> Case 2: When I use another (my own) library mapping name and template code like this: "<t:pagelink page="index" w:mixins="myMixin">...</t:pagelink>" then Tapestry acts as the mixins is not attached to the Pagelink. Just nothing happens.
> The only workaround I found is to move the mixins from the library to the main project. Then all mixins can be attached. The problem appears only when the mixins are placed in external library.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira