Skip to Content

Accessing objects in IPortalComponentProfile in a bean

Hello Everyone

Is it possible to access to the objects in IPortalComponentProfile inside a bean. For example let's say I create a java.sql.Connection object in the doInitialization() method of a class created using JSPDynPage wizard of EP SP5 PDK. I store it in the profile object. Then I want to access it from a bean.



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Nov 25, 2003 at 03:04 PM

    Yes it is possible.

    You can access every profile of Portal Component.

    You have to tell the bean, the name of the Portal Compont on which you want to access the Profile.

    But take care of user specific attributes. just try it out.


    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Dagfinn for the insight. I did a bit of rethinking and changed the code so that bean doesn't actually need reference to request->context->profile etc.

      I have created a bean for HTMLB table with a DefaultTableViewModel as its model.  Initially I looked at the example code from PDK. For simplicity reasons they populated the table model inside the bean.Lazy me just extended the example and tried to do the same. Then I wanted to open the DB connection only once in the life cycle of my component. So I saved the connection in profile and wanted to access it from bean. But now in my present code I am setting the table bean model from DynPageComponent itself and there I do have access to the saved db connection.