• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

navigation between the pages in different portlets using JSR286

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody,

I am new in JSR 286, I have to portlets and i want to move from page in first protlet to page in the second protlet. how can i do that?

my scenario is: i have menu in a page contains ordered links in the first protlet, when i click on any link i want to view the page that related to this link in other portlet.
(the menu in first protlet and i want to view the pages of these links in the other portlet)

any help please
 
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will both of these portlets live on the same portal page?
 
Omar Mohaidat
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, all portlets on the same portal page.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Guy was insinuation but not actually saying, Portlets form part of a page but do not represent an actual page themselves. If you want to have a page with either PortletA or PortletB then you should have two portal pages and navigate between the two pages in order to show each portlet.
 
Guy deLyonesse
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are probably plenty of tutorials out there with examples of how to do it, but the thing to remember is that Inter-Portlet Communication is like communicating with radios... The Sending portlet creates an event which could be accessed by any portlet. The Receiving portlet is written to watch for the specific events that are relevant to it and will monitor those events.

So when someone selects an item on your menu portlet, you'll create a new event with the value of the selected event. The receiving portlet will see the event and get the parameter from it, and display the appropriate information.

David O'Meara wrote:As Guy was insinuation but not actually saying, Portlets form part of a page but do not represent an actual page themselves. If you want to have a page with either PortletA or PortletB then you should have two portal pages and navigate between the two pages in order to show each portlet.



I just asked because I wanted to know if Omar was looking to have the sending link actually navigate the user to a different page, or if it was all on the same page and the link was just going to trigger an action on the receiving portlet. It seems that both portlets will be on the same page and he just wants a selection from one portlet to reflect in the view of another.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
agreed and agreed.
 
Omar Mohaidat
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am trying to do example like this:
in the JSP


my page code class of publishing the event is:


the page code class for the other portlet to proccess event is


this is my protlet.xml




is this ok? or i need to do other thing? because when i tried to run this code, i clicked on the link of the jsp but no action performed and i didn't find Main class instance. (the print statement in the constructor didn't work)
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic