Change the way in how initValue and defaultValue works for app-connect and server-connect extensions

Hi Wapple Team, the use of defaultValue and init Value are getting me crazy and I personally think the are wrong, for example:

I know that defaultValue can be setup inside the .js file of the extension as a proper default value, however, inside the hjson file the defaultValue should be a value that can be added automatically if present, otherwise call it “placeholder”, even if it get called “placeholder” if the same string inside the UI is write it, these value is not apply because is the same and this should be modify mandatory.

In my case defaultValue inside .js file not apply because I want to send server side variable into the extension, and I want to leave this defaultValue to be a real default value to be sent to the extension/js file.

{ name: 'ext', optionName: 'ext', attribute:'ext', title: 'val', type: 'text', required: true, initValue: '<%= valueFromServer%>', defaultValue: '<%=valueFromServer%>',help: 'Automatically added by the module' },

Based on this example defaultValue: '<%=valueFromServer%>' in the UI will show the same text, however, it works as placeholder, but if leave it without any modification the variable is not added into the extension/js file. The initValue looks like not works for type=text.

Please, change the way in how this params can be added, the idea is to set default text/defaultValue to be valid inside the UI, if user not modify this “defaultValue” the same “defaultValue” will be sent.

Thanks

@George, @patrick

Bump!

Perhaps you are misunderstanding how this works.

Default value works as it should WITH ONE EXCEPTION.

In the case of the "name" property the default name is set with "baseName"

So to set a name field to, say "module1" you need to specify:

baseName : 'module1'

as an additional property to the name input.

Yes perhaps you misunderstand the working of the defaultValue parameter.

It is only meant to specify a value that when the given value is equal to, it is omitted from the options (or attributes on app connect) so a default from your code will then apply. Hence default value name.

And if you really need an initial different value then use initValue