Hi Hiren,

The AppManifest is quite simple, but I think it's not well enough
documented because you are not the first to scratch your head.

Stepping back... we used to use "isis.services" configuration property to
provide a list of packages to go searching for domain services.  This same
list of packages is also now used to search for mixins (and domain
entities, and fixture scripts).

A module is just a class (any old class currently, can be empty) whose role
is merely to identify a package.

So, getModules() returns a list of classes, and from those classes the
framework determines a list of packages.  These are in effect the value of
"isis.services" config property.

The first thing to do then is just to check that your mixin isn't in some
peculiar package that isn't in this list.  That is, it needs to be in the
package (or a subpackage) of either DomainAppDomainModule.class or
PortalModuleAppModule.class.

(This is why Jeroen was asking for the package names of these classes and
of your mixin).

If that checks out ok, then I'm a bit stumped; the code you initially
showed looked ok to me.  If you can provide me access with a git repo (or a
test case repo) then I'll take a deeper look.

HTH
Dan


~~~~~~~~~~~~

On 5 July 2016 at 14:48, Hiren Budhrani <[email protected]> wrote:

> Hey Dan,
>
>
> Thanks for the tip. I found the app manifest but I am not sure what I am
> looking for. If it helps, I ran the [1]ToDoApp today and mixins work there.
>
>
> This is the getModules function in the appmanifest of the ToDoApp
>
> @Override
> public List<Class<?>> getModules() {
>     return Arrays.asList(
>             ToDoAppDomainModule.class,
>             ToDoAppFixtureModule.class,
>             ToDoAppAppModule.class,
>             org.isisaddons.module.audit.AuditModule.class,
>             org.isisaddons.module.command.CommandModule.class,
>             org.isisaddons.module.docx.DocxModule.class,
>             org.isisaddons.module.togglz.TogglzModule.class,
>             org.isisaddons.module.publishing.PublishingModule.class,
>             org.isisaddons.module.sessionlogger.SessionLoggerModule.class,
>             org.isisaddons.module.security.SecurityModule.class,
>             org.isisaddons.module.settings.SettingsModule.class,
>
> org.isisaddons.wicket.gmap3.cpt.service.Gmap3ServiceModule.class
>     );
> }
>
>
> And the getModules of my app:
>
> @Override
> public List<Class<?>> getModules() {
>     return Arrays.asList(
>             DomainAppDomainModule.class,
>             PortalModuleAppModule.class
>     );
> }
>
>
>
> Could the problem lie here?
>
>
> Thanks,
>
> Hiren
>
>
> [1] https://github.com/isisaddons/isis-app-todoapp?
>
>
> On 07/04/2016 05:39 PM, Dan Haywood wrote:
>
> At a quick glance, looks correct.
>
> Is your mixin in a package or subpackage of one of your modules defined in
> your app manifest?. The modules define where we do the classpath scanning.
>
> -- Dan
> On 4 Jul 2016 16:28, "Hiren Budhrani" <[email protected]><mailto:
> [email protected]> wrote:
>
> Hi all,
>
> I need to add a collection to 2 separate classes. So I defined a mixin
> class to expose the collection and have the 'destination' classes implement
> an (empty) interface that is initialized in the mixin's constructor. After
> that, the method used to render the collection is defined.
>
> The mixin class is shown below:
>
> @Mixin public class FixedPorting_portingNumbers {
>
>     private final FixedPortingfixedPorting;
>     public FixedPorting_portingNumbers(FixedPorting porting)
>     {
>         this.fixedPorting = porting;
>     }
>
>     @ActionLayout(contributed = Contributed.AS_ASSOCIATION)
>     @Action(semantics = SemanticsOf.SAFE)
>     @CollectionLayout(render = RenderType.EAGERLY)
>     public List<AbstractPhoneNumber> $$()
>     {
>         return phoneNumberService.listAll();
>     }
>
>     @Inject PhoneNumbersphoneNumberService;
> }
>
> From what I understood, the collection "Porting Numbers" would appear on a
> class that implements "FixedPorting" but that is not the case. Are there
> any steps I am missing?
>
> Thanks for any advice,
>
>
>
>
> --
> Hiren Budhrani
>
> Intern Service Desk Optimization | Pocos bv
>
> Pocos-Logo-Powering-briefpapier
>
> T+M: 088-0100721 |  [email protected]<mailto:[email protected]>|
> Sales: [email protected]<mailto:[email protected]> | Service:
> [email protected]<mailto:[email protected]>
>
> www.pocos.nl<http://www.pocos.nl> | Croy 9c, 5653 LC Eindhoven | Kamer
> van Koophandel 17097024 | btn_in_20x15twitter
>

Reply via email to