Re: Mount a page class more than once.

2013-05-31 Thread josho
Martin-

Thanks for your help. I had a look at #getCompatabilityScore and
#checkPageClass on IRequestMapper. I extended the MountedMapper class, and
added some debug messages to help me follow what was going on. After a while
I experimented with the class and came up with the following solution:



It's a clunky solution but it gets the job done for me. I'll be able to put
together something better when I have some more time. Also the reason I'm
calling Mapper#add instead of #mountPage is that I am storing the
MountedMapper instance for use at a later time.

Thanks again.

-Josh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-class-more-than-once-tp4659173p4659191.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Mount a page class more than once.

2013-05-30 Thread josho
Hello all,

I have been using Wicket for about 1 year now for our company website. It
has been working great. Recently we have decided to make the switch from
Wicket 1.4.22 to 6.8.0. After moving all the code to the new library we are
still having 1 problem. I am mounting several html pages against the same
class (they all require some login/cart information to be generated by
wicket, but have different content) like so:

ICompoundRequestMapper mapper = getRootRequestMapperAsCompound();
mapper.add(new MountedMapper(/test1.html, MyPageClass.class));
mapper.add(new MountedMapper(/test2.html, MyPageClass.class));
mapper.add(new MountedMapper(/test3.html, MyPageClass.class));

When I attempt to access /test1.html or /test2.html in my browser, the
server sends a 302 Redirect to /test3.html (the last page mounted). All my
other classes with unique names are accessible (all extend this class as
well).

I have extended the ResourceStreamLocator class, and am filtering on URL,
however the locator never recieves the first request. Previously we worked
around this issue by not allowing MyPageClass.class to have cached markup.
However that solution is no longer working. I have made several searches on
Google and nabble for a solution, but no one seems to be in the same boat as
me.

Any help is appreciated.

-Josh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-class-more-than-once-tp4659173.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Mount a page class more than once.

2013-05-30 Thread josho
Paul-

Thanks for your reply.

Currently we have a couple dozen semi static pages on our website. Things
like company history, contact a sales rep and other bits of information. All
of these have some small bit of login/cart information generated by wicket
but the content to all these is generally different. Other more intensive
pages have their own respective page class.

Also, this was working in 1.4.22 but looking back it seems like we might
have been exploiting a glitch rather than using wicket as intended. I'll
start digging deeper into RequestMapper and other close by classes tomorrow. 

If you have any more ideas I would be grateful.

Thank you
-Josh





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-class-more-than-once-tp4659173p4659176.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org