-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.4
-
None
-
None
following example is just for showing this issue.
to reproduce.
1. open a tab link to Render.jsp, you will see console printout a Locale
2. open another tab, link to Bridge.jsp, you will see null is printed, which is not correct.
>>locale in Renderers:en_US
>>locale in Bridge:null
In zss, it count on user's local, Bridge API should also wrap/provide such information.
Render.jsp
<%@page import="org.zkoss.util.Locales"%> <%@page import="java.util.Locale"%> <%@page import="org.zkoss.zk.ui.Page"%> <%@page import="org.zkoss.zk.ui.GenericRichlet"%> <%@page import="org.zkoss.zkplus.embed.Renders"%> <%@page import="java.util.Date"%> <%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib prefix="zss" uri="http://www.zkoss.org/jsp/zss"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Application for Leave</title> </head> <body> <% Renders.render(getServletContext(), request, response, new GenericRichlet() { public void service(Page page) throws Exception { System.out.println(">>locale in Renderers:"+Locales.getThreadLocal()); page.getDesktop().getSession().setAttribute("testDesktop",page.getDesktop()); } }, null, response.getWriter()); %> </body> </html>
Bridge.jsp
<%@page import="org.zkoss.util.Locales"%> <%@page import="org.zkoss.zk.ui.Desktop"%> <%@page import="org.zkoss.zkplus.embed.Bridge"%> <%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib prefix="zss" uri="http://www.zkoss.org/jsp/zss"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Application for Leave</title> </head> <% Desktop desktop = (Desktop)session.getAttribute("testDesktop"); if(desktop!=null){ Bridge zbridge = Bridge.start(getServletContext(), request, response, desktop); try{ System.out.println(">>locale in Bridge:"+Locales.getThreadLocal()); }finally{ zbridge.close(); } } %> </html>
- is blocked by
-
ZSS-497 Get wrong cell format text after click reset in jsf/jsp demo
- Closed