Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel2

 


...

Building Your First Plugin

...

XperienCentral requires Maven 3.36.x. It’s very easy to check which version you are currently using: open a command prompt and type:  

...

To download the latest version of Maven 3.36.x, go to the website: http://maven.apache.org/download.html.

...

  1. Create a folder on your computer in which you will start working on your helloWorld element (C:\GX\helloWorld, for example).
  2. Open a command prompt.
  3. Navigate to the folder in which the element should will be created (C:\GX\helloWorld).
  4. Execute the command (replace the <XperienCentral Version> with the version number of XperienCentral that you’re building against (10.1037.0, for example)):

    mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=nl.gx.webmanager.archetypes -DarchetypeArtifactId=webmanager-element-archetype -DarchetypeVersion=<XperienCentral Version> -DgroupId=com.gxwebmanager.helloworld -DartifactId=helloworldelement -Dclassprefix=HelloWorld -s <xperiencentral-root>\settings.xml

...

  1. Open a command prompt window.
  2. Go to the folder C:\GX\helloWorld\helloworldelement.
  3. Execute the command:

    mvn -s <xperiencentral-root>\settings.xml clean package

  4. Copy the file helloworldelement-1.0.0.jar from the target folder to <xperiencentral-root>\work\deploy.
  5. The element is now available in XperienCentral. To prevent everybody from being able to use it right away, the element has to be activated first (this can be done through the
    Configuration > Channel configuration > Functionalities menu). After activation, the element is available in the menu.

...


Back to Top 


...

Creating a Plugin with a Panel Component

...

Press F5 to refresh XperienCentral - The panel is now available in XperienCentral in the Configuration menu.

 


Back to Top

 


...

Creating a Plugin with a Media Item Component

In XperienCentral, the Content Repository can be filled with articles and multimedia items. These objects have a predefined set of metadata. If you need additional metadata for specific types of objects in the Content Repository, a new media item can be created. For example, vacancies have an additional selection list of predefined locations in the metadata.

 


Note

In XperienCentral, the terms "media item" and "content item" are synonymous. For reasons of backward compatability with earlier versions of GX WebManager 9.x, these terms are used interchangeably throughout our documentation.

 


Creating the helloWorld Media Item

...

  1. Open a command prompt.
  2. Navigate to the folder C:\GX\helloWorld\helloworldmediaitem.
  3. Execute the command:

    mvn -s <xperiencentral-root>\settings.xml clean package

  4. Copy the file helloworldmediaitem-1.0.0.jar from the target folder to <xperiencentral-root>\work\deploy.
  5. Press F5 to refresh XperienCentral - The mediaItem component is now available in XperienCentral.

...


Note

If you create a custom download media item that you want to be downloadable directly from a Content Overview and/or Dynamic Content Overview element, the custom mediaItemVersionImpl should implement: nl.gx.webmanager.cms.mediarepository.MediaItemDownloadVersion.

 


Back to Top

 


...

Creating a Plugin with a Page Metadata Component

...

Press F5 to refresh XperienCentral - The Page Metadata component is now available in XperienCentral. For each page it is now possible to enter a value for the new properties as defined in the page metadata component.

 


Back to Top

 


...

Creating a Plugin with a Presentation Component

...

The style is now available in XperienCentral.

 


Back to Top 


...

Creating a Plugin with a Service Component

...

The service is now available to other plugins in XperienCentral. 


Back to Top

 


...

Creating a Plugin with a Servlet Component

...

http://<hostname>:<portnumber>/<context>/helloworldservlet.servlet  


it should display:

helloworldservlet - Hello World!
Init parameter: ‘key’ = ‘value’
 


Back to Top 

 

 




...

Creating a Plugin with a Sidebar Widget

You can add new sidebar (DOJO) widgets to XperienCentral. This archetype will give you a small working sidebar widget example which will respond to the current context and show the title of the content item (Page, Page Section, Media Item) that is being editted and enable the editor to change the url title. 


Creating the helloWorld Sidebar Widget 

...

The widget is now available in XperienCentral (refresh the browser to load the new component in the JavaScript client framework). 


Back to Top

...

 



...

Creating a Plugin with a Presentation Component

...

The style is now available in XperienCentral.

 


Back to Top

 


...

Troubleshooting

The Plugin Does not Compile

...

  1. Open the menu Window > Preferences > Java > Installed JREs.
  2. Ensure that a JDK version of Java is used in your JRE definition
  3. If the used JRE definition points to a JRE version of Java, then remove the reference to the JRE and create a new reference to the JDK.

 


Back to Top