How do i programatically create entries in portalapp.xml file?
I need to create some profile properties inside this file dynamically.
<property name="myColor" value="red"/>
I know, how to read and set the values but how wud i go about creating a new entry?
EG: <property name="yourColor" value="green"/>
from the Dynpage.
you shouldn't be able to do this. The reason is that the profile is designed at designtime, so the properties one component is a designtime question. The values of the properties can be set at runtime - creating an iView out of a component or really dynamically by setting values on a IPortalComponentProfile. Did you try to set a value on the profile for a key which hasn't been defined at designtime? I didn't try, and maybe it works at runtime, but I would expect this not being persistent. Maybe you should give it a try if that works for your needs.
Saying this, why do you need it? What's your use case? Normally you shouldn't have a need for this, for a program / component implementation cannot have a semantic logic reacting on the profile parameter which it does not know when the component is implemented.
Hope it helps