-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
I'm facing an small problem.
The scenario is the following:
1. I have a zk web app running against an authentication CAS service. After login, I can use the tool, etc.
2. If I log out of the tool from another tab, when I try to keep working in my zk app (clicking on a button, for example) I get the message: "Server temporarily unavailable. Try it again? (0)" which is a little bit misleading. I would really like to customize this message pointing to a more helpful action to be taken by the user (basically, reload the page, that would send him back to the login page).
Is there a way to customize this message without having to go deeply into the zk.jar file? (I could do it changing a messages js file inside).
Cheers.
It is not really a code problem. I don't really know what to post to help you understand the case.
It is a configuration problem and does not matter what code are you using. The thing is how to customize that message in case you have been logged out from your app. from another tab.
Hi,
how about a simple solution: just copy a changed msg-file to /metainfo/mesg/msgzk.properties in your WEB-INF/classes. This overrides resources from Jar-files.
Cheers, Maik
Mmmm... interesting.
Still, there is no error code for the case I'm trying to customize (mesg.FAILED_TO_RESPONSE="The server is temporarily out of service.").
So I can't add any property with an error code because does not exist in org.zkoss.zk.mesg.MZk, the class defining the error codes.
:-(
Hi,
the message is located in zk.jar (/web/js/zk/lang/msgzk.js).
FAILED_TO_RESPONSE: "The server is temporarily out of service.",
TRY_AGAIN: "Would you like to try again?"
To overwrite, copy a changed version into WEB-INF/classes/web/js/zk/lang/msgzk.js.
Cheers, Maik
thanks~~ I thought it was one sentence
Asked: 2010-12-16 08:52:07 +0800
Seen: 916 times
Last updated: Jan 13 '11