state-saving

com.sun.faces.ClientStateSavingPassword - recommendations for actual password?

↘锁芯ラ 提交于 2019-11-30 05:30:14
In all of the reference pages I've found with regards to encrypting the ViewState, the only comment on the password is "your password here". Are there any recommendations regarding the length / complexity of the password that we should use? Depends on Mojarra version. It had several flaws/fails in earlier versions. In Mojarra 1.2.x - 2.1.18 , it was never actually used. The JNDI entry name was namely incorrectly documented. It was documented as com.sun.faces.ClientStateSavingPassword (with same prefix as Mojarra's other web.xml context parameters ), but the code actually checks for

JSF 2.0 partial state saving does not seem to work

北慕城南 提交于 2019-11-29 14:38:40
问题 I am evaluating the possibility of using JSF in a high-traffic website. I am told that in JSF 2.0 the component tree is not stored in the session, and that only deltas are stored once the component tree is modified. Here is the page I am viewing: <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"> <body> <h:form> hello, world </h:form> </body> </html> Every time I view this page, nearly 1K is allocated to the session. If I

com.sun.faces.ClientStateSavingPassword - recommendations for actual password?

人盡茶涼 提交于 2019-11-29 03:16:09
问题 In all of the reference pages I've found with regards to encrypting the ViewState, the only comment on the password is "your password here". Are there any recommendations regarding the length / complexity of the password that we should use? 回答1: Depends on Mojarra version. It had several flaws/fails in earlier versions. In Mojarra 1.2.x - 2.1.18 , it was never actually used. The JNDI entry name was namely incorrectly documented. It was documented as com.sun.faces.ClientStateSavingPassword

Why does JSF save component tree state?

谁说我不能喝 提交于 2019-11-28 03:59:34
There appears to be a difference between managed bean state and component tree state. You can control managed bean state by using annotations like @RequestScoped and @SessionScoped , but it seems you don't have a choice in whether the component tree state is saved or not (although you can choose whether it is saved on the server or client). It seems like component tree state should only be needed for the duration of a single request as a temporary data structure to help process a request. It should be rebuilt from scratch for each request. With JSF 2.0 partial state saving makes the situation

java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at com.sun.faces.renderkit.ServerSideStateHelper.getState

跟風遠走 提交于 2019-11-27 05:32:18
When I use this code without <p:tab> it works as expected, <h:form> <p:wizard> <p:tab title="Test-1"> <h:form> <p:growl id="msg"/> <p:selectOneMenu value="#{studentController.departmentIDgenerate}"> <f:selectItems value="#{departmentController.departmentList}" var="deparet" itemLabel="#{deparet.departmentName}" itemValue="#{deparet.departmentId}"/> <p:ajax listener="#{studentController.addMessage}" update="msg"/> </p:selectOneMenu> </h:form> </p:tab> <p:tab title="Test-2"> </p:tab> </p:wizard> </h:form> but when I start using <p:tab> , it throws the below exception: java.lang

Why does JSF save component tree state?

核能气质少年 提交于 2019-11-27 00:14:35
问题 There appears to be a difference between managed bean state and component tree state. You can control managed bean state by using annotations like @RequestScoped and @SessionScoped , but it seems you don't have a choice in whether the component tree state is saved or not (although you can choose whether it is saved on the server or client). It seems like component tree state should only be needed for the duration of a single request as a temporary data structure to help process a request. It

How to save state when extending UIComponentBase

江枫思渺然 提交于 2019-11-26 22:56:20
I'm creating a composite component that will wrap a datatable to implement very simple paging. I need to save state (the current page number) between ajax requests. I tried creating fields in my FacesComponent, but I discovered they are wiped out during the JSF lifecycle: @FacesComponent(value = "bfTableComponent") public class BFTableComponent extends UIComponentBase implements NamingContainer { private int currentPageNumber; ... I can't seems to find a concise guide to doing this anywhere! How would one save state between requests when creating a composite component? Use StateHelper . It's

Why JSF saves the state of UI components on server?

馋奶兔 提交于 2019-11-25 23:43:27
问题 Until what point in time does JSF save the state of UI components on the server side & when exactly is the UI component\'s state information removed from the server memory? As a logged-in user on the application navigates though pages, will the state of components keep on accumulating on the server? I don\'t understand what is the benefit of keeping UI components state on server !? Isn\'t directly passing the validated/converted data to managed beans enough? Can I or should I try to avoid it?