Changeset 446 for tapas/web/src
- Timestamp:
- 04/02/12 17:01:12 (12 years ago)
- Location:
- tapas/web/src/com/ether
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tapas/web/src/com/ether/Controller.java
r445 r446 33 33 * @throws WebException 34 34 */ 35 //@ControllerMethod(view = VIEW_FORM_TAPAS, loginMandatory = true, defaultView = VIEW_INDEX) 36 @ControllerMethod(view = VIEW_FORM_TAPAS, loginMandatory = false, defaultView = VIEW_INDEX) 35 @ControllerMethod(view = VIEW_FORM_TAPAS, loginMandatory = true, defaultView = VIEW_INDEX) 37 36 public JSONObject viewForm() 38 37 throws WebException -
tapas/web/src/com/ether/ControllerEther.java
r445 r446 74 74 } 75 75 76 /**77 * This method return the text from the files messages**.properties78 *79 * @param code80 * @return81 */82 public String getMessage( @NotNull final String code )83 {84 final String webInfPath = getServletContext().getRealPath( "WEB-INF" );85 return WebHelper.getMessage( webInfPath, code );86 }87 88 76 @Override 89 77 @Nullable … … 97 85 98 86 request.setCharacterEncoding( UTF8Charset.getEncoding() ); 99 // String message = getMessage( "bo.fulltitle" );100 87 101 88 // Get method to call -
tapas/web/src/com/ether/WebHelper.java
r445 r446 8 8 import org.jetbrains.annotations.NotNull; 9 9 import org.jetbrains.annotations.Nullable; 10 import org.springframework.context.MessageSource;11 import org.springframework.context.support.ClassPathXmlApplicationContext;12 10 13 11 import javax.servlet.ServletOutputStream; … … 132 130 } 133 131 134 /**135 * This method return the text from the files messages**.properties136 *137 * @param code138 * @return139 */140 public static String getMessage( @NotNull final String webInfPath, @NotNull final String code )141 {142 final MessageSource resources = new ClassPathXmlApplicationContext( webInfPath + "/classes/servlet-context.xml" );143 final String message = resources.getMessage( code, null, "Default", null );144 return message;145 }146 147 132 public static final int STATUS_CODE_SERVICE_EXCEPTION = 500; 148 133 public static final String PROPERTIES_FILE = "tapas.properties";
Note: See TracChangeset
for help on using the changeset viewer.