Re: Question about module-path-prefix

Erich Gormann <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <[email protected]>
Hi Cezary,

thanks a lot, yes it works now again, I was just confused and overwelmed 
by the Tapestry migration...

Regards, Erich

Am 19.03.2018 20:08, schrieb Cezary Biernacki:
> Hi Erich,
> I have a similar Tapestry 5.4 application with multiple modules in
> different JARs. The application contributes LibraryMappings to
> ComponentClassResolver, to tell Tapestry what are roots for module
> packages, e.g.:
>
>      @Contribute(ComponentClassResolver.class)
>      public static void addMappings(Configuration<LibraryMapping>
> configuration) {
>          configuration.add(new LibraryMapping("usermgmt",
> "com.example.usermgmt"));
>          configuration.add(new LibraryMapping("merchantmgmt",
> "com.example.merchantmgmt"));
>      }
>
> So you can put page "CreateUser" in com.example.usermgmt and ViewMerchant
> in com.example.merchantmgmt (it is secondary that they are in different
> JARs). Alternatively if your applications' root package for Tapestry is
> e.g. "com.example.app", you can just split pages in subpackages
> com.example.app.pages.usermgmt and  com.example.app.pages.merchantmgmt, it
> should not matter whether packages are in the same or different JARs
> (though I have not tested that).
>
> Best regards,
> Cezary
>
>
>
> On Mon, Mar 19, 2018 at 4:13 PM, Erich Gormann<[email protected]>  wrote:
>
>> Hello all,
>>
>> another question about Tapestry 5.4.x:
>>
>> I'm a little confused about some new configuration possibilities in
>> Tapestry 5.4.x. There is the new "module-path-prefix" entry.
>>
>> My question: I have a number of different Tapestry application modules
>> bundled in jars and I want to navigate between their pages.
>>
>> Lets imagine there is a module for merchant management and another for
>> user management.
>>
>> I want to call a pagelink for a page in the user management from the
>> merchant management and vice versa.
>>
>> Module A has a prefix "merchantmgmt" and module B a prefix "usermgmt".
>>
>> I want to have page links like "usermgmt/CreateUser" or
>> "merchantmgmt/ViewMerchant".
>>
>> How can I achieve that the best way in Tapestry 5.4? It seems using
>> library mappings is not the correct way to address pages. Must we use
>> "module-path-prefix", and if so, have we to put it in the FilterModule
>> class of each module?
>>
>> Regards
>> Erich
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.