Re: Question about module-path-prefix
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 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 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: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Question about module-path-prefix
Hi Thiago, yes, you're completely right, I missed for one oy my component libs and now it works! Thanks for your explanations! Regards, Erich Am 19.03.2018 20:13, schrieb Thiago H. de Paula Figueiredo: On Mon, Mar 19, 2018 at 12:13 PM, Erich Gormann wrote: It seems using library mappings is not the correct way to address pages. I'm sorry, but your statement above is incorrect. Library mappings is still the correct way to address pages. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Question about module-path-prefix
On Mon, Mar 19, 2018 at 12:13 PM, Erich Gormann wrote: > It seems using library mappings is not the correct way to address pages. I'm sorry, but your statement above is incorrect. Library mappings is still the correct way to address pages. -- Thiago
Re: Question about module-path-prefix
One typo: And nothing related to component libraries *changed*. On Mon, Mar 19, 2018 at 4:10 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, Mar 19, 2018 at 12:13 PM, Erich Gormann > wrote: > >> Hello all, >> > > Hi! > > >> >> 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. >> > > This is about a prefix for the whole application, not just one component > library, so you can have your Tapestry application root URL at /xxx, for > example, instead of /. > > >> My question: I have a number of different Tapestry application modules >> bundled in jars and I want to navigate between their pages. >> > > To be pedantic, you have component libraries, not application modules. And > nothing related to component libraries changes. > > -- > Thiago > -- Thiago
Re: Question about module-path-prefix
On Mon, Mar 19, 2018 at 12:13 PM, Erich Gormann wrote: > Hello all, > Hi! > > 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. > This is about a prefix for the whole application, not just one component library, so you can have your Tapestry application root URL at /xxx, for example, instead of /. > My question: I have a number of different Tapestry application modules > bundled in jars and I want to navigate between their pages. > To be pedantic, you have component libraries, not application modules. And nothing related to component libraries changes. -- Thiago
Re: Question about module-path-prefix
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 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 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: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Question about module-path-prefix
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: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org