I wanna add a a child element of "portlets" in one
user's PSMLpsml file,like that,i added the line
<theme name="theme2"/> in the file 'admin.psml'
_________________________________________________
<portlets id="300">
<metainfo>
<title>Default Jetspeed Admin page</title>
</metainfo>
<skin name="grey"/>
<theme name="theme2"/>
<control name="TabControl"/>
<controller name="TabController"/>
<portlets id="301">
<metainfo>
<title>Content</title>
</metainfo>
<security-ref parent="admin-only"/>
<layout position="0" size="-1"/>
<control name="MenuControl"/>
<controller name="MenuController"/>
<entry id="P-fff851b4be-10001"
parent="PortletManager"/>
<entry id="P-100ff46dd8d-10000"
parent="ThemeDesigner">
<parameter name="_display"
value="normal"/>
</entry>
<entry id="P-101cc961652-10000"
parent="SkinBrowser"/>
____________________________________
package org.apache.jetspeed.om.profile.psml;
public class PsmlTheme extends PsmlConfigElement
implements Theme{}
____________________________
package org.apache.jetspeed.om.profile;
public interface Theme extends ConfigElement{}
____________________________
and in
org.apache.jetspeed.om.profile.psml.PsmlIdentityElement
i added below:
private Theme theme = null;
.................
public Theme getTheme()
{
return this.theme;
}
public void setTheme(Theme theme)
{
this.theme = theme;
}
and in
org.apache.jetspeed.modules.actions.portlets.CustomizeSetAction.java,i
added below:
String themeName =
rundata.getParameters().getString("themeName");
Profile profile =
((JetspeedRunData)rundata).getCustomizedProfile();
Portlets portlets =
profile.getDocument().getPortlets();
Theme psmlTheme = portlets.getTheme();
if ( psmlTheme == null )
{
portlets.setTheme( new PsmlTheme() );
}
portlets.getTheme().setName(themeName);
profile.store();
__________________________________
but it seemed dont do anything about PSML file,anyone
can help me about the approach ,thanks a lot!!!
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]