Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2847

FileUpload constraint error message with wrong layout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 7.0.3
    • Components
    • None
    • Windows 10, Tomcat 8.0

      We have own layout for MessageBox component, which covers most of modal windows in our application.
      We are using a Messagebox.setTemplate("/WEB-INF/zk/unsecure/messagebox.zul"); mehod in AppInit class, defined in zk.xml as

          <listener>
              <description>ZK App init</description>
              <listener-class&gt;{our_package}.AppInit</listener-class&gt;
          </listener>
      

      We also have own layout for error-page, defined in zk.xml

          <error-page>
              <exception-type>java.lang.Throwable</exception-type>
              <location>/WEB-INF/zk/unsecure/error.zul</location>
          </error-page>
      

      All of this features works well


      Problem is:
      We defined a constraint on a component in ZUL file, like maxsize on FileUpload

      <fileupload id="fileUpload" upload="true,maxsize=10" label="${llabels.fill_from_excel}" sclass="btn"/>
      

      When I try tu upload a file with bigger size than 10kb, some modal window appear, but with a wrong (maybe some default) layout. It looks like messagebox layout before our changes.
      I was searching for a while, if I can set a template for another component, but I don't know, for what component.
      I am not able to reproduce this modal window by simple button with onClick event.

              <button label="Cause Alert" onClick='alert("Alert test");'/>
      

      This button shows right modal window, because it uses a Messagebox component. (screenshot-1)

      But when i upload large file to my FileUpload, modal window is wrong and has no z-messagebox sclass (screenshot-2)

      Please help me with some advice

            Unassigned Unassigned
            Worsik Worsik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: