Hi,

I'm really keen to have a clearer understanding of the page mapping changes
in Wicket 1.5 - right now it is still not totally clear in my mind.

The best way to explain is by highlighting some requirements I have based on
the URL scheme we are trying to achieve in a project.

We have the concept of "Locations" and "Categories". To visit a location
page, the following URL would be used:

www.mycompany.com/someLocation

To visit a category page, the URL would be:

www.mycompany.com/someCategory

Additionally, a search page exists combining a location and a category - the
url being:

www.mycompany.com/someLocation/someCategory

So we have three page types:

- Location page 
- Category page
- Combination location and category page (a search page)

I've not found a solution to implementing this URL scheme using Wicket. One
issue being that the URLs are dynamic, i.e. we need to lookup locations and
categories from a database to determine whether a specified URL is actually
a location page, category page, search page or none of the above.

The steps would be:

1. If only a single path...
2. If it is a valid category, forward to CategoryPage.class
3. If it is a valid location, forward to LocationPage.class
4. If there is a second path element (validLocation/validCategory) forward
to SearchPage.class
5. If no matching page found by now, fall through to other mappers/handlers
to handle the URL

My problem up to now is that none of these pages is prefixed with anything
to uniquely identify them, e.g.

/location/someLocation
/category/someCategory

and thus I need to perform logic (including database calls) to determine the
semantics of the URL before I know what the intended destination is.

Hopefully I've been clear enough as to what the issue is I'm trying to
solve. Having briefly read up about the great work that is being done in
Wicket 1.5, I'm thinking that maybe I could achieve this now.

I'd be really grateful for some ideas/opinions on this.

Thanks,

dz

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Understanding-Wicket-1-5-page-mapping-tp3467619p3467619.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to