Skip to Content
0

WebIDE custom template with custom wizard step

Feb 14 at 10:15 AM

125

avatar image

Hi all,

I'm creating a custom template, where I want to add a custom wizard step.

I found the documentation(https://sdk-sapwebide.dispatcher.hana.ondemand.com/index.html#/topic/3077337abe2c42b885af557d3ddbedba) but I'm struggeling with some issues.

I added the custom service in plugin.json

	"requires": {
		"services": [
			"template",
			"catalogstep",
			"templateCustomizationStep",
			"customStep",



	"provides": {
		"services": {
			"customStep": {
				"implements": "sap.watt.common.service.ui.WizardStep",
				"module": "customplugin/service/CustomStep"
			}



	"configures": {
		"services": {
			"template:templates": [{
                                 "wizardSteps": [
					"catalogstep",
					"templateCustomizationStep",
					"customStep"
				],

I created my Customstep.js

define({

	getContent: function() {
		jQuery.sap.require("customplugin.control.MyCustomStep");
		var oMyStepContent = new customplugin.control.MyCustomStep({
			context: this.context
		});


		var sTitle = this.context.i18n.getText("customstep_title");


		return this.context.service.wizard.createWizardStep(oMyStepContent, sTitle, "");
	}
});


but it's failing over the line "this.context.service.wizard.createWizardStep".

this.context.service exists (and contains all the wizard steps), but doesn't contains the "wizard" object, and therefore, I can't use the function "createWizardStep".

Anyone an idea? Or does anyone had a simular problem?

Thx!

Regards,
Hans

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
avatar image
Former Member
Feb 15 at 10:33 AM
0

yes just add

"requires": { "services": [ "template", "templateCustomizationStep", "catalogstep", "wizard" ]

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Great, Thx, that did the trick!

It's a little bit confusing in the documentation

https://sdk-sapwebide.dispatcher.hana.ondemand.com/index.html#/topic/0fb5b41502d749c6b169fb84eeb3f348 "Make sure that you require the relevant wizard step services also in the "requires" : "services" array of the plugin that configures the template that is located in the plugin.json file."

So, In this case, I would understand that you need to add your own wizard service to the required services. But this is not that case, it's just the "wizard" service, that we need to add.

Regards,
Hans

0
avatar image
Former Member
Feb 15 at 09:12 AM
0

Hi,

Please add in your plugin.json require to wizard service.

Regards,

Alex

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Alex,

Is it this part of the code?

	"requires": {
		"services": [
			"template",
			"catalogstep",
			"templateCustomizationStep",
			"customStep",

Here, I placed my "customStep", in the required services. Or does I need to place this also in another section?

I can acces my service, It's failing on the line "this.context.service.wizard.createWizardStep" because this.context.service doesn't contain wizard, only the names of the wizard steps.

Regards,
Hans

0
Michal Keidar
Feb 15 at 06:21 AM
0

Rima Sirich - would you be able to assist?

Thanks,
Michal.

Share
10 |10000 characters needed characters left characters exceeded
Hans Verreydt Feb 15 at 09:09 AM
0

Former Member , did you had a simular issue? (https://archive.sap.com/discussions/thread/3897926)

Regards,
HAns

Share
10 |10000 characters needed characters left characters exceeded