Does WicketRequestCycleForIsis get hit when you access the page?  It'll
depend on what URL it's mapped to, I think.

Cheers
Dan



On 13 May 2014 13:41, Erik de Hair <[email protected]> wrote:

> What I did until so far:
>
> - Extended PageType enum with my new pagetype
> - Extended PageClassListDefault with my new pageclasstype and getter for
> the pageclass and registered this list in the application configuration:
> bind(PageClassList.class).to(PortalPageClassList.class);
> - Created a pageclass 'WicketActivateUserAccountPage' extending
> PageAbstract
>
> The result is a stacktrace ;-)
>
> java.lang.IllegalStateException: No Session opened for this thread
>     at
> org.apache.isis.core.runtime.system.context.IsisContext.getSession(IsisContext.java:421)
>     at
> org.apache.isis.core.runtime.system.context.IsisContext.getPersistenceSession(IsisContext.java:449)
>     at
> org.apache.isis.viewer.wicket.model.models.ModelAbstract.getServiceAdapters(ModelAbstract.java:55)
>     at
> org.apache.isis.viewer.wicket.model.models.ApplicationActionsModel.load(ApplicationActionsModel.java:37)
>     at
> org.apache.isis.viewer.wicket.model.models.ApplicationActionsModel.load(ApplicationActionsModel.java:30)
>     at
> org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:121)
>     at
> org.apache.isis.viewer.wicket.ui.components.appactions.cssmenu.AppActionsCssMenuFactory.buildMenu(AppActionsCssMenuFactory.java:101)
>     at
> org.apache.isis.viewer.wicket.ui.components.appactions.cssmenu.AppActionsCssMenuFactory.createComponent(AppActionsCssMenuFactory.java:96)
>     at
> org.apache.isis.viewer.wicket.ui.ComponentFactoryAbstract.createComponent(ComponentFactoryAbstract.java:98)
>     at
> org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistryDefault.createComponent(ComponentFactoryRegistryDefault.java:122)
>     at
> org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistryDefault.addOrReplaceComponent(ComponentFactoryRegistryDefault.java:107)
>     at
> org.apache.isis.viewer.wicket.ui.pages.PageAbstract.addComponent(PageAbstract.java:361)
>     at
> org.apache.isis.viewer.wicket.ui.pages.PageAbstract.addApplicationActions(PageAbstract.java:337)
>     at
> org.apache.isis.viewer.wicket.ui.pages.PageAbstract.<init>(PageAbstract.java:178)
>     at
> webapp.wicket.ui.pages.users.activate.WicketActivateUserAccountPage.<init>(WicketActivateUserAccountPage.java:82)
>
> The last line references my PageClass.
>
> Where to manage the session injection?
>
> Erik
>
>
> On 05/13/2014 08:10 AM, Dan Haywood wrote:
>
> On 12 May 2014 16:32, Erik de Hair <[email protected]><mailto:[email protected]>
> wrote:
>
>
>
> Hi,
>
> Is it possible to add pagetypes (that bypass security and have access to
> the Isis context) or is there some reason why the number of page types is
> limited right now?
>
>
>
>
> As you've probably figured out, its currently fixed to those in the
> PageType enum.
>
> Why? Only that there's been no need to make this extensible before now.
>  The different page types form a close loop; we only ever have to render
> those different sorts.
>
>
>
>
>
>
>
> I tried to extend the PageClassRegistry and PageType enum. This kind of
> works only without access to the Isis context.
>
>
>
>
> I'm looking at the code at it would seem that I don't correctly use the
> PageType or PageClassRegistry mechanism everywhere.  For example, the
> ActionResultResponseType class simply new's up the next page to traverse
> to.
>
> Ignoring that inconsistency for a minute, I do think that it might me that
> if you subclass from PageAbstract (as the other pages all do), then you
> should have all the usual menus etc.
>
> In terms of the Isis context etc, that is setup through the WicketFilter
> calling WebRequestCycleForIsis's onBeginRequest and onEndRequest.  This is
> configured as a callback by IsisWicketApplication when first started.
>
>
>
>
>
> I need some pages for users self service (forgotten passwords etc.).
>
>
>
>
> If you manage to get something working, this would be a nice contribution
> :-)
>
> Cheers
> Dan
>
>
>
>
>
> Thanks,
> Erik
>
>
>
>
>
>
>
>
>

Reply via email to