<div class=portlet-form-field-label><spring:message code="label.someMessage"/> <a href='javascript:popup("<fmt:message key='someUrl' />");'><fmt:message key='someLabel' /></a>.</div>
In the above code snippet, what is the javascript:popup function doing? The standard function is window.open(url). Is 'javascript:popup' a standard function?
The other question is that someUrl is resolving to a location of an html file but the actual location of the html file is different.
And I cannot find any mapping
1) no, this should be a custom (not standard) popup() function.
2) Your code uses someUrl to extract a value with
fmt:messageand then paste it into the popup.Following is an illustration on how fmt:message works:
let’s introduce the
<fmt:message>action. If you really wanted to do the bare-bones amount of work necessary to build an internationalized application,is the only action that you’ll need to consider. The action takes advantage of the LocalizationContext (which we talk about in the next section).By using the ,you can output values from your resource bundles as simply as:The appropriate resource bundle will be used to look up the key “welcome” and the translated string will be provided. This is about as easy as it gets to incorporate international support into your application. The action also supports parameterized content, also called parametric replacement. For example, you can provide variables that will be used within the string used by the key attribute. Say we want to personalize our welcome page and pass the name of a user so that we can welcome them. To do this, we use the
<fmt:param>subtag. We will talk about this in more detail later in this chapter, but as a quick example, so that you are familiar with the format, the action might look like:taken from here