cancel
Showing results for 
Search instead for 
Did you mean: 

WebIDE custom template with custom wizard step

verreydthans
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

yuval_morad
Employee
Employee
0 Kudos

yes just add

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

verreydthans
Participant
0 Kudos

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/0fb5b41502d749c6b169fb84eeb3f34... "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

Answers (3)

Answers (3)

0 Kudos

Hi,

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

Regards,

Alex

verreydthans
Participant
0 Kudos

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

verreydthans
Participant
0 Kudos

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

Regards,
HAns

michal_keidar
Active Contributor
0 Kudos

rima.rudnik-sirich - would you be able to assist?

Thanks,
Michal.