Hi All,

  I am in the search and implementation of changing the xwiki theme
programmatically.

  I made my xwiki theme Nighfall/Nature and trying to change my theme as
default through program.

  Below i have given my code snippet. its running successfully and the
parameters changing in xwiki as we mentioning here. But the color theme
combo box is not changing and the theme not changing in the xwiki even after
restarting the server.

******************************************************************************

String loginUrl =
"http://localhost:8090/xwiki/bin/Save/XWiki/XWikiPreferences";;
                HttpState initialState = new HttpState();  
        HttpClient client = new HttpClient();  
        
       
client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);  
        client.setState(initialState);  
        PostMethod method = new PostMethod(loginUrl); 
        method.addParameter("XWiki.XWikiPreferences_0_title","Testing title");  
        method.addParameter("XWiki.XWikiPreferences_0_meta",
"context.language");  
        method.addParameter("XWiki.XWikiPreferences_0_showLeftPanels", "1");  
        method.addParameter("XWiki.XWikiPreferences_0_leftPanels", "1");
        method.addParameter("XWiki.XWikiPreferences_0_showRightPanels",
"1");  
        method.addParameter("XWiki.XWikiPreferences_0_rightPanels",
"Panels.QuickLinks,Panels.MyRecentModifications");  
        method.addParameter("XWiki.XWikiPreferences_0_webcopyright",
"copyright");  
        method.addParameter("XWiki.XWikiPreferences_0_version",
"openURL('http://enterprise.xwiki.org/xwiki/bin/view/Main/Documentation',
'_blank'); return false < a
href='http://www.xwiki.org/xwiki/bin/view/Main/Documentation'>Documentation
'");
        method.addParameter("XWiki.XWikiPreferences_0_skin",
"XWiki.DefaultSkin");  
        //method.addParameter("XWiki.XWikiPreferences_0_colorTheme", "");  
        method.addParameter("XWiki.XWikiPreferences_0_colorTheme",
"ColorThemes.Default color theme");        
        method.addParameter("XWiki.XWikiPreferences_0_stylesheet",
"style.css");  
        method.addParameter("XWiki.XWikiPreferences_0_stylesheets",
"style.css");  
        method.addParameter("xcontinue",
"/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Presentation&space=XWiki");
  
        method.addParameter("xredirect",
"/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Presentation&space=XWiki");
        method.addParameter("classname", "xwiki.xwikiPreferences");  
        method.addParameter("formactionsac", "Save");              
        int statusCode = client.executeMethod(method);  

******************************************************************************

  Is there any solution. Kindly suggest is there any idea..

Thanks,
Nithya.
-- 
View this message in context: 
http://n2.nabble.com/Creating-skin-theme-through-httpclient-tp4813624p4813624.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to