Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mainview.xhtml
- --backed by--> mainViewBean (request scope)
- --with managed property--> mainViewView (view scope)
- include1.xhtml
- --backed by--> include1Bean (request scope)
- --with managed property--> mainViewBean
- include2.xhtml
- --backed by--> include2Bean (request scope)
- --with managed property--> mainViewBean
- include3.xhtml
- --backed by (and with component bindings to)--> include3Bean (request scope)
- --with managed property--> mainViewBean
- include4.xhtml
- --backed by--> mainViewBean
- var lastForm = null;
- function getViewStateFromLastForm(callingElement){
- var currentForm = $(callingElement).closest("form");
- var formId = currentForm.attr("id");
- if(lastForm != null ){
- var viewState = $("#" + lastForm).children("[name='javax.faces.ViewState']").val();
- currentForm.children("[name='javax.faces.ViewState']").remove();
- $('<input/>').attr({
- type: 'hidden',
- id: 'javax.faces.ViewState',
- name: 'javax.faces.ViewState',
- autocomplete: 'off',
- value: viewState
- }).appendTo(currentForm);
- }
- lastForm = formId;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement