Revision history [back]

click to hide/show revision 1
initial version

answered 2018-06-07 19:38:41 +0800

everdelightedone gravatar image everdelightedone

Thank you for the answer! I am new to ZK and possibly don't understand something simple. The project I got have been uploaded from git repository and I run it with Netbeans IDE 8.2 under Apache Tomcat 8.0.27. I have tried to run project under different browsers (Chrome 66.0.3359.181 and Firefox 59.0.2). Maven snippet from pom.xml:

        <properties>
            <zk.spring.version>3.0</zk.spring.version>
            <zk.version>7.0.3</zk.version>
        </properties>
    <dependency>
        <groupId>org.zkoss.theme</groupId>
        <artifactId>sapphire</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkplus</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkbind</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zhtml</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-core</artifactId>
        <version>${zk.spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-security</artifactId>
        <version>${zk.spring.version}</version>
    </dependency>

The first line in .zul file is

<?xml version="1.0" encoding="UTF-8"?>

I can open .zul in Notepad++ without any encoding problem with UTF-8 encoding. I also can see ploblem symbol in Netbeans editor. I don't understand how is it possible for every cyrillic symbol to work without any problem, but just one of them and only with uppercase case to fail. My .zul snippet:

        <south height="250px" splittable="true" minsize="250" collapsible="true" style="border-bottom: 0; border-left: 0; border-right: 0;"
               autoscroll="true"
               open="@load(vm.addingNewItemMode or vm.editorOpen) @bind(vm.editorOpen)">
            <groupbox id="addItemWindow" form="@id('newItem') @load(vm.selectedItem) @save(vm.selectedItem, before='save')"
                      style="border: 0" visible="@load(not empty vm.selectedItem)" width="100%" height="100%" contentStyle="border: 0; padding: 0;">
                <grid width="100%" height="100%" style="border: 0">
                    <columns>
                        <column hflex="min"/> <column/>
                    </columns>
                    <rows>
                        <row>
                            <label value="Код"/>
                            <vlayout>
                                <textbox width="" value="@bind(newItem.code) @validator(vm.codeValidator,length='30')" disabled="@load(!vm.canEdit)"  hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['code'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Имя"/>
                            <vlayout>
                                <textbox value="@bind(newItem.name) @validator(vm.uniqueValidator,length='255')" disabled="@load(!vm.canEdit)" hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['name'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Описание"/>
                            <vlayout>
                                <textbox value="@bind(newItem.description) @validator(vm.lengthValidator,length='255')" disabled="@load(!vm.canEdit)" hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['description'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Цвет"/>
                            <vlayout>
                            <combobox id="comboColors" model="@load(c:split(configuration.getString('ui.priority.work.mode.colors'),','))" readonly="true"
                                      value="@bind(newItem.color) @converter(vm.comboBoxSelectedItemConverter) @validator(vm.uniqueValidator,length='255')"
                                      selectedItem="@load(newItem.color)"
                                      disabled="@load(!vm.canEdit)" itemRenderer="@load(vm.colorRenderer)"
                                      style="@bind((newItem.color eq null or c:trim(newItem.color) eq '') ? '' : c:cat('color: #',c:replace(c:substring(newItem.color, 1, 7), 'FFFFFF', '000000')))"/>
                            <label sclass="error" value="@bind(vmsgs['color'])"/>
                            </vlayout>
                        </row>
                    </rows>
                </grid>
            </groupbox>
        </south>

I run it under Windows 10. I tried it to run of two different computers (both with the same hardware and OS). Opening page results "Page not found: /zk/priority/workMode.zul" error message.

Thank you for the answer! I am new to ZK and possibly don't understand something simple. The project I got have been uploaded from git repository and I run it with Netbeans IDE 8.2 under Apache Tomcat 8.0.27. I have tried to run project under different browsers (Chrome 66.0.3359.181 and Firefox 59.0.2). Maven snippet from pom.xml:

        <properties>
            <zk.spring.version>3.0</zk.spring.version>
            <zk.version>7.0.3</zk.version>
        </properties>
    <dependency>
        <groupId>org.zkoss.theme</groupId>
        <artifactId>sapphire</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkplus</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkbind</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zhtml</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-core</artifactId>
        <version>${zk.spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-security</artifactId>
        <version>${zk.spring.version}</version>
    </dependency>

The first line in .zul file is

<?xml version="1.0" encoding="UTF-8"?>

I can open .zul in Notepad++ without any encoding problem with UTF-8 encoding. I also can see ploblem symbol in Netbeans editor. I don't understand how is it possible for every cyrillic symbol to work without any problem, but just one of them and only with uppercase case to fail. My .zul snippet:

        <south height="250px" splittable="true" minsize="250" collapsible="true" style="border-bottom: 0; border-left: 0; border-right: 0;"
               autoscroll="true"
               open="@load(vm.addingNewItemMode or vm.editorOpen) @bind(vm.editorOpen)">
            <groupbox id="addItemWindow" form="@id('newItem') @load(vm.selectedItem) @save(vm.selectedItem, before='save')"
                      style="border: 0" visible="@load(not empty vm.selectedItem)" width="100%" height="100%" contentStyle="border: 0; padding: 0;">
                <grid width="100%" height="100%" style="border: 0">
                    <columns>
                        <column hflex="min"/> <column/>
                    </columns>
                    <rows>
                        <row>
                            <label value="Код"/>
                            <vlayout>
                                <textbox width="" value="@bind(newItem.code) @validator(vm.codeValidator,length='30')" disabled="@load(!vm.canEdit)"  hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['code'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Имя"/>
                            <vlayout>
                                <textbox value="@bind(newItem.name) @validator(vm.uniqueValidator,length='255')" disabled="@load(!vm.canEdit)" hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['name'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Описание"/>
                            <vlayout>
                                <textbox value="@bind(newItem.description) @validator(vm.lengthValidator,length='255')" disabled="@load(!vm.canEdit)" hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['description'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Цвет"/>
                            <vlayout>
                            <combobox id="comboColors" model="@load(c:split(configuration.getString('ui.priority.work.mode.colors'),','))" readonly="true"
                                      value="@bind(newItem.color) @converter(vm.comboBoxSelectedItemConverter) @validator(vm.uniqueValidator,length='255')"
                                      selectedItem="@load(newItem.color)"
                                      disabled="@load(!vm.canEdit)" itemRenderer="@load(vm.colorRenderer)"
                                      style="@bind((newItem.color eq null or c:trim(newItem.color) eq '') ? '' : c:cat('color: #',c:replace(c:substring(newItem.color, 1, 7), 'FFFFFF', '000000')))"/>
                            <label sclass="error" value="@bind(vmsgs['color'])"/>
                            </vlayout>
                        </row>
                    </rows>
                </grid>
            </groupbox>
        </south>

(I can't insert a full .zul's text in my post, because it contains links I'm getting error "Your karma is insufficient to publish links, please remove the link and post again".) I run it under Windows 10. I tried it to run of two different computers (both with the same hardware and OS). Opening page results "Page not found: /zk/priority/workMode.zul" error message.

Thank you for the answer! I am new to ZK and possibly don't understand something simple. The project I got have been uploaded from git repository and I run it with Netbeans IDE 8.2 under Apache Tomcat 8.0.27. I have tried to run project under different browsers (Chrome 66.0.3359.181 and Firefox 59.0.2). Maven snippet from pom.xml:

        <properties>
            <zk.spring.version>3.0</zk.spring.version>
            <zk.version>7.0.3</zk.version>
        </properties>
    <dependency>
        <groupId>org.zkoss.theme</groupId>
        <artifactId>sapphire</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkplus</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkbind</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zhtml</artifactId>
        <version>${zk.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-core</artifactId>
        <version>${zk.spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkspring-security</artifactId>
        <version>${zk.spring.version}</version>
    </dependency>

The first line in .zul file is

<?xml version="1.0" encoding="UTF-8"?>

I can open .zul in Notepad++ without any encoding problem with UTF-8 encoding. I also can see ploblem symbol in Netbeans editor. I don't understand how is it possible for every cyrillic symbol to work without any problem, but just one of them and only with uppercase case to fail. My .zul snippet:

        <south height="250px" splittable="true" minsize="250" collapsible="true" style="border-bottom: 0; border-left: 0; border-right: 0;"
               autoscroll="true"
               open="@load(vm.addingNewItemMode or vm.editorOpen) @bind(vm.editorOpen)">
            <groupbox id="addItemWindow" form="@id('newItem') @load(vm.selectedItem) @save(vm.selectedItem, before='save')"
                      style="border: 0" visible="@load(not empty vm.selectedItem)" width="100%" height="100%" contentStyle="border: 0; padding: 0;">
                <grid width="100%" height="100%" style="border: 0">
                    <columns>
                        <column hflex="min"/> <column/>
                    </columns>
                    <rows>
                        <row>
                            <label value="Код"/>
                            <vlayout>
                                <textbox width="" value="@bind(newItem.code) @validator(vm.codeValidator,length='30')" disabled="@load(!vm.canEdit)"  hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['code'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Имя"/>
                            <vlayout>
                                <textbox value="@bind(newItem.name) @validator(vm.uniqueValidator,length='255')" disabled="@load(!vm.canEdit)" hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['name'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Описание"/>
                            <vlayout>
                                <textbox value="@bind(newItem.description) @validator(vm.lengthValidator,length='255')" disabled="@load(!vm.canEdit)" hflex="1"/>
                                <label sclass="error" value="@bind(vmsgs['description'])"/>
                            </vlayout>
                        </row>
                        <row>
                            <label value="Цвет"/>
                            <vlayout>
                            <combobox id="comboColors" model="@load(c:split(configuration.getString('ui.priority.work.mode.colors'),','))" readonly="true"
                                      value="@bind(newItem.color) @converter(vm.comboBoxSelectedItemConverter) @validator(vm.uniqueValidator,length='255')"
                                      selectedItem="@load(newItem.color)"
                                      disabled="@load(!vm.canEdit)" itemRenderer="@load(vm.colorRenderer)"
                                      style="@bind((newItem.color eq null or c:trim(newItem.color) eq '') ? '' : c:cat('color: #',c:replace(c:substring(newItem.color, 1, 7), 'FFFFFF', '000000')))"/>
                            <label sclass="error" value="@bind(vmsgs['color'])"/>
                            </vlayout>
                        </row>
                    </rows>
                </grid>
            </groupbox>
        </south>

(I can't insert a full .zul's text in my post, because it contains links I'm getting error "Your karma is insufficient to publish links, please remove the link and post again".) Problem symbol is in the row <label value="Имя"/> I run it under Windows 10. I tried it to run of two different computers (both with the same hardware and OS). Opening page results "Page not found: /zk/priority/workMode.zul" error message.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More