This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 229931 - Multiple attr bindings are shown as an error
Summary: Multiple attr bindings are shown as an error
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Knockout (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 230592 232011 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-17 20:29 UTC by peppertech
Modified: 2013-07-03 13:26 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peppertech 2013-05-17 20:29:46 UTC
It's valid binding syntax to set more than one attribute with a knocout binding.

<a data-bind="text : name, attr : {id: linkId, href : linkTarget}">

The above binding syntax is valid, but is being shown as an error with the following:

index.html:21:11 Expected ) but found ;
linkTarget};
           ^

Expected semicolon ; after "linkTarget".

This "expected semicolon..."  is a bug as well. Placing a semicolon after a binding attribute will break knocout.



Product Version = NetBeans IDE Dev (Build web-main-10554-on-20130517)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_17
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Comment 1 Vladimir Riha 2013-05-26 19:08:48 UTC
Reproducible, similar happens with

<div data-bind="attr: { 'data-something': jejda }">...</div>


Product Version: NetBeans IDE Dev (Build 201305252300)
Comment 2 Petr Hejl 2013-05-28 09:50:48 UTC
Partially fixed by bde4058e463e (fix for #229851).

Remaining issue is imo caused by splitting the value by "," in KOLexer. Similar for value "[a, b, c]" in foreach.
Comment 3 Petr Hejl 2013-05-31 16:55:20 UTC
*** Bug 230592 has been marked as a duplicate of this bug. ***
Comment 4 peppertech 2013-07-01 19:37:39 UTC
I would really like to see the rest of this fix get implemented.

This is showing as an error in the html files that I'm trying to do screencasts against and it really looks bad.

In the most recent dev builds, there is not the ability to turn off the HTML editor hints that show this either.  That is how I got around this showing in the past weeks.

I can't legitimately bump this to a P2, but I would really appreciate it if this got a little more love before the 7.4 Beta.
Comment 5 Marek Fukala 2013-07-02 10:56:15 UTC
fixed in web-main#f4e883d23903
Comment 6 Quality Engineering 2013-07-03 02:30:38 UTC
Integrated into 'main-silver', will be available in build *201307022300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f4e883d23903
User: Marek Fukala <mfukala@netbeans.org>
Log: #229931 - Multiple attr bindings are shown as an error
Comment 7 Petr Hejl 2013-07-03 13:26:13 UTC
*** Bug 232011 has been marked as a duplicate of this bug. ***