Bonita 7.3.1 Select Widget Bug ?

Hi,

In a sample form if i replace a text widget by a select widget I have the following exception :

Error while validating expected inputs
Explanations:
Expected input [deliveryTerms] is missing

the data is nullable, the widget is not mandatory and i have this exception just if i don’t select a value. The same think with text or text area work fine.

Anyone have an idea ?

Thks,

Pat

This is a problem with your Contract.

Check how you’ve built the page and return the correct value.

Hi Patrice,

What sample form are you using? I’d like to check if I get the same behavior on my side.

Thanks

Thks for your responses,

Sean,

It don’t think the problem is in the contract itself because it works fine with a text widget. A field contract reflect the presentation of a business field and can be nullable. I think it may be in the contract check interface of the Select component. If I remove the field from the contract it works fine.

Lionel,

I have the following datas :

=> Business Data :

... ...

=> Contract :

All fields of an instance of the class describe above

=> Form input :

“currentPurchaseOrderInput” : {

“deliveryTerms” : “”,

=> Form :

Select widget with value : formInput.currentPurchaseOrderInput.deliveryTerms

Pat

Hi,

The contract is not linked to the widgets directly. There is no specific contract for the widget Select by example.
The contract will check the structure and content of the data passed by REST Api call generated by the form on the submit action. If the structure is not as expected, the engine will return an error.

So in your case, you have to make sure that even if no value are selected in your Select widget, you still pass the property deliveryTerms in your JSON response. The value for the property would be empty or NULL if no selection.

Cheers

Thanks Lionel you’re perfectly right, and that the reason why I suspect a bug : the select should always return the property deliveryTerms : value when a value is selected or null or empty if no value is selected … and it return nothing when no value is selected (unlike text component). Something else, even if Select is mandatory the Submit is validated.

pat