Hi All,
I have made some significant progress in my customization efforst thanks to your help and looking forward to move forward similarly.
I have created the custom tab in the 'Advanced' tab and it now looks like this http://imageshack.us/f/809/newpageg.png/ . I have been able to add a text field as well as a 'Save' button. I actually followed the 'Edit Space Details' option and took two of its form elements to achieve the output.
This is how my VM looks now.
##requireResource("confluence.web.resources:space-admin") <html> <head> <title>Freeway Project Creation</title> <meta name="decorator" content="atl.general" /> </head> <content tag="key">$action.space.key</content> <body> #applyDecorator("root") #decoratorParam("helper" $action.helper) #decoratorParam("context" "space-administration") #decoratorParam("mode" "view-space-administration") #applyDecorator ("root") #decoratorParam ("context" "spaceadminpanel") #decoratorParam ("selection" "add-fpc-label-action-web-ui") #decoratorParam ("title" $action.getText("action.name")) #decoratorParam ("selectedTab" "admin") #decoratorParam("helper" $action.helper) <div > <table width="95%" border=0 cellspacing=0 cellpadding=5> <form name="editspace" method="POST" > #bodytag( "TextField" "label='space-name'" "name='name'" "size=40" ) #param ("labelwidth" "100") #param ("tdcolor" "f0f0f0") #end <tr> <td colspan="2" align="center"> #tag( "Submit" "name='confirm'" "value='update.name'" "theme='notable'" ) #tag( "Submit" "name='cancel'" "value='cancel.name'" "theme='notable'" ) </td> </tr> </form> </table> </div> #end #end </body> </html>
I would like to understand how this interaction with my JAVA class will result in the output like. For eg: I will enter the name in the text box for name and hit save and on a resulting page it must display the name entered.
As of now my designated java class looks like this.
package com.atlassian.myorg; import com.atlassian.confluence.core.ConfluenceActionSupport; import com.atlassian.confluence.pages.AbstractPage; import com.atlassian.confluence.pages.actions.PageAware; import com.opensymphony.xwork.Action; /** * The simplest action possible */ public class FreewayProjectAction extends ConfluenceActionSupport { @Override public String execute() throws Exception { return Action.SUCCESS; } }
So I have 3 questions:
1. The 'Edit Space Details' shows the following URL 'http://localhost:1990/confluence/spaces/doeditspace.action?key=LBTEST' when i mouse over the 'Save' button. I am assuming that its governing Java class is EditSpaceDetails. So is the doEdit() method (see here http://imageshack.us/f/542/decompdoedit.png/)inside that class that swings into action when we try to save the edit action of the space ? Can i get to see the xml that has this mapping specifically for this edit space details action? Is my assumptin correct ?
2. In order to have such a functionality i have mentioned earlier i.e. displaying the name entered in my custom page as detailed above what will be the changes required in my Java class.
3. In the page i have just customised there is the text box and the label is 'Name' . Should i use a different xml so that i can provide my custom label like "Project Name" ?
Please do kindly advice me on the same.
Thanks
Angie
Hi James,
Thanks for the support . As a first try of using my custom jars inside the execute, i Added few of my jars to the build path in my project . But stil i am getting class not found error when i run the build. The eclipse autosugest seems to easily identify the classes inside my jar. Is there a different way to import jars in a custom plugin ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.