0

how to save value of preference back to zk.xml

asked 2014-04-01 16:18:40 +0800

hiepgau gravatar image hiepgau
11 2

updated 2014-04-03 08:26:44 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Hi everyone. I see have two way to set appName. 1. WebApp.setAppName(value) 2. WebApp.getConfiguration().setPreference("org.zkoss.zk.ui.WebApp.name", value);

two method update appName but when I restart server, i just old value of appName. because value is not write back to zk.xml how to i can write back it? Thanks for support!

delete flag offensive retag edit

Comments

I can't vode, I also can't post in "Your answer" because I comment here. Thanks very much @chillworld

hiepgau ( 2014-04-03 08:53:29 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-04-03 06:37:59 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

Oke, you may not write from your app right into the zk.xml file.

Why not :

You have a war/ear what is your app. Normally this is signed. Your signing is killed when you change something manually in the war/ear.

If you really want to control the app name. At startup load a propertie file where your app name is in. Set the app name to that prop file. When you need to change the app name in your project, change also the prop file. You can change the prop file with code, cause the prop file is extern of the war/ear.

Greetz chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-04-01 16:18:40 +0800

Seen: 12 times

Last updated: Apr 03 '14

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