-
1. Re: Custom Navigation Portlet
shannonsumner Mar 8, 2012 9:27 AM (in response to shannonsumner)The REST API wasn't my answer
Here's the url I found to work:
http://localhost:8080/rest/private/managed-components/mop/portalsites/classic/pages
The Pages are not listed hierarchical - so I'd never be able to create a good list from them.
I'll keep looking
-
2. Re: Custom Navigation Portlet
nscavell Mar 8, 2012 9:31 AM (in response to shannonsumner)Pages are not hierarchical, navigation nodes are. Try http://localhost:8080/rest/private/managed-components/mop/portalsites/classic/navigation. I also point you to GateIn Management Docs where you can view how the MOP management extension is exposed over rest.
-
3. Re: Custom Navigation Portlet
shannonsumner Mar 8, 2012 9:33 AM (in response to nscavell)That looks like it might work - thank you Nick!
-
4. Re: Custom Navigation Portlet
shannonsumner Mar 8, 2012 12:27 PM (in response to shannonsumner)As I'm coding this to use the REST API for the navigation nodes - I have to ask if there is a better way of getting the list of all pages in a hierarchical fashion. Does anyone have any experience with this?
Thanks,
Shannon
-
5. Re: Custom Navigation Portlet
theute Mar 8, 2012 12:35 PM (in response to shannonsumner)1 of 1 people found this helpfulLike Nick said, pages are not hierarchical.
What is hierarchical is the navigation nodes (what you usually use for building a navigationPortlet), each navigation node points to a page, you can have multiple navigation nodes pointing to a same page.
From what you said in initial post looks like you found https://community.jboss.org/wiki/GateInRESTAPI and tried to use it, this is purely a spec open to discussion before being implemented, as of now there is no real *public* API, nick pointed you to a private REST API, you can also look at the existing navigation portlet if you wish. A while ago I also wrote this very short example (not tested on GateIn 3.2) https://github.com/theute/VerticalMenuPortlet which is using the private Java API.
-
6. Re: Custom Navigation Portlet
shannonsumner Mar 8, 2012 12:39 PM (in response to theute)Thank you Thomas,
I will look at your short example and when I've completed everything I'll post what I came up with.
Thanks,
Shannon
-
7. Re: Custom Navigation Portlet
nscavell Mar 8, 2012 1:07 PM (in response to shannonsumner)Unfortunately the example that Thomas points to will not work in 3.2.x since the internal/private navigation API changed. The problem is we don't have a public api for this yet, which is coming soon. Check our https://community.jboss.org/wiki/GateInSpecifications for more info around that. So for now you can either bite the bullet and wait for a proper public api (we plan for a rest one too) or use the internal NavigationService.java where you can find some examples of it's usuage internally but is subject to change.