mount recursive

View: New views
2 Messages — Rating Filter:   Alert me  

mount recursive

by christian.giambalvo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

 

is it possible to mount a package recursivly?

Let's assume following classes:

 

com.test.pages.TestClass1

com.test.pages.TestClass2

com.test.pages.subpackage.TestClass3

com.test.pages.subpackage.TestClass4

 

now i'd like to do mount("/pages",
PackageName.forClass(TestClass1.class)); to make all Pages under
com.test.pages available under /pages/ and pages/subpackage.

 

Kind regards.

Chris

 


Re: mount recursive

by Vytautas Racelis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
 you may look at usage of
http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-components/src/main/java/org/xaloon/wicket/component/mounting/MountPageGroup.java


@MountPageGroup(context="/pages")
class Parent {}

@MountPage(path="/page_1") //result /pages/page_1
class A extends Parent {}

@MountPage(path="/page_2") //result /pages/page_2
class B extends Parent {}

This shows how to inject page scanner:
http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-demo/xaloon-demo-jackrabbit/src/main/java/org/xaloon/wicket/demo/repository/XaloonDemoApplication.java

Scanner configuration:
http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-demo/xaloon-demo-jackrabbit/src/main/resources/META-INF/application-context.xml

Giambalvo, Christian wrote:

> Hi all,
>
>  
>
> is it possible to mount a package recursivly?
>
> Let's assume following classes:
>
>  
>
> com.test.pages.TestClass1
>
> com.test.pages.TestClass2
>
> com.test.pages.subpackage.TestClass3
>
> com.test.pages.subpackage.TestClass4
>
>  
>
> now i'd like to do mount("/pages",
> PackageName.forClass(TestClass1.class)); to make all Pages under
> com.test.pages available under /pages/ and pages/subpackage.
>
>  
>
> Kind regards.
>
> Chris
>
>  
>
>
>  


--
Regards,
Vytautas Racelis
-----------------------------------
phone:+370-600-34389
e-mail: turisto@...
www.xaloon.org
www.leenle.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...