[jira] [Updated] (NETBEANS-6478) Support for Knockout's "checked" binding broken.

2022-09-18 Thread Jaroslav Tulach (Jira)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-6478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jaroslav Tulach updated NETBEANS-6478:
--
Attachment: kobinding.zip

> Support for Knockout's "checked" binding broken.
> 
>
> Key: NETBEANS-6478
> URL: https://issues.apache.org/jira/browse/NETBEANS-6478
> Project: NetBeans
>  Issue Type: Bug
>  Components: platform - HTML4J
>Reporter: Dusan Balek
>Assignee: Jaroslav Tulach
>Priority: Major
> Attachments: kobinding.zip
>
>
> HTML4J does not correctly support Knockout's "checked" binding that includes 
> {{checkedValue.}} The following code snippet illustrating the use case is 
> copied from the Knockout documentation:
> {code:java}
> 
> 
> 
> 
> 
> var viewModel = {
> items: ko.observableArray([
> { itemName: 'Choice 1' },
> { itemName: 'Choice 2' }
> ]),
> chosenItems: ko.observableArray()
> };
> {code}
> Having the corresponding Java:
> {code:java}
> @HTMLDialog(url = ".html")
> static HTMLDialog.OnSubmit showUI() {
>     ViewModel model = new ViewModel();
>     model.applyBindings();
>     return (id) -> {
>         List chosenItems = model.getChosenItems();
>         return !chosenItems.isEmpty();
>     };
> }
> @Model(className = "ViewModel", targetId = "", instance = true, builder = 
> "with", properties = {
>     @Property(name = "chosenItems", type = Item.class, array = true)
> })
> static final class ViewModelControl {
>     @ComputedProperty
>     static List items() {
>         return Arrays.asList(new Item("Choice 1"), new Item("Choice 2"));
>     }
> }
> @Model(className = "Item", instance = true, properties = {
>     @Property(name = "itemName", type = String.class)
> })
> static final class ItemControl {
> }
> {code}
> The content of `chosenItems` does not reflect changes in checkbox selection.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Updated] (NETBEANS-6478) Support for Knockout's "checked" binding broken.

2022-03-17 Thread Dusan Balek (Jira)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-6478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dusan Balek updated NETBEANS-6478:
--
Description: 
HTML4J does not correctly support Knockout's "checked" binding that includes 
{{checkedValue.}} The following code snippet illustrating the use case is 
copied from the Knockout documentation:
{code:java}






var viewModel = {
items: ko.observableArray([
{ itemName: 'Choice 1' },
{ itemName: 'Choice 2' }
]),
chosenItems: ko.observableArray()
};
{code}
Having the corresponding Java:
{code:java}
@HTMLDialog(url = ".html")
static HTMLDialog.OnSubmit showUI() {
    ViewModel model = new ViewModel();
    model.applyBindings();
    return (id) -> {
        List chosenItems = model.getChosenItems();
        return !chosenItems.isEmpty();
    };
}

@Model(className = "ViewModel", targetId = "", instance = true, builder = 
"with", properties = {
    @Property(name = "chosenItems", type = Item.class, array = true)
})
static final class ViewModelControl {
    @ComputedProperty
    static List items() {
        return Arrays.asList(new Item("Choice 1"), new Item("Choice 2"));
    }
}

@Model(className = "Item", instance = true, properties = {
    @Property(name = "itemName", type = String.class)
})
static final class ItemControl {
}

{code}
The content of `chosenItems` does not reflect changes in checkbox selection.

 

  was:
HTML4J does not correctly support Knockout's "checked" binding that includes 
{{checkedValue.}} The following code snippet illustrating the use case is 
copied from the Knockout documentation:

 
{code:java}






var viewModel = {
items: ko.observableArray([
{ itemName: 'Choice 1' },
{ itemName: 'Choice 2' }
]),
chosenItems: ko.observableArray()
};
{code}
Having the corresponding Java:
{code:java}
@HTMLDialog(url = ".html")
static HTMLDialog.OnSubmit showUI() {
    ViewModel model = new ViewModel();
    model.applyBindings();
    return (id) -> {
        List chosenItems = model.getChosenItems();
        return !chosenItems.isEmpty();
    };
}

@Model(className = "ViewModel", targetId = "", instance = true, builder = 
"with", properties = {
    @Property(name = "chosenItems", type = Item.class, array = true)
})
static final class ViewModelControl {
    @ComputedProperty
    static List items() {
        return Arrays.asList(new Item("Choice 1"), new Item("Choice 2"));
    }
}

@Model(className = "Item", instance = true, properties = {
    @Property(name = "itemName", type = String.class)
})
static final class ItemControl {
}

{code}
The content of `chosenItems` does not reflect changes in checkbox selection.

 


> Support for Knockout's "checked" binding broken.
> 
>
> Key: NETBEANS-6478
> URL: https://issues.apache.org/jira/browse/NETBEANS-6478
> Project: NetBeans
>  Issue Type: Bug
>  Components: platform - HTML4J
>Reporter: Dusan Balek
>Assignee: Jaroslav Tulach
>Priority: Major
>
> HTML4J does not correctly support Knockout's "checked" binding that includes 
> {{checkedValue.}} The following code snippet illustrating the use case is 
> copied from the Knockout documentation:
> {code:java}
> 
> 
> 
> 
> 
> var viewModel = {
> items: ko.observableArray([
> { itemName: 'Choice 1' },
> { itemName: 'Choice 2' }
> ]),
> chosenItems: ko.observableArray()
> };
> {code}
> Having the corresponding Java:
> {code:java}
> @HTMLDialog(url = ".html")
> static HTMLDialog.OnSubmit showUI() {
>     ViewModel model = new ViewModel();
>     model.applyBindings();
>     return (id) -> {
>         List chosenItems = model.getChosenItems();
>         return !chosenItems.isEmpty();
>     };
> }
> @Model(className = "ViewModel", targetId = "", instance = true, builder = 
> "with", properties = {
>     @Property(name = "chosenItems", type = Item.class, array = true)
> })
> static final class ViewModelControl {
>     @ComputedProperty
>     static List items() {
>         return Arrays.asList(new Item("Choice 1"), new Item("Choice 2"));
>     }
> }
> @Model(className = "Item", instance = true, properties = {
>     @Property(name = "itemName", type = String.class)
> })
> static final class ItemControl {
> }
> {code}
> The content of `chosenItems` does not reflect changes in checkbox selection.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit: