4 Replies Latest reply on Jul 2, 2006 2:05 PM by Ivan Latysh

    Form a page to another: un-solvable scenario?

    Angelo Immediata Newbie

      Hi all. I have this scenario:

      By starting from a page A where there are some portlets i must arrive to page B where there are some other portlets between them there must be my one too that shows some detail by recovering a request parameter.
      Now the simplest thing to do is to start from the portal page A where there are thre columns and n portlets and to arrive to portal page B where there are two columns and n portlets with m!=n. Is this a realizable thing?
      I have read JSR-168 spec and it seems to me that there is no reference to this scenario...but i can't believe that there is no way to solve this scenario..... it's the most common thing that in an internet portal can happen. Infact...by starting form a page wit some portlets and a list of items i want to show to the user a detail; now if i set the portlet state to MAXIMIZED all the other portlet disappear, menu too; but we need the menu so that the user is alway able to return to the home page or to another page by clicking on the menu...I can't believe that this thing has not been considered in the JSR-168 specs...so i think i'm wrong in something...but i'm not able to undertand where.
      Has anybody solved this thing?

      Thanks to all.
      Angelo

        • 1. Re: Form a page to another: un-solvable scenario?
          Ivan Latysh Newbie

          You are trying to go against the specs, when you must obey them.
          The boundary for your portlet is a portlet window, anything that beyond that is out of your reach. Also you don't know how many pages portal has, or how many portlets on the page, etc.
          Imagine that portal is your windows, and your portlet is running Excel. When you are working on your Excel file you do it within your boundaries (application window). You can open many excel files, change view, etc. but again it is inside of the window.
          Now you are asking - Can I focus on WordPerfect window from my excel book?
          And answer is no, because you don't have WordPerfect window opened and you don't even have it installed.
          Same principal works with the portal. If you want to display different view to the user you do it within your portlet.
          Hope it helps.

          • 2. Re: Form a page to another: un-solvable scenario?
            Rali Genova Novice

             

            now if i set the portlet state to MAXIMIZED all the other portlet disappear, menu too; but we need the menu so that the user is alway able to return to the home page or to another page by clicking on the menu...


            There is a way to create a 'persistent' navigation menu that lists all available portlets regardless of their window. Look at the JBoss Labs code http://anonsvn.labs.jboss.com/labs/jbosslabs/trunk/portal-extensions/forge-navigation - the project runs on Portal 2.2 and their web site is http://labs.jboss.com

            • 3. Re: Form a page to another: un-solvable scenario?
              Angelo Immediata Newbie

              Hi all. First of all i want to thanks for you replies.
              Now...i don't want to create a controversy..i'm trying only to understand.

              Also you don't know how many pages portal has, or how many portlets on the page, etc.


              I'm not agree with this; infact it's real that i creat portlets but i creat the full portal too so i know how many pages there are and how many portlet in a page there are.


              Imagine that portal is your windows, and your portlet is running Excel. When you are working on your Excel file you do it within your boundaries (application window). You can open many excel files, change view, etc. but again it is inside of the window.
              Now you are asking - Can I focus on WordPerfect window from my excel book?
              And answer is no, because you don't have WordPerfect window opened and you don't even have it installed.


              Let's pass to word example (Excel is not my best :-) ).I imagine, instead, that the portal is the Word software, while my portelt is a word document tha can contain several page; now in word when i use an hypertextual link i can go from a page to another page...well what i want is to obtain this thing.
              I'll try to be clearer... i must start from my home page; in my home page i have three columns where on the left there are two or more portlets (a menu portlet where the user can choose tha page where he wants to go) and a search motor portelts by using that user can search in the portal.
              In the central column i have some other portlets between them there a my portlet that shows a list of news. On the rigth column i have some other portlets.
              Now when the user chooses to see a news detail it's not too nice to show the detail into a thre columns page..so i'ld like to change page and show a two columns page where on the left there are still the menu portlet and the search motor portlet (and the user can still use them and by using the menu portlet can choose anothe portal section while by using the search motor can do a search...), in the central column there is only only my one portlet that shows news detail instead of news list; all the other portlets must be no longer present. In this way i can build my "detail page" by using more space in the page and by showing all the images i want without to be worried about the rigth column and its portlets....
              I hope to have been clearer...i'm sorry for my bad english..

              I think this is the most common scenario...at least i have seen the most internet portals built in this way.
              I can undertand that to pass a request parameter from a page to another can be difficult and can create confusion (let's image there are two portlets that use the same name for the parameter:-) ) but this can be solved by creating the URL by saying what is the portlet that must use this parameter.

              I repeat i don't want to offend or create controversy :-) I'm only trying to understand how i can solve this problem....i think that a lot of people have been in this case; if it's not so...i think they'll be :-).

              Thanks to all.
              Angelo


              • 4. Re: Form a page to another: un-solvable scenario?
                Ivan Latysh Newbie

                 


                Also you don't know how many pages portal has, or how many portlets on the page, etc.


                I'm not agree with this; infact it's real that i creat portlets but i creat the full portal too so i know how many pages there are and how many portlet in a page there are.

                Yes you can extent existent portal functionality to acheve it. But it is out of the portlet spec's. And you will write portlets that are not jsr-168 complient. In some cases it is the only way to go.

                Let's pass to word example (Excel is not my best :-) ).I imagine, instead, that the portal is the Word software, while my portelt is a word document tha can contain several page; now in word when i use an hypertextual link i can go from a page to another page...well what i want is to obtain this thing.

                You are misleading yourself here, Word application is a portlet not a portal, windows is a portal.

                ...

                Also don't forget that portlet just the presentation layer. So nobody stopping you from having your business logic in (EJB, POJO, ....). It means that you can have more that 1 portlet to present your application data.

                The simple scenario is to have MyPortletRegistry in ServletContext (or session, depending on your architecture) that have knowledge about all your portlets. Now you define for each your portlet a role, since portlet name can be changed by an administrator you have to keep pairs role=name in order to get needed portlet. Each portlet will register itself with MyPortletRegistry, and you can query this registry for a portlet name with wanted portlet role. And as soon you know portlet name you can construct portal link that will display needed portlet.
                But be carefull this is a hack.

                Personally,
                I belive that portal must have portlet registry, and portlet specs should define such fiunctionality.
                Since portal is a container I should be able to query it for needed component.