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.

View | Details | Raw Unified | Return to bug 246133
Collapse All | Expand All

(-)774744d8b0e4 (+5 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project basedir="." default="netbeans" name="module6">
3
    <description>Builds, tests, and runs the project org.netbeans.modules.module6</description>
4
    <import file="../nbbuild/templates/projectized.xml"/>
5
</project>
(-)774744d8b0e4 (+5 lines)
Added Link Here
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.module6
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/module6/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.0
5
(-)774744d8b0e4 (+2 lines)
Added Link Here
1
javac.source=1.6
2
javac.compilerargs=-Xlint -Xlint:-serial
(-)774744d8b0e4 (+48 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://www.netbeans.org/ns/project/1">
3
    <type>org.netbeans.modules.apisupport.project</type>
4
    <configuration>
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
6
            <code-name-base>org.netbeans.modules.module6</code-name-base>
7
            <module-dependencies>
8
                <dependency>
9
                    <code-name-base>net.java.html.json</code-name-base>
10
                    <build-prerequisite/>
11
                    <compile-dependency/>
12
                    <run-dependency/>
13
                </dependency>
14
                <dependency>
15
                    <code-name-base>net.java.html</code-name-base>
16
                    <build-prerequisite/>
17
                    <compile-dependency/>
18
                    <run-dependency/>
19
                </dependency>
20
                <dependency>
21
                    <code-name-base>org.netbeans.api.html4j</code-name-base>
22
                    <build-prerequisite/>
23
                    <compile-dependency/>
24
                    <run-dependency>
25
                        <specification-version>1.0</specification-version>
26
                    </run-dependency>
27
                </dependency>
28
                <dependency>
29
                    <code-name-base>org.openide.awt</code-name-base>
30
                    <build-prerequisite/>
31
                    <compile-dependency/>
32
                    <run-dependency>
33
                        <specification-version>7.63</specification-version>
34
                    </run-dependency>
35
                </dependency>
36
                <dependency>
37
                    <code-name-base>org.openide.util</code-name-base>
38
                    <build-prerequisite/>
39
                    <compile-dependency/>
40
                    <run-dependency>
41
                        <specification-version>8.40</specification-version>
42
                    </run-dependency>
43
                </dependency>
44
            </module-dependencies>
45
            <public-packages/>
46
        </data>
47
    </configuration>
48
</project>
(-)774744d8b0e4 (+1 lines)
Added Link Here
1
OpenIDE-Module-Name=module6
(-)774744d8b0e4 (+88 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2014 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2014 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.module6;
43
44
import java.awt.event.ActionEvent;
45
import java.awt.event.ActionListener;
46
import java.net.URL;
47
import net.java.html.json.Model;
48
import net.java.html.json.Property;
49
import org.netbeans.api.html4j.HTMLDialog;
50
import org.openide.*;
51
import org.openide.*;
52
import org.openide.awt.ActionID;
53
import org.openide.awt.ActionReference;
54
import org.openide.awt.ActionRegistration;
55
import org.openide.util.NbBundle.Messages;
56
57
@ActionID(
58
        category = "System",
59
        id = "org.netbeans.modules.html4j.ShowHTMLDialog"
60
)
61
@ActionRegistration(
62
        displayName = "#CTL_ShowHTMLDialog"
63
)
64
@ActionReference(path = "Menu/View", position = 1298)
65
@Messages("CTL_ShowHTMLDialog=Show HTML Dialog")
66
@Model(className = "DialogCtrl", properties = {
67
    @Property(name = "ok", type = boolean.class),
68
    @Property(name = "result", type = String.class)
69
})
70
public final class ShowHTMLDialog implements ActionListener {
71
    @HTMLDialog(url = "test.html") static void showHelloWorld() {
72
        new DialogCtrl().applyBindings();
73
    }
74
    
75
    @HTMLDialog(url = "result.html") static void showResult(String result) {
76
        new DialogCtrl(false, result).applyBindings();
77
    }
78
    
79
    @Override
80
    public void actionPerformed(ActionEvent e) {
81
        // shows dialog with a question
82
        String ret = Pages.showHelloWorld();
83
        // another dialog to display result of previous one
84
        Pages.showResult(ret);
85
    }
86
    
87
    
88
}
(-)774744d8b0e4 (+55 lines)
Added Link Here
1
<!DOCTYPE html>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 2014 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
The contents of this file are subject to the terms of either the GNU
11
General Public License Version 2 only ("GPL") or the Common
12
Development and Distribution License("CDDL") (collectively, the
13
"License"). You may not use this file except in compliance with the
14
License. You can obtain a copy of the License at
15
http://www.netbeans.org/cddl-gplv2.html
16
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
17
specific language governing permissions and limitations under the
18
License.  When distributing the software, include this License Header
19
Notice in each file and include the License file at
20
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
21
particular file as subject to the "Classpath" exception as provided
22
by Oracle in the GPL Version 2 section of the License file that
23
accompanied this code. If applicable, add the following below the
24
License Header, with the fields enclosed by brackets [] replaced by
25
your own identifying information:
26
"Portions Copyrighted [year] [name of copyright owner]"
27
28
If you wish your version of this file to be governed by only the CDDL
29
or only the GPL Version 2, indicate your decision by adding
30
"[Contributor] elects to include this software in this distribution
31
under the [CDDL or GPL Version 2] license." If you do not indicate a
32
single choice of license, a recipient has the option to distribute
33
your version of this file under either the CDDL, the GPL Version 2 or
34
to extend the choice of license to its licensees as provided above.
35
However, if you add GPL Version 2 code and therefore, elected the GPL
36
Version 2 license, then the option applies only if the new code is
37
made subject to such option by the copyright holder.
38
39
Contributor(s):
40
41
Portions Copyrighted 2014 Sun Microsystems, Inc.
42
-->
43
<html>
44
    <head>
45
        <title>Result of Previous Dialog</title>
46
        <meta charset="UTF-8">
47
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
48
    </head>
49
    <body>
50
        <div>
51
            Previous dialog returned: <span data-bind="text: result"></span>
52
        </div>
53
        <button hidden id="close">Close</button>
54
    </body>
55
</html>
(-)774744d8b0e4 (+55 lines)
Added Link Here
1
<!DOCTYPE html>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 2014 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
The contents of this file are subject to the terms of either the GNU
11
General Public License Version 2 only ("GPL") or the Common
12
Development and Distribution License("CDDL") (collectively, the
13
"License"). You may not use this file except in compliance with the
14
License. You can obtain a copy of the License at
15
http://www.netbeans.org/cddl-gplv2.html
16
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
17
specific language governing permissions and limitations under the
18
License.  When distributing the software, include this License Header
19
Notice in each file and include the License file at
20
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
21
particular file as subject to the "Classpath" exception as provided
22
by Oracle in the GPL Version 2 section of the License file that
23
accompanied this code. If applicable, add the following below the
24
License Header, with the fields enclosed by brackets [] replaced by
25
your own identifying information:
26
"Portions Copyrighted [year] [name of copyright owner]"
27
28
If you wish your version of this file to be governed by only the CDDL
29
or only the GPL Version 2, indicate your decision by adding
30
"[Contributor] elects to include this software in this distribution
31
under the [CDDL or GPL Version 2] license." If you do not indicate a
32
single choice of license, a recipient has the option to distribute
33
your version of this file under either the CDDL, the GPL Version 2 or
34
to extend the choice of license to its licensees as provided above.
35
However, if you add GPL Version 2 code and therefore, elected the GPL
36
Version 2 license, then the option applies only if the new code is
37
made subject to such option by the copyright holder.
38
39
Contributor(s):
40
41
Portions Copyrighted 2014 Sun Microsystems, Inc.
42
-->
43
<html>
44
    <head>
45
        <title>Base question</title>
46
        <meta charset="UTF-8">
47
    </head>
48
    <body>
49
        <div>Hello World! How are you?</div>
50
        <input type="checkbox" data-bind="checked: ok">OK?<br>
51
        <input type="checkbox" data-bind="checked: ok">Really?<br>
52
        <button id='ok' hidden data-bind="enable: ok">Good</button>
53
        <button id='bad' hidden>Bad</button>
54
    </body>
55
</html>
(-)774744d8b0e4 (+55 lines)
Added Link Here
1
<!DOCTYPE html>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 2014 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
The contents of this file are subject to the terms of either the GNU
11
General Public License Version 2 only ("GPL") or the Common
12
Development and Distribution License("CDDL") (collectively, the
13
"License"). You may not use this file except in compliance with the
14
License. You can obtain a copy of the License at
15
http://www.netbeans.org/cddl-gplv2.html
16
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
17
specific language governing permissions and limitations under the
18
License.  When distributing the software, include this License Header
19
Notice in each file and include the License file at
20
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
21
particular file as subject to the "Classpath" exception as provided
22
by Oracle in the GPL Version 2 section of the License file that
23
accompanied this code. If applicable, add the following below the
24
License Header, with the fields enclosed by brackets [] replaced by
25
your own identifying information:
26
"Portions Copyrighted [year] [name of copyright owner]"
27
28
If you wish your version of this file to be governed by only the CDDL
29
or only the GPL Version 2, indicate your decision by adding
30
"[Contributor] elects to include this software in this distribution
31
under the [CDDL or GPL Version 2] license." If you do not indicate a
32
single choice of license, a recipient has the option to distribute
33
your version of this file under either the CDDL, the GPL Version 2 or
34
to extend the choice of license to its licensees as provided above.
35
However, if you add GPL Version 2 code and therefore, elected the GPL
36
Version 2 license, then the option applies only if the new code is
37
made subject to such option by the copyright holder.
38
39
Contributor(s):
40
41
Portions Copyrighted 2014 Sun Microsystems, Inc.
42
-->
43
<html>
44
    <head>
45
        <title>Základní otázka</title>
46
        <meta charset="UTF-8">
47
    </head>
48
    <body>
49
        <div>Haló světe! Jak se máš?</div>
50
        <input type="checkbox" data-bind="checked: ok">OK?<br>
51
        <input type="checkbox" data-bind="checked: ok">Opravdu?<br>
52
        <button id='ok' hidden data-bind="enable: ok">Dobře</button>
53
        <button id='bad' hidden>Špatně</button>
54
    </body>
55
</html>

Return to bug 246133