DOCUMENTUM中英文切换

java后台:
 public void switchLanguage(Link link,ArgumentList arg)
	   {  
		 if(Locale.CHINA.getLanguage().equals(LocaleService.getLocale().getLanguage()))
		 {
		 LocaleService.setLocale(Locale.ENGLISH); 
		 }else
		 {
			 LocaleService.setLocale(Locale.CHINA); 
			 
		 }
		this.setClientEvent("changeLanguage", null);//触发jsp页面上的changeLanguage js方法刷新页面
	   }

 

    页面上:

     registerClientEventHandler(null, "changeLanguage", switchLanguage);

	function switchLanguage()
	{
	parent.location="<%=request.getContextPath()%>/component/main";
   
	}

    <dmf:link name="language" onclick="switchLanguage"  >

你可能感兴趣的:(jsp)