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

a property for reloading Labels when one desktop is created

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Done
    • Normal
    • 8.6.0
    • 8.5.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.0 S1, ZK 8.6.0 S2

    Description

      feature spec

      • support a property org.zkoss.util.label.reload
        <library-property>
            <name>org.zkoss.util.label.reload</name>
            <value>true</value>
        </library-property>
        

        Then ZK reloads zk-labels.properties when creating a new desktop (users reload a page)

      • For the developement phase, users are modifying lable properties files, reloading can avoid them from restarting a server each time.
      • it's the same idea like disabling a cache.

      Note

      after implemented, enable this in dev mode mentioned in ZK-4045

      prototype

      	private void enableDynamicLabelReloading() {
      		try {
      			WebApps.getCurrent().getConfiguration().addListener(LabelReloaderListener.class);
      		} catch (Exception e) {
      			logger.error("ZK-Springboot: Couldn't enabling LabelReloaderListener listener");
      		}
      	}
      
      	public static class LabelReloaderListener implements DesktopInit {
      		@Override
      		public void init(Desktop desktop, Object o) throws Exception {
      			Labels.reset();
      		}
      	}
      

      Attachments

        Issue Links

          Activity

            People

              rudyhuang rudyhuang
              hawk hawk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Time Spent - 2 hours Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - 2 hours Remaining Estimate - 2 hours
                  2h