English 中文(简体)
我能在客户浏览器中存储什么 JJF 数据
原标题:What JSF data can I store in a client browser
  • 时间:2012-05-24 19:59:36
  •  标签:
  • jsf
  • jsf-2

我感兴趣的是,我可以储存到客户端,例如大型哈沙马或列表?我需要一个临时缓存来存储用户会话数据。

问题回答

理论上, 您可以在 JavaScript 中使用 < a href=" https://www.google.com/ search? q=html 5% 20client% 20side% 20storage" rel= “ no follow” >HTML5 客户端存储 。 到目前为止, 目前还没有能透明地完成这项工作的 JSF 组件存在 。 您需要撰写所有必需的 JS 代码自己或抓抓抓 < a href=" https://www.google.com/search?q=jquery%20html5% 20client% 20side%20side%20storage" rel=“ nofolpolt" >jQuary

JSF 是一个 HTML 代码生成器, 唯一能为您做的是将 Java 对象以 JSON 格式打印为 JavaScript 变量任务, 由 JSON 库帮助, 例如 < a href=" http://code.google.com/ p/google- gson/ " rel= "nofollow" > Google Gson 。

<h:outputScript>var data = #{bean.dataAsJSON};</h:outputScript>

getDataAsJSON () 应该只返回一个已经转换的 JSON 字符串 。





相关问题
JSF a4j:support with h:selectManyCheckbox

I m having trouble with a JSF selectManyCheckbox and A4J support. The purpose is to run some action when a checkbox is selected. This works perfectly in Firefox. Yet, when testing in any IE (ie6 / ie7 ...

Mojarra for JSF Encoding

Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with

如何拦截要求终止?

在共同基金中,如果用户要求终止,就需要采取一些行动。 我需要某种拦截器,但我不知道如何这样做。 我需要帮助。 增 编

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

Weird behaviour of h:commandLink action (MethodExpression)

I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically. I have showXML.jsp that shows the "XML" column ...

How to correctly use ResultSet with h:dataTable

The problem is, that after displaying the ResultSet with <h:dataTable>, the connection is left open. If I close it, it closes the ResultSet too. I m thinking about copying the ResultSet data ...

热门标签