4 Replies Latest reply on Feb 16, 2007 5:22 AM by den74

    customize UserPortlet

    den74

      Hi i am using JBossPortal 2.4.1 (bundle including JBossAS) and i need to completely customize UserPortlet. I mean i have to customize the jsp presentation, the database stored data and obviously the management java class.
      What i would like is to not modify the general behaviour but only add the informations that differs from the released portlet (i thought to remove only grafically the info i don't need if it is possible)
      What way is better to follow to do these changes?
      thanks

        • 1. Re: customize UserPortlet
          theute

          You should be able to do it step by step.

          -> Change the JSPs (the stored data will not change)
          -> Create your own UserModule and RoleModule implementing the respective interfaces (now you should have what you want)

          The bottom line is to always call the userModule and roleModule so you can plug/unplug different storage and the system will continue to work fine.

          • 2. Re: customize UserPortlet
            den74

            Thanks for quick answer, but now i have another question: how can i store new data not present in the current User/Role database tables?
            I can't change the database schema the only thing i could do is to store my data in private table and referst them to the JBoss table, but how can can i access the id of the object created by the default behaviour?

            • 3. Re: customize UserPortlet
              den74

              Mybe i have answered in part to my question:
              i have to create a database table for my personal data, implement my versione of UserModule call the super methods to continue to do ht e normal actions and than implement code to store my personal data.
              I saw the class doing the usual operation is UserModuleImpl, so maybe i have to extend that class (??) but where I can find it and above all where i can configure portal to use my class and not the default one?
              thanks for answers

              • 4. Re: customize UserPortlet
                den74

                well, i customized some parts about the user creation but it seams to not be possible to customize the profile user data.
                I can customize the jsp but i can't customize the storing of data, i mean to add the storing of new personal data, because they are managed int the PortletUser classand i think it is not possible to override.
                What i would like to do is something like a class extending UserPortlet
                and implementing method

                storeProfile(...) {
                super.storeProfile(...);
                ...
                [my code]
                ...
                }

                and configure portal to call this one instead of UserPortlet class.

                Any suggestions?