Hello Anderson,
I confirm you that the last item of the dropdown widget is selected when a null value is specified for selecting one of its items.
This is the behaviour of the puidropdown selectValue method in its version 1.1.
As a workaround, you can test if the value is null from your DAO or your action controller and replace it by an underscore ("_"). Next, add the "data-zdk-noselection" attribute to your zdkdropdow widget, for setting a default item for no selection. For example "Select a value...".
Here is an example below to illustrate the solution:
<form id="myform" class="zdk-form">
<label>Dropdown</label>
<select class="zdk-dropdown" name="mypuidropdown"
data-zdk-noselection="Select a value..." data-zdk-action="mycontroller:myaction">
</select>
<button class="zdk-bt-refresh" type="button">Init</button>
</form>
<script>
$(function () {
$('#myform button').click(function () {
$('#myform .zdk-dropdown').zdkform('init',{mypuidropdown:'_'});
});
});
</script>
Hoping that it will be helpfull,
Pascal MARTINEZ