Topic
  • 2 replies
  • Latest Post - ‏2013-09-24T14:53:57Z by vikashgupta
vikashgupta
vikashgupta
74 Posts

Pinned topic Profile selection handler not working

‏2013-09-23T15:47:56Z |

Hi,

I have an issue with profile selection handler, i have created selection handler xml, java class and trying to set the profile by the portlet preferences. As of now i put hard coded for test. There is no compilation error. When i am running TestProfile model as active model, it works and take the profile which i hard coded. But when i am running same model as portlet inside webpshere portal 7.0.0.2. The selection handler doesnt work. Default Profile loads. there is no println in systemOut.log.

I am attaching my test project. Please let me know if i am missing any configuration.

Thanks

Attachments

  • mburati
    mburati
    2579 Posts

    Re: Profile selection handler not working

    ‏2013-09-23T16:45:18Z  

    I don't see anything missing, and after refreshing and ensuring all the artifacts from your zip were in my deployed WAR and running standalone from desginer (without applied profile set) it selected your hardcoded 2nd profile/page.    After redeploying the portlet WAR (to add a portlet adapter to the model)  and adding your portlet to a protal (8 in my case, but should be the same in 7) page, I see your selected hardcoded LP profile page.

    Try redeploying to ensure that all of your artifacts are in the portlet WAR, as they were for me when it worked.

    Also note, you shouldn't have to write a profile selection handler to do this.   You can expose profile set(s) for config, edit_defualts/shared settings or personalize, via the portlet adapter and it'll then automatically use preferences under the covers for you to allow you to customize the profiled inputs.   See the Learning Roadmap on the wiki and the product documentation for more information on doing it that way, which should be less work and less custom code.

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • vikashgupta
    vikashgupta
    74 Posts

    Re: Profile selection handler not working

    ‏2013-09-24T14:53:57Z  
    • mburati
    • ‏2013-09-23T16:45:18Z

    I don't see anything missing, and after refreshing and ensuring all the artifacts from your zip were in my deployed WAR and running standalone from desginer (without applied profile set) it selected your hardcoded 2nd profile/page.    After redeploying the portlet WAR (to add a portlet adapter to the model)  and adding your portlet to a protal (8 in my case, but should be the same in 7) page, I see your selected hardcoded LP profile page.

    Try redeploying to ensure that all of your artifacts are in the portlet WAR, as they were for me when it worked.

    Also note, you shouldn't have to write a profile selection handler to do this.   You can expose profile set(s) for config, edit_defualts/shared settings or personalize, via the portlet adapter and it'll then automatically use preferences under the covers for you to allow you to customize the profiled inputs.   See the Learning Roadmap on the wiki and the product documentation for more information on doing it that way, which should be less work and less custom code.

    I hope that info helps,
    ..Mike Burati 
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.

    Thanks Mike,

    The reason why it was not working in my work space, because i have another model with portlet adapter and i import this model into that. But in profile inputs of imported model builder i mentioned none instead of Use parent profiling. When i put use parent profiling it started working. 

    Thanks for guiding me for using portlet adapter preference feature by using edit defaults. So i am not using anymore selection handler for preferences.