Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
15 replies Latest Post - ‏2013-02-04T18:52:27Z by mburati
Matt-FNIS
Matt-FNIS
43 Posts
ACCEPTED ANSWER

Pinned topic Losing portal ui on paging

‏2013-01-23T14:53:31Z |
Using Portal 7.0.0.2, Portlet Factory Designer 7.0.1.2. My application displays a pageable list of items. This list is returned by a simple web service in RowSet/Row XML format. I use a Data Page builder to consume the results, a Data Column Modifier builder to modify the display and enable paging (Enable Paging box checked), and a Paging Buttons builder to manage paging (Assistant Name field set to the name created by the DCM when Enable Paging is on). The first page of the list displays perfectly, but when I click a paging button, the second page of data is displayed without the Portal ui.

I've made sure that the Use Partial Page Refresh box is checked in the Paging Buttons builder. The help for this builder states that when you check this box "you must define the area to be refreshed. In the Paging Assistant builder that you specify in the Assistant Name input, specify the Refresh Location input to enable the partial page refresh". Hpwever, I am not using a Paging Assistant builder, and the Paging Assistant generated for me by the DCM cannot be directly edited.

What am I doing wrong? This same portlet used to work fine under Version 6 of portal/designer.
Updated on 2013-02-04T18:52:27Z at 2013-02-04T18:52:27Z by mburati
  • mburati
    mburati
    2552 Posts
    ACCEPTED ANSWER

    Re: Losing portal ui on paging

    ‏2013-01-23T15:33:41Z  in response to Matt-FNIS
    With WEF 701 and later, you should be able to use the ootb Smart Refresh and not have to specify an area to be partially refreshed, so that may be the easiest way to resolve this. With Smart Refresh, it appears to be slightly more tolerant of things like malformed HTML (although well formed HTML is still the safest (eg, close all div and span tags properly etc).

    Note though, that for better cross-browser support, WEF7.x uses Dojo for partial and Smart Refresh and thus needs Dojo on the page. Portal 6.1.5 up through 7.0.0.1 includes Dojo in the portal page, but portal 7.0.0.2 Optimized Theme and 8.0 do not include it by default - you need to add it via Portal Theme profile modules. For more info on this (if you are using the optimized portal theme), see the following documentation:

    http://www-10.lotus.com/ldd/pfwiki.nsf/xpDocViewer.xsp?lookupName=Web+Experience+Factory+8+Documentation#action=openDocument&res_title=Web_Experience_Factory_portlets_with_the_WebSphere_Portal_optimized_theme_wef8&content=pdcontent

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    • Matt-FNIS
      Matt-FNIS
      43 Posts
      ACCEPTED ANSWER

      Re: Losing portal ui on paging

      ‏2013-01-24T15:31:45Z  in response to mburati
      I still have this problem.

      I looked at the documentation you referenced and tried to add dojo to my portal page via theme modification. The process is (imho) complex and poorly documented. I was unable to add dojo in that way, so I found another way to do it.

      I enabled the Dojo feature set in my WPF project and added a Dojo Enable builder to my model. Using Firebug, I was able to verify that dojo was loaded on my page, and all the dojo.require widgets existed on the page as well. I've attached the page html from Page..View Source in my browser (IE 8.0.7601.17514). Yet I had the same problem where the first page of my list displayed fine, but I lost the portal ui whenever I clicked a paging button. Please note that the same problem occurs with FireFox 13.0.

      Perhaps smart refresh requires additional dojo widgets? If so, what are they?

      Then I saw a note in the readme for WPF fixpack 7.0.1.4 (Ref 52001 - Dojo IE bug w/WEF tags containing name attrs, causes Smart Refresh error which results in full page refresh). So I upgraded to 7.0.1.4, upgraded my WPF project to the new version, and tried again. Same problem.

      At this point, I consider this a serious bug. I don't see any other forum posts on the subject, but I have a hard time believing no-one else has encountered this problem. How do I report this bug, and do you have any other suggestions for me short of manually coding all of the paging buttons and related logic myself?
      • mburati
        mburati
        2552 Posts
        ACCEPTED ANSWER

        Re: Losing portal ui on paging

        ‏2013-01-24T15:40:34Z  in response to Matt-FNIS
        A sure way (but inefficient due to all the other things it loads) to get dojo on your portal 8 or 7002 page is to try the "Full" profile applied to your optimized theme portal page. This can be useful for being sure that you have everything available (Dojo plus lots of other optional portal modules) but is inefficient for production deployment due to loading too much. Once you have that working, then you could try a more stripped down portal theme profile (such as profile_lightwieght or profile_deferred with a handful of the portal documented dojo modules added).

        If you post a sample (with no confidential info or intellectual property) showing what you're having trouble with, it might make it easier for someone to quickly spot what's wrong with it.

        The ootb WEF 7014 Orders Service Consumer sample uses paging (as enabled through the DSUI builder which itself relies on the lower level page automation paging support) so you could try that to be sure your project, WAR and portal page are set up in a way that paging should work.

        I hope that info helps,
        ..Mike Burati
        http://www-10.lotus.com/ldd/pfwiki.nsf/
        The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
        • Matt-FNIS
          Matt-FNIS
          43 Posts
          ACCEPTED ANSWER

          Re: Losing portal ui on paging

          ‏2013-01-24T16:10:49Z  in response to mburati
          How do I apply the "Full" profile to my "optimized theme portal page". In Portal, the Page Properties for my page offers only 2 themes: Portal and PageBuilder2. Mine is set to Portal. Theme style offers choices like SingleTopNav, SideNavOnly, NoTheme, and Palette. There is nothing that looks like "Full".
          • mburati
            mburati
            2552 Posts
            ACCEPTED ANSWER

            Re: Losing portal ui on paging

            ‏2013-01-24T16:31:03Z  in response to Matt-FNIS
            It's possible to use other themes on portal 7002 - the profiles/modules are specific to the portal 7002 "optimized theme".

            For more info on portal optimized theme config / setup, the portal 7002 docs on that appear to be at:
            http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=Supplemental+Documentation#action=openDocument&res_title=Using_the_new_theme_sdoc&content=pdcontent

            http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=Supplemental+Documentation#action=openDocument&res_title=7.0.0.2_Designing_a_portal_site_using_theme_optimization_sdoc&content=pdcontent

            and this one for setting the profile for a portal 7002 optimized theme page:
            http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=Supplemental+Documentation#action=openDocument&res_title=Setting_a_profile_override_on_a_page_sdoc&content=pdcontent

            There may be more portal optimized theme experts on the WebSphere Portal forum if you have more detailed questions about optimized themes/modules.

            With a browser debugger (eg, firebug, chrome debugger etc) you should be able to go to the console window and type dojo to see if that JS object is defined. If it is, try dojo.version.toString() to see what version of dojo is loaded on the page. If it's Dojo 1.4.x it's likely "not" the new (as of 7002) optimized theme with modular profiles, but an older theme. If it's a newer Dojo release (eg, 1.6.x) then it's likely an optimized theme page leveraging profiles to load JS modules needed by the portal page.

            If you try the ootb WEF OrdersServiceConsumer sample, you should be able to tell if the page is set up correctly to support WEF portlets that leverage dojo.

            I hope that info helps,
            ..Mike Burati
            http://www-10.lotus.com/ldd/pfwiki.nsf/
            The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
        • Matt-FNIS
          Matt-FNIS
          43 Posts
          ACCEPTED ANSWER

          Re: Losing portal ui on paging

          ‏2013-01-25T14:35:23Z  in response to mburati
          I have it working now. It seems that the problem was in fact a conflict between Dojo loaded by the Portal theme and Dojo loaded by my Portlet Factory model. It took me a while to figure this out, because it seems that there is some sort of caching going on in Portal that meant it wasn't as simple as turning off the Dojo feature set in my Portlet Factory project and re-publishing. Once I restarted Portal Server and published my project without the Dojo feature set, my portlet started working the way I wanted it to.

          Portlet Factory issues a warning on the first builder that requires smart refresh: "You have requested "Smart Refresh" or "Partial Page Refresh," either in a builder or through the theme. These features requires Dojo - please add the Dojo feature set to this project or turn off "Smart Refresh.". That's what initially caused me to turn on the Dojo feature set. It eliminated the warning.

          But notice that if you want to use any of the Dojo builders in Portlet Factory, you have to turn on the Dojo feature set. If you do that, your portlet will load Dojo onto the portal page, and smart refresh may not work if the portal page theme also loads Dojo. Since both of the oob themes delivered with Portal 7 (Portal and PageBuilder) DO load Dojo, that means you have to develop and deploy a custom no-Dojo theme and require your portlet users to use it.

          Now theoretically portlets are supposed to be mix-and-match on a page, but there will be problems if some of the portlets expect Dojo to be loaded by the portal page, and some expect to load it themselves. Not good.

          It would be nice if the Portlet Factory and Portal development teams could figure out an answer to this issue. At the very least, please ask the Portal development team to provide a no-Dojo theme oob.

          Thanks for all your help.
          • mburati
            mburati
            2552 Posts
            ACCEPTED ANSWER

            Re: Losing portal ui on paging

            ‏2013-01-25T14:46:00Z  in response to Matt-FNIS
            Matt,
            I'm glad you got it working, but you should not have to remove the Dojo feature set from your project in order to use portal's Dojo - there may have been something else going on with your caches and/or environment.

            - When you Export a Portlet WAR for deployment, WEF will exclude its copy of Dojo from the portlet WAR since portal's should be used.

            - With a Development WAR (which you use when running from Designer), there will be DOjo in the project so that you can run models standalone while your portlets are under development and use the factory copy of Dojo for those standalone (outside of a portal page) models during testing.

            - WEF Dojo enablement writes script in the page that will look to see if Dojo is already loaded on the page and if so, should not try to load WEF's copy of it.

            One risk I can think of is if you use the portal's profile_deferred profile, unmodified, in a page with WEF portlets, it's possible that portal will NOT pre-load Dojo, then the WEF portlet will see it missing and load its own (on a dev WAR only since it won't be there in a production WAR) and then if you use the Portal page editing mechanism (aka shelf) portal will then load its own Dojo and you could get a conflict. If you need to use the Deferred profile, I suggest a custom copy of the Deferred profile adding the Dojo modules I mentioned previously, so that Portal will pre-load DOjo in the page before the portlets get a chance to check for Dojo being there. Sorry it's not straightforward out of the box, but portal is trying to give you the most flexibility to optimize what's loaded in the portal page so that customers can load only what's necessary (previous versions would load a lot more, whether it was being used or not, so this is an improvement, but does require reading up a bit on portal optimized themes, profiles and modules to understand how to use them in the most efficient manner).

            I hope that info helps,
            ..Mike Burati
            http://www-10.lotus.com/ldd/pfwiki.nsf/
            The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
            • Matt-FNIS
              Matt-FNIS
              43 Posts
              ACCEPTED ANSWER

              Re: Losing portal ui on paging

              ‏2013-01-29T19:32:39Z  in response to mburati
              Ok, so I finally had time to look into enabling Dojo in the Portlet Factory project but exporting a deployment war without Dojo. I remember that older versions of Portlet Factory had a deployment war option, but this version only has the following options (on the Project Export menu): WAR File, WebSphere Portlet Factory Application WAR, WebSphere Portlet Factory WAR, WebSphere Portlet Factory WAB for rich client, WebSphere Portlet Factory Widget WAR, and WebSphere Portlet Factory Zip archive. Which of these is the deployment WAR?
              • mburati
                mburati
                2552 Posts
                ACCEPTED ANSWER

                Re: Losing portal ui on paging

                ‏2013-01-29T20:44:53Z  in response to Matt-FNIS
                From the export menu, it should be exporting a production deployment style WAR (although many customers build such WARs via cmd-line scripts from source control to be sure it's a controlled repeatable process). The "Publish" WAR option from the project menu is the one that builds/deploys a development WAR which supports both standalone and portlet use.

                I hope that info helps,
                ..Mike Burati
                http://www-10.lotus.com/ldd/pfwiki.nsf/
                The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
                • Matt-FNIS
                  Matt-FNIS
                  43 Posts
                  ACCEPTED ANSWER

                  Re: Losing portal ui on paging

                  ‏2013-01-31T21:39:04Z  in response to mburati
                  Unforutnately, this does not appear to be true for any of the options on the Export menu. If the Dojo feature set is included in the project, export leaves it in the exported war.
                  • mburati
                    mburati
                    2552 Posts
                    ACCEPTED ANSWER

                    Re: Losing portal ui on paging

                    ‏2013-02-01T01:19:26Z  in response to Matt-FNIS
                    Can you verify you're running WEF 7.0.1.2 and using export WEF "Portlet" WAR and still seeing all the dojo artifacts in the WAR?
                    I could be mis-remembering, but I thought by 701 the export portlet WAR was excluding the dojo JS artifacts (dojo builders would still be there, and would leverage portal's dojo).

                    In any case, when running in portal, the portal should be loading dojo on the page whether or not it's in the portlet WAR. With WP6.1.5 and 7.0 and 7.0.0.1, dojo would've been there on default current portal theme pages. With WP7002 and 8.0 you need to use a portal theme profile (like profile_full.json or a custom profile with Dojo modules specified) to get portal to load dojo into the portal page for you. It should do that whether or not the dojo js happens to be in the WEF portlet WAR and WEF should be checking to see that it's there on the portal page before trying to load its own copy.

                    I hope that info helps,
                    ..Mike Burati
                    http://www-10.lotus.com/ldd/pfwiki.nsf/
                    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
                    • Matt-FNIS
                      Matt-FNIS
                      43 Posts
                      ACCEPTED ANSWER

                      Re: Losing portal ui on paging

                      ‏2013-02-01T17:09:27Z  in response to mburati
                      Currently running WEF 7.0.1.4. Exporting using Project context menu option Export..WebSphere Portlet Factory Portlet WAR
                      • mburati
                        mburati
                        2552 Posts
                        ACCEPTED ANSWER

                        Re: Losing portal ui on paging

                        ‏2013-02-01T18:05:26Z  in response to Matt-FNIS
                        Ok, as mentioned above, whether or not the factory copy of dojo is in the portlet WAR, it should still be loading portal's copy of dojo when running as a portlet, so you may want to focus on the original issue as opposed to the dojo in the WAR or not. BTW, by dojo in the WAR, I'm referring to WebContent/factory/dojo/... (all the dojo js files). Even without Dojo itself in the portlet WAR, if you have the Dojo feature set in your project, you should still have the WEF Dojo builders and WEF JS that leverages dojo in the portlet WAR.

                        Have you tried the out of the box WEF Orders Service Consumer sample from the Building Models feature set, in that same portlet WAR and that same portal page to see if a known entity (the paging provided in that ootb sample) works on that portal and portal page that you're using?

                        I hope that info helps,
                        ..Mike Burati
                        http://www-10.lotus.com/ldd/pfwiki.nsf/
                        The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
                        • Matt-FNIS
                          Matt-FNIS
                          43 Posts
                          ACCEPTED ANSWER

                          Re: Losing portal ui on paging

                          ‏2013-02-04T14:52:06Z  in response to mburati
                          The out of the box WEF Orders Service Consumer sample from the Building Models feature set is not a portlet model. It contains no Portlet Adapter Builder. I tried adding a Portlet Adapter Builder and re-deploying, but when I launch the portlet nothing displays.
                          • mburati
                            mburati
                            2552 Posts
                            ACCEPTED ANSWER

                            Re: Losing portal ui on paging

                            ‏2013-02-04T18:52:27Z  in response to Matt-FNIS
                            If you're blocked by this, you may want to contact customer support get help investigating this issue. We try to help as time allows on this forum, but it is an open discussion form and not a formal support forum, so for blocking issues where you can't get a quick solution from others on the forum, an official support ticket may be a better option.

                            ..Mike Burati
                            http://www-10.lotus.com/ldd/pfwiki.nsf/
                            The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.