cancel
Showing results for 
Search instead for 
Did you mean: 

PersonalizationClass and EP6

Former Member
0 Kudos

Hi,

does anyone know, where and how i have to specify the property PersonalizationClass for custom personalization.

In EP5 it was declared in the default.properties but where should i define it now. I think it should be declared in the portalapp.xml but i can not find the correct attributname

Thanks

Edmund

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I tried your suggestion but nothing happend. The iView does not use the defined custom personalization component. Are there any running examples available for EP6 covering the custom personalization problem?

Can anyone give me a hint?

My portalapp.xml looks like this:

<components>

<!Two components of the personalization example>

<!Component 'personalizationoutput' is the component that is shown on a page>

<component name="personalizationoutput">

<component-config>

<property name="ClassName" value="com.use.test.cp.Output"/>

<property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>

</component-config>

<component-profile>

<property name="PersonalizationClass" value="com.use.test.cp.SelectionScreen"/>

</component-profile>

</component>

<!Component 'personalization' represents a custom personalization dialog>

<component name="com.use.test.cp.personalization">

<component-config>

<property name="ClassName" value="com.use.test.cp.SelectionScreen"/>

<property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>

</component-config>

<component-profile />

</component>

</components>

Thanks

Edmund

Former Member
0 Kudos

This should have been defined in the portal runtime guide(https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/portal runtime - release 6.0), but I cant see anything mentioned about it

Please see

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/custo... personalization dialogs.htm

From this file :

How to implement Custom Personalization?

There are 3 ways to implement a Custom Personalization dialog.

1. Setting the profile property PersonalizationLink: With an URL you can refer to a page that is used for as specific personalization dialog service.

2. Setting the profile property PersonalizationClass: If your iView class does not extend the AbstractPortalComponent, then set the property PersonalizationClass to point to your personalization class which needs to extend the AbstractPortalComponent. You will then need to overwrite the doEdit and doHandleEditData of your personalization class. Popular technique.

3. Overwriting the doEdit and doHandleEditData methods of AbstractPortalComponent: If your iView class extends the AbstractPortalComponent, then typically, just overwrite the doEdit to implement the personalization dialog and overwrite the doHandleEditData to store the values to the profile.

Irrespective of which way you choose to implement, you will have to take care of the following 2 aspects of personalization yourself.

1. Modifying and storing (persistent) per user personalization values of an iView.

2. Displaying and handling of personalization dialogs that offer modification of iView personalization parameters

Based on this, the problem might be that your class is not extending AbstractPortalComponent ?

detlev_beutner
Active Contributor
0 Kudos

Hi Dagfinn, hi Edmund,

the link and the text Edmund already knows (you couldn't know, Dagfinn, but this has been mentioned in another thread Edmund had opened).

BUT - sometimes it needs a weekend in between to give the correct answer My first shot was too fast (irritating enough, I didn't implement the personalization class, but I realized a ClassNotFoundException, so I thought: OK, all I would have to do now is implement it - but time does matter, so answer fast and go on with your own work; most times this works, this time I failed Seems that the PersonalizationClass parameter is used "half the way").

The solution: <i>Here it comes</i>... Copyright stays at SAP - I just stole it from com.sap.portal.pdk.srv.personalization...

You have a component X (class Xclass) for which you want a custom personalization, implemented by another component Y, class Yclass, extending AbstractPortalComponent.

Then within the component X you define a component property named "mode" with the value "edit", and within this property define a property "delegate" with the value of Y (full qualified). In addition, you define the component Y with it's implementing class Yclass. That's all (more or less).

Have an additional comparing look at the portalapp.xml of the above mentioned component com.sap.portal.pdk.srv.personalization as well as at the srclib.api and the implementation example.

Hope this helps

Detlev

Former Member
0 Kudos

Hey Detlev,

Seems like u solved the problem that i been having.

Help me out too.Opened a thread "whatz wrong in this code?"

Tell me where iam goin wrong!

Thanks.

Answers (1)

Answers (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Edmund,

it's me again

Even if the example PAR is for EP5, the documentation talks about the "profile property PersonalizationClass". And this is right, so it's a direct property of the component-profile.

So you will have something like this:


<application>
  <application-config>
    ...
  </application-config>
  <components>
    <component ...>
      <component-config>
        ...
      </component-config>
      <component-profile>
        <property name="PersonalizationClass" value="your.personalization.class.Implementation">
        ...
      </component-profile>
    </component>
  </components>
</application>

Hope it helps

Detlev