unplugged / unplugged-controls

7 stars 9 forks source link

checkboxes do not save 'checkedValue' property when saved #404

Closed RichSharpe closed 10 years ago

RichSharpe commented 10 years ago

In an existing Notes form a checkbox has an 'option' set that is the fields value. This can be set in the value or checkedValue in the xp:checkbox control. The Unplugged Controls do not save this value when checked. Replacing the checkbox with a comboBox or radio button will not work as the field is not 'checked' when the doc is opened in the Notes Client

whitemx commented 10 years ago

OK I've added new functionality but this will only work for single checkboxes, checkbox groups should be replaced with a list box.

<li>
    <xp:label value="Checkbox" for="checkbox"></xp:label>
    <div class="switch">
        <xp:checkBox text="aaaa" id="checkbox"
            checkedValue="aaaa" uncheckedValue="xxxx" value="#{document1.checkbox}">
            <xp:this.attrs>
                <xp:attr name="uncheckedValue" value="xxxx">
                </xp:attr>
                <xp:attr name="checkedValue" value="aaaa">
                </xp:attr>
            </xp:this.attrs>
        </xp:checkBox>
    </div>
</li>